PageSourceSearch

https://bayesat.github.io/lund2019/index_files/indico_legacy_d05f4358.min.js

js bayesat.github.io collected 2026-10-03 08:41:51 UTC 11,753 bytes, 45 lines download raw bytes

1IndicoUI.Widgets={Generic:{tooltip:function(in_this,event,content){var $this=$(in_this);if($this.data('hasTooltip')){return;}
2$this.data('hasTooltip',true).qtip({content:{text:content},show:{ready:true}});return function(){$this.qtip('hide');};},input2dateField:function(elem,showTime,hiddenFields,trigger,format){if(showTime===undefined){showTime=false;}
3elem.processDate=function(){var d;if(showTime){if(exists(format)){d=Util.parseJSDateTime(elem.get(),format);}else{d=IndicoUtil.parseDateTime(elem.get());}}else{if(exists(format)){d=Util.parseJSDateTime(elem.get(),format);if(d!=null){d=getDate(d);}}else{d=parseDate(elem.get());}}
4var ret=false;if(d){if(isArray(hiddenFields)){$E(hiddenFields[0]).set(!showTime?d[0]:d.getDate());$E(hiddenFields[1]).set(!showTime?d[1]:d.getMonth()+1);$E(hiddenFields[2]).set(!showTime?d[2]:d.getFullYear());if(showTime){$E(hiddenFields[3]).set(d.getHours());$E(hiddenFields[4]).set(d.getMinutes());}}else if(hiddenFields){$E(hiddenFields).set(elem.get());}
5ret=true;}else{if(isArray(hiddenFields)){$E(hiddenFields[0]).set('');$E(hiddenFields[1]).set('');$E(hiddenFields[2]).set('');if(showTime){$E(hiddenFields[3]).set('');$E(hiddenFields[4]).set('');}}else if(hiddenFields){$E(hiddenFields).set('');}}
6return ret;};if(hiddenFields){elem.observe(elem.processDate);}
7if(!exists(format)){if(showTime){format="%d/%m/%Y %H:%M";}else{format="%d/%m/%Y";}}
8var onSelect=function(cal){var p=cal.params;var update=(cal.dateClicked||exists(cal.activeDiv._range));if(update&&p.inputField){p.inputField.value=cal.date.print(p.ifFormat);$(p.inputField).trigger('change');}
9if(update&&p.displayArea)
10p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&typeof p.onUpdate=="function")
11p.onUpdate(cal);};Calendar.setup({inputField:elem.dom,button:trigger==undefined?elem.dom:trigger.dom,displayArea:elem,align:"",eventName:"click",ifFormat:format,showsTime:showTime,onSelect:onSelect});},dateField:function(showTime,attributes,hiddenFields,elemInfo,format,callback){attributes=attributes||{};elemInfo=elemInfo||{};extend(elemInfo,attributes);var elem=Html.input("text",elemInfo);var trigger=Html.img({src:imageSrc("calendarWidget")});var tab=Html.div("dateField",elem,trigger);IndicoUI.Widgets.Generic.input2dateField(elem,showTime,hiddenFields,trigger,format);elem.set("");tab.set=function(string){elem.set(string);};tab.get=function(){return elem.get();};tab.observe=function(fun){elem.observe(fun);};tab.observeChange=function(fun){elem.dom.onchange=fun;};tab.dom.onchange=function(){if(typeof(elem.dom.onchange)==='function'){elem.dom.onchange();}
12if(callback!==undefined){callback();}};tab.processDate=elem.processDate;return tab;},dateField_sdate:function(showTime,attributes,hiddenFields){return IndicoUI.Widgets.Generic.dateField(showTime,attributes,hiddenFields,{'id':'sdate','name':'sdate'});},dateField_edate:function(showTime,attributes,hiddenFields){return IndicoUI.Widgets.Generic.dateField(showTime,attributes,hiddenFields,{'id':'edate','name':'edate'});}}};var IndicoUtil={createFormFromMap:function(map,expand){expand=any(expand,false);var labelStyle="style='text-align: right; vertical-align: top;'";var fieldStyle="style='vertical-align: top;'";if(expand){labelStyle="style='white-space:nowrap;'";fieldStyle="style='width:100%;'";}
13var table=$("<table></table>");$(map).each(function(key,item){if(item.length==2){if(!item[1].jquery&&item[1].dom)item[1]=$(item[1].dom);var row=$("<tr style='margin-top:10px;'></tr>");row.append($("<td "+labelStyle+"><label class='popUpLabel'>"+item[0]+"</label></td>"));row.append($("<td "+fieldStyle+"></td>").append($("<div class='popUpTdContent'></div>").append(item[1])));table.append(row);}else{if(item[0]!==undefined&&!item[0].jquery&&item[0].dom)item[0]=$(item[0].dom);table.append($("<tr style='margin-top:10px;'><td></td></tr>").append($("<td "+fieldStyle+"></td>").append(item[0])));}});return table;},formatDateTime:function(date,weekDayOption){if(!exists(weekDayOption)){weekDayOption=0;}
14var dateText=zeropad(date.getDate())+'/'+zeropad(date.getMonth()+1)+'/'+date.getFullYear()+' '+zeropad(date.getHours())+':'+zeropad(date.getMinutes());switch(weekDayOption){case 1:return Indico.Data.WeekDays[date.getDay()]+" "+dateText;
14case 2:return Indico.Data.WeekDays[date.getDay()].substring(0,3)+" "+dateText;case 3:return dateText+" ("+Indico.Data.WeekDays[date.getDay()]+")";case 4:return dateText+" ("+Indico.Data.WeekDays[date.getDay()].substring(0,3)+")";default:return dateText;}},formatDate2:function(date){return''+date.getFullYear()+zeropad(date.getMonth()+1)+zeropad(date.getDate());},parseDateTime:function(strDateTime){strDateTime=strDateTime.split(' ');if(strDateTime.length!=2){return null;}
15var sdate=parseDate(strDateTime[0]);var stime=parseTime(strDateTime[1]);if(!sdate||!stime){return null;}
16var sdatetime=new Date(sdate[2],sdate[1]-1,sdate[0]);setTime(sdatetime,stime);return sdatetime;},parseDate:function(strDate){var sdate=parseDate(strDate);if(!sdate){return null;}
17var sdatetime=new Date(sdate[2],sdate[1]-1,sdate[0]);setTime(sdatetime,[0,0,0,0]);return sdatetime;},parseJsonDate:function(date){var year=parseInt(date.date.substr(0,4),10);var month=parseInt(date.date.substr(5,2),10);var day=parseInt(date.date.substr(8,2),10);var hour=parseInt(date.time.substr(0,2),10);var min=parseInt(date.time.substr(3,2),10);return new Date(year,month-1,day,hour,min);},isInteger:function(s){var isEmpty=function(s){return(!exists(s)||(s.length===0));};var isDigit=function(c){return((c>="0")&&(c<="9"));};var i;if(isEmpty(s)){return false;}
18for(i=0;i<s.length;i++){var c=s.charAt(i);if(!isDigit(c)){return false;}}
19return true;},isTime:function(s){var regExp=new RegExp("(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])$)");return regExp.test(s);},markInvalidField:function(component,error,passive){if(component.dom.type){if(startsWith(component.dom.type,'select')){if(component.dom.className.slice(-13)!="hasError"){component.dom.className+=' hasError';}}else{if(component.dom.className.slice(-7)!="hasError"){component.dom.className+=' hasError';}}}else{if(component.dom.className.slice(-7)!="hasError"){component.dom.className+=' hasError';}}
20var oList=[];var stopObserving=function(){each(oList,function(value){value();});};oList.push(function(){$(component.dom).removeClass('hasError').qtip('destroy');});$(component.dom).qtip({content:{text:error.dom?$(error.dom):error}});if(!passive){$(component.dom).on('keypress change select click',stopObserving);}
21return oList;},parameterManager:function(){var entryList=new WatchList();var classList={};var eventList={};var radioButtonLabelStopObserving={};this.clear=function(){entryList=new WatchList();classList={};eventList={};};this.check=function(){var self=this;var hasErrors=false;entryList.each(function(value){var component=value[0];var dataType=value[1];var allowEmpty=value[2];var extraCheckFunction=value[3];var error=null;if(component.ErrorAware){component.setError(false);}else{component.dom.className=classList[component.dom.id];if(exists(eventList[component.dom.id])){$L(eventList[component.dom.id]).each(function(value){value();});delete eventList[component.dom.id];}}
22if(dataType=="checkBoxList"&&!exists(extraCheckFunction)){if(!allowEmpty&&!self.checkCheckBoxes(component)){error=Html.span({},$T("At least one must be selected"));}}
23else if(dataType=='checkBox'&&!exists(extraCheckFunction)){if(!allowEmpty&&!component.dom.checked){error=Html.span({},$T("Please enable the checkbox"));}}
24else if(dataType=="radio"&&!exists(extraCheckFunction)){if(!allowEmpty&&!self.checkRadioButton(component)){error=Html.span({},$T("Please choose an option"));}}
25else if(dataType=="select"&&!exists(extraCheckFunction)){if(!allowEmpty&&!self.checkSelect(component)){error=Html.span({},$T("Please choose an option"));}}
26else if(dataType=='int'&&!(allowEmpty&&trim(component.get())==='')&&!IndicoUtil.isInteger(component.get())){error=Html.span({},$T("Field must be a number"));}
27else if(dataType=='unsigned_int'&&!(allowEmpty&&trim(component.get())==='')&&(!IndicoUtil.isInteger(component.get())||component.get()<=0)){error=Html.span({},"Field must be a positive number");}
28else if(dataType=='non_negative_int'&&!(allowEmpty&&trim(component.get())==='')&&(!IndicoUtil.isInteger(component.get())||component.get()<0)){error=Html.span({},$T("Field must be a positive number"));}
29else if(dataType=='datetime'&&!(allowEmpty&&trim(component.get())==='')&&!IndicoUtil.parseDateTime(component.get())){error=Html.span({}
29,$T("Date format is not valid. It should be dd/mm/yyyy hh:mm"));}
30else if(dataType=='email'&&!(allowEmpty&&trim(component.get())==='')&&!Util.Validation.isEmailAddress(component.get())){error=Html.span({},$T("Invalid e-mail address"));}
31else if(dataType=='url'&&!(allowEmpty&&trim(component.get())==='')&&!Util.Validation.isURL(component.get())){error=Html.span({},$T("Invalid URL"));}
32else if(dataType=='time'&&!IndicoUtil.isTime(trim(component.get()))){error=Html.span({},$T("Time format is not valid. It should be hh:mm"));}
33else if(!allowEmpty&&component.get()!=null&&(!isString(component.get())||trim(component.get())==='')){error=Html.span({},$T("Field is mandatory"));}
34if(exists(extraCheckFunction)){error=error||extraCheckFunction(component.get());}
35if(exists(error)){hasErrors=true;var oList;if(component.ErrorAware){oList=component.setError(error);}else if(dataType=='checkBoxList'||dataType=='radio'||dataType=='select'){oList=IndicoUtil.markInvalidField(component,error);}else if(component.dom.type!='radio'){oList=IndicoUtil.markInvalidField(component,error);}else{var $label=$('#'+component.dom.id+'Label');var $component=$(component.dom);$label.addClass('invalidLabel');$component.addClass('invalid');$component.add($label).qtip({content:{text:error.dom?$(error.dom):error}});var stopObserving=function(){$component.qtip('destroy');$label.qtip('destroy');};oList=[stopObserving];if(!exists(radioButtonLabelStopObserving[component.dom.name])){radioButtonLabelStopObserving[component.dom.name]=[];}
36radioButtonLabelStopObserving[component.dom.name].push(stopObserving);each($N(component.dom.name),function(component){component.observeEvent('click',function(event){each($N(component.dom.name),function(subcomponent){$(subcomponent.dom).removeClass('invalid');$('#'+subcomponent.dom.id+'Label').removeClass('invalidLabel');});if(exists(radioButtonLabelStopObserving[component.dom.name])){each(radioButtonLabelStopObserving[component.dom.name],function(stopObserver){stopObserver()});}});});}
37if(!component.ErrorAware){eventList[component.dom.id]=oList;}}});return!hasErrors;};this.checkRadioButton=function(component){var name=component.dom.name;var radioButtonChecks=false;var radioButtons=$N(name);each(radioButtons,function(rb){if(rb.dom.checked){radioButtonChecks=true;}});return radioButtonChecks;};this.checkSelect=function(component){return(component.dom.value!="")};this.checkCheckBoxes=function(component){for(var i=0;i<component.dom.childNodes.length;i++){var node=component.dom.childNodes[i];if(node.type=="checkbox"&&node.checked){return true;}}
38return false;};this.add=function(component,dataType,allowEmpty,extraCheckFunction){if(component instanceof jQuery){component=$E(component[0]);}
39entryList.append([component,dataType,allowEmpty,extraCheckFunction]);if(!component.ErrorAware){if(!component.dom.id){component.dom.id=Html.generateId();}
40classList[component.dom.id]=component.dom.className;}
41return component;};this.remove=function(component){if(component instanceof jQuery){component=$E(component[0]);}
42var removeEntry=null;each(entryList,function(entry){if(entry[0]==component){removeEntry=entry;}});if(removeEntry){entryList.remove(removeEntry);}};},compare:function(elem1,elem2){if(elem1>elem2)
43return 1;if(elem1<elem2)
44return-1;if(elem1==elem2)
45return 0;}};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.