X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fstatic%2Funbound_reservation_static%2Flib%2Fdhtmlx_deprecated.js;fp=portal%2Fstatic%2Funbound_reservation_static%2Flib%2Fdhtmlx_deprecated.js;h=04bd5307bf09b3d313661a2ffca38508965ed81f;hb=729a9dbb380b51a217194ba2a4e5978186fe50b0;hp=0000000000000000000000000000000000000000;hpb=c4bd5da6e2630eddf1262aa8d808dbb48b097d53;p=unfold.git diff --git a/portal/static/unbound_reservation_static/lib/dhtmlx_deprecated.js b/portal/static/unbound_reservation_static/lib/dhtmlx_deprecated.js new file mode 100644 index 00000000..04bd5307 --- /dev/null +++ b/portal/static/unbound_reservation_static/lib/dhtmlx_deprecated.js @@ -0,0 +1,9 @@ +/* +Product Name: dhtmlxSuite +Version: 4.2 +Edition: Standard +License: content of this file is covered by GPL. Usage outside GPL terms is prohibited. To obtain Commercial or Enterprise license contact sales@dhtmlx.com +Copyright UAB Dinamenta http://www.dhtmlx.com +*/ + +dhtmlXCalendarObject.prototype.draw=function(){this.show()};dhtmlXCalendarObject.prototype.close=function(){this.hide()};dhtmlXCalendarObject.prototype.setYearsRange=function(){};dhtmlXCombo.prototype.loadXML=function(a,b){this.load(a,b)};dhtmlXCombo.prototype.loadXMLString=function(a){this.load(a)};dhtmlXCombo.prototype.enableOptionAutoHeight=function(){};dhtmlXCombo.prototype.enableOptionAutoPositioning=function(){};dhtmlXCombo.prototype.enableOptionAutoWidth=function(){};dhtmlXCombo.prototype.destructor=function(){this.unload()};dhtmlXCombo.prototype.render=function(){};dhtmlXCombo.prototype.setOptionHeight=function(){};dhtmlXCombo.prototype.attachChildCombo=function(){};dhtmlXCombo.prototype.setAutoSubCombo=function(){};window.dhtmlXColorPickerInput=function(){return dhtmlXColorPicker.apply(window,arguments)};dhtmlXColorPicker.prototype.init=function(){};dhtmlXColorPicker.prototype.setOnSelectHandler=function(a){if(typeof a=="function"){this.attachEvent("onSelect",a)}};dhtmlXColorPicker.prototype.setOnCancelHandler=function(a){if(typeof a=="function"){this.attachEvent("onCancel",a)}};dhtmlXColorPicker.prototype._mergeLangModules=function(){if(typeof dhtmlxColorPickerLangModules!="object"){return}for(var a in dhtmlxColorPickerLangModules){this.i18n[a]=dhtmlxColorPickerLangModules[a]}};window.dhtmlxColorPickerLangModules=dhtmlXColorPicker.prototype.i18n;dhtmlXColorPicker.prototype.close=function(){this.hide()};dhtmlXColorPicker.prototype.setImagePath=function(a){};dhtmlXMenuObject.prototype.loadXML=function(a,b){this.loadStruct(a,b)};dhtmlXMenuObject.prototype.loadXMLString=function(b,a){this.loadStruct(b,a)};dhtmlXMenuObject.prototype.setIconPath=function(a){this.setIconsPath(a)};dhtmlXMenuObject.prototype.setImagePath=function(){};dhtmlXToolbarObject.prototype.loadXML=function(a,b){this.loadStruct(a,b)};dhtmlXToolbarObject.prototype.loadXMLString=function(b,a){this.loadStruct(b,a)};dhtmlXToolbarObject.prototype.setIconPath=function(a){this.setIconsPath(a)};dhtmlXTreeObject.prototype.addPath=function(b,e,c,h){this.activatePaths();c=c||{};var d=[];var g=null;var f=this._idpull[e];var a=this._idpull[b];while(a!=g){d.push({open:this._getOpenState(f),from:f.id,size:(g?this._getIndex(g):0),to:(g?g.id:null),style:"border-left:"+(c.width||1)+"px "+(c.mode||"solid")+" "+(c.color||"red")+"; border-bottom:"+(c.width||1)+"px "+(c.mode||"solid")+" "+(c.color||"red")+";"});g=f;f=f.parentObject}while(!h||this._pathspull[h]){h=(h||0)+1}this._pathspull[h]={path:d,id:h};this._paths.push(this._pathspull[h]);this._renderPath(this._pathspull[h])};dhtmlXTreeObject.prototype.activatePaths=function(a){var b=this;this.attachEvent("onOpenEnd",function(){for(var c=0;c0;b--){var a=c.path[b];if(a._html){a._html.parentNode.removeChild(a._html)}a._html=null}};dhtmlXTreeObject.prototype._renderPath=function(g){var k=this._idpull[g.path[g.path.length-1].from].span.parentNode.parentNode;var f=(_isIE?9:8)+this._halfHeight;var e=(_isIE?27:27);while(k.offsetParent!=this.allTree){f+=k.offsetTop;e+=k.offsetLeft;k=k.offsetParent}for(var b=g.path.length-1;b>0;b--){var a=g.path[b];var h=document.createElement("div");if(!this._idpull[a.to].tr.offsetHeight){return}var j=this._idpull[a.to].tr.offsetTop;h.style.cssText="position:absolute; z-index:1; width:"+(_isIE?10:8)+"px; height:"+(j-9)+"px; left:"+e+"px; top:"+f+"px;"+a.style;f+=j;e+=18;this.allTree.appendChild(h);a._html=h}};dhtmlXTreeObject.prototype.deletePath=function(c){var b=this._pathspull[c];if(b){this._clearPath(b);delete this._pathspull[c];for(var a=0;a=0;a--){this.deletePath(this._paths[a].id)}};dhtmlXTreeObject.prototype._paths=[];dhtmlXTreeObject.prototype._pathspull={};dhtmlXTreeObject.prototype.enableSmartRendering=function(){this.enableSmartXMLParsing(true);this._srnd=true;this.itemHeight=18;var a=this;this.allTree.onscroll=function(){if(a._srndT){return}a._srndT=window.setTimeout(function(){a._srndT=null;a._renderState()},300)};this.attachEvent("onXLE",function(){a._renderState()});this._singleTimeSRND()};dhtmlXTreeObject.prototype._renderState=function(){if(!this._idpull[this.rootId]._sready){this.prepareSR(this.rootId,true)}var b=this.allTree.scrollTop;var c=Math.floor(b/this.itemHeight);var a=Math.ceil(this.allTree.offsetHeight/this.itemHeight);this._group_render=true;this._getItemByPos(b,this.itemHeight,a,null,false,this._renderItemSRND);this._group_render=false};dhtmlXTreeObject.prototype._renderItemSRND=function(k,j){if(!k.span){k.span=-1;var f=k.parentObject.htmlNode.childNodes[0].childNodes;var e=j*this.itemHeight;var l=null;for(var c=1;c1){if(((f[1].style.display!="none")||(g==1))&&(g!=2)){this.allTree.childNodes[0].border="1";this.allTree.childNodes[0].border="0";var e="none";c._open=false}else{var e="";c._open=true}for(var d=1;d   
";var f=this.makePivotSelect(this._column_list);f.style.width="80px";f.onchange=function(){if(this.value!=-1){h._pivotS.value=this.value}else{h._pivotS.value=""}h._reFillPivotLists();h._renderPivot2()};var e=this.makePivotSelect(this._column_list);e.onchange=function(){if(this.value!=-1){h._pivotS.x=this.value}else{h._pivotS.x=""}h._reFillPivotLists();h._renderPivot()};var d=this.makePivotSelect(this._column_list);d.onchange=function(){if(this.value!=-1){h._pivotS.y=this.value}else{h._pivotS.y=""}h._reFillPivotLists();h._renderPivot()};var c=this.makePivotSelect(["Sum","Min","Max","Average","Count"],-1);c.style.width="70px";c.onchange=function(){if(this.value!=-1){h._pivotS.action=this.value}else{h._pivotS.action=null}h._renderPivot2()};if(a.readonly){f.disabled=e.disabled=d.disabled=c.disabled=true}j.firstChild.rows[0].cells[0].appendChild(c);j.firstChild.rows[0].cells[0].appendChild(f);j.firstChild.rows[0].cells[2].appendChild(e);var b=j.childNodes[1];b.style.width=j.offsetWidth+"px";b.style.height=j.offsetHeight-20+"px";b.style.overflow="hidden";this._pgridCont=b;this._pgridSelect=[f,e,d,c];this._pData=this._fetchPivotData();this._pUNI=[];this._pivotS={action:(a.action||"0"),value:(typeof a.value!="undefined"?(a.value||"0"):null),x:(typeof a.x!="undefined"?(a.x||"0"):null),y:(typeof a.y!="undefined"?(a.y||"0"):null)};f.value=this._pivotS.value;e.value=this._pivotS.x;d.value=this._pivotS.y;c.value=this._pivotS.action;h._reFillPivotLists();this._renderPivot()};dhtmlXGridObject.prototype._fetchPivotData=function(){var e=[];for(var b=0;b=0;h--){if(g[h]==d&&f[h]==o){k+=this.parseFloat(e[h])}}return k};dhtmlXGridObject.prototype._pivot_action_1=function(m,l,k,d,n,j){ret=9999999999;var g=j[m];var f=j[l];var e=j[k];for(var h=g.length-1;h>=0;h--){if(g[h]==d&&f[h]==n){ret=Math.min(this.parseFloat(e[h]),ret)}}if(ret==9999999999){ret=""}return ret};dhtmlXGridObject.prototype._pivot_action_2=function(m,l,k,d,n,j){ret=-9999999999;var g=j[m];var f=j[l];var e=j[k];for(var h=g.length-1;h>=0;h--){if(g[h]==d&&f[h]==n){ret=Math.max(this.parseFloat(e[h]),ret)}}if(ret==-9999999999){ret=""}return ret};dhtmlXGridObject.prototype._pivot_action_3=function(o,n,m,d,p,j){var l=0;var k=0;var g=j[o];var f=j[n];var e=j[m];for(var h=g.length-1;h>=0;h--){if(g[h]==d&&f[h]==p){l+=this.parseFloat(e[h]);k++}}return k?l/k:""};dhtmlXGridObject.prototype._pivot_action_4=function(o,n,m,d,p,j){var l=0;var k=0;var g=j[o];var f=j[n];var e=j[m];for(var h=g.length-1;h>=0;h--){if(g[h]==d&&f[h]==p){l++}}return l};dhtmlXGridObject.prototype.parseFloat=function(a){a=parseFloat(a);if(isNaN(a)){return 0}return a};dhtmlXGridObject.prototype._renderPivot2=function(){if(!(this._pivotS.x&&this._pivotS.y&&this._pivotS.value&&this._pivotS.action)){return}var d=this["_pivot_action_"+this._pivotS.action];var a=this._getUniList(this._pivotS.x);var e=this._getUniList(this._pivotS.y);for(var c=0;c=0;d--){e[this._pData[c][d]]=true}for(var f in e){if(e[f]===true){b.push(f)}}this._pUNI[c]=b.sort()}return this._pUNI[c]};dhtmlXGridObject.prototype._fillPivotList=function(e,d,c,a){if(!c){c={};a=-1}e.innerHTML="";e.options[e.options.length]=new Option("-select-",-1);for(var b=0;b=0;c--){d++;b=h.charAt(c)+b;if(!e&&d==g){b="."+b;d=0;e=true}if(e&&d==3&&c!=0&&h.charAt(c-1)!="-"){b=","+b;d=0}}this.setCValue(b,h)}}eXcell_dec.prototype=new eXcell_ed;function eXcell_cor(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid;this.combo=this.grid.getCombo(this.cell._cellIndex);this.editable=true}this.shiftNext=function(){var b=this.list.options[this.list.selectedIndex+1];if(b){b.selected=true}this.obj.value=this.list.value;return true};this.shiftPrev=function(){var b=this.list.options[this.list.selectedIndex-1];if(b){b.selected=true}this.obj.value=this.list.value;return true};this.edit=function(){this.val=this.getValue();this.text=this.cell.innerHTML._dhx_trim();var d=this.grid.getPosition(this.cell);this.obj=document.createElement("TEXTAREA");this.obj.className="dhx_combo_edit";this.obj.style.height=(this.cell.offsetHeight-4)+"px";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(g){(g||event).cancelBubble=true};this.obj.value=this.text;this.list=document.createElement("SELECT");this.list.editor_obj=this;this.list.className="dhx_combo_select";this.list.style.width=this.cell.offsetWidth+"px";this.list.style.left=d[0]+"px";this.list.style.top=d[1]+this.cell.offsetHeight+"px";this.list.onclick=function(i){var h=i||window.event;var g=h.target||h.srcElement;if(g.tagName=="OPTION"){g=g.parentNode}if(g.value!=-1){g.editor_obj._byClick=true;g.editor_obj.editable=false;g.editor_obj.grid.editStop()}else{h.cancelBubble=true;g.editor_obj.obj.value="";g.editor_obj.obj.focus()}};var b=this.combo.getKeys();var f=0;this.list.options[0]=new Option(this.combo.get(b[0]),b[0]);this.list.options[0].selected=true;for(var c=1;c=18)&&(this.obj.offsetHeight<40)){this.obj.style.height="36px";this.obj.style.overflow="scroll"}}this.obj.onselectstart=function(b){if(!b){b=event}b.cancelBubble=true;return true};this.obj.focus();this.obj.focus()};this.getValue=function(){return this.cell._rval};this.setValue=function(c){var b="*****";this.cell.innerHTML=b;this.cell._rval=c};this.detach=function(){this.setValue(this.obj.value);return this.val!=this.getValue()}}eXcell_passw.prototype=new eXcell;function eXcell_num(a){try{this.cell=a;this.grid=this.cell.parentNode.grid}catch(b){}this.edit=function(){this.val=this.getValue();this.obj=document.createElement(_isKHTML?"INPUT":"TEXTAREA");this.obj.className="dhx_combo_edit";this.obj.style.height=(this.cell.offsetHeight-4)+"px";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(c){(c||event).cancelBubble=true};this.obj.value=this.val;this.cell.innerHTML="";this.cell.appendChild(this.obj);this.obj.onselectstart=function(c){if(!c){c=event}c.cancelBubble=true;return true};this.obj.focus();this.obj.focus()};this.getValue=function(){if((this.cell.firstChild)&&(this.cell.firstChild.tagName=="TEXTAREA")){return this.cell.firstChild.value}else{return this.grid._aplNFb(this.cell.innerHTML.toString()._dhx_trim(),this.cell._cellIndex)}};this.setValue=function(d){var c=new RegExp("[a-z]|[A-Z]","i");if(d.match(c)){d=" "}this.cell.innerHTML=d};this.detach=function(){var c=this.obj.value;this.setValue(c);return this.val!=this.getValue()}}eXcell_num.prototype=new eXcell;function eXcell_mro(a){this.cell=a;this.grid=this.cell.parentNode.grid;this.edit=function(){}}eXcell_mro.prototype=new eXcell;eXcell_mro.prototype.getValue=function(){return this.cell.childNodes[0].innerHTML._dhx_trim()};eXcell_mro.prototype.setValue=function(a){if(!this.cell.childNodes.length){this.cell.style.whiteSpace="normal";this.cell.innerHTML="
"}if(!a||a.toString()._dhx_trim()==""){a=" "}this.cell.childNodes[0].innerHTML=a};function eXcell_liveedit(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid}this.edit=function(){this.cell.inputObj.focus();this.cell.inputObj.focus()};this.detach=function(){this.setValue(this.cell.inputObj.value)};this.getValue=function(){return this.cell.inputObj?this.cell.inputObj.value:""};this.destructor=function(){};this.onFocus=function(){var b=this.grid.callEvent("onEditCell",[0,this.cell.parentNode.idd,this.cell._cellIndex]);if(b===false){this.cell.inputObj.blur()}};this.onBlur=function(){var b=this.grid.callEvent("onEditCell",[2,this.cell.parentNode.idd,this.cell._cellIndex]);this.detach()};this.onChange=function(){var b=this.grid.callEvent("onCellChanged",[this.cell.parentNode.idd,this.cell._cellIndex,this.cell.inputObj.value]);this.detach()}}eXcell_liveedit.prototype=new eXcell_ed;eXcell_liveedit.prototype.setValue=function(b){var a=this;this.cell.innerHTML='';this.cell.inputObj=this.cell.firstChild;this.cell.inputObj=this.cell.firstChild;this.cell.inputObj.value=b;this.cell.inputObj.onfocus=function(){a.onFocus()};this.cell.inputObj.onblur=function(){a.onFocus()};this.cell.inputObj.onchange=function(){a.onChange()}};if(window.eXcell_math){eXcell_liveedit.prototype.setValueA=eXcell_liveedit.prototype.setValue;eXcell_liveedit.prototype.setValue=eXcell_math.prototype._NsetValue}function eXcell_limit(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid}this.edit=function(){this.cell.atag=((!this.grid.multiLine)&&(_isKHTML||_isMacOS||_isFF))?"INPUT":"TEXTAREA";this.val=this.getValue();this.obj=document.createElement(this.cell.atag);this.obj.style.height=(this.cell.offsetHeight-(_isIE?6:4))+"px";this.obj.className="dhx_combo_edit";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(b){(b||event).cancelBubble=true};this.obj.onmousedown=function(b){(b||event).cancelBubble=true};this.obj.value=this.val;this.cell.innerHTML="";this.cell.appendChild(this.obj);if(_isFF){this.obj.style.overflow="visible";if((this.grid.multiLine)&&(this.obj.offsetHeight>=18)&&(this.obj.offsetHeight<40)){this.obj.style.height="36px";this.obj.style.overflow="scroll"}}this.obj.onkeypress=function(b){if(this.value.length>=15){return false}};this.obj.onselectstart=function(b){if(!b){b=event}b.cancelBubble=true;return true};this.obj.focus();this.obj.focus()};this.getValue=function(){if((this.cell.firstChild)&&((this.cell.atag)&&(this.cell.firstChild.tagName==this.cell.atag))){return this.cell.firstChild.value}else{return this.cell.innerHTML.toString()._dhx_trim()}};this.setValue=function(b){if(b.length>15){this.cell.innerHTML=b.substring(0,14)}else{this.cell.innerHTML=b}};this.detach=function(){this.setValue(this.obj.value);return this.val!=this.getValue()}}eXcell_limit.prototype=new eXcell;if(window.dhtmlxHierarchy){if(window.dhtmlXCellObject){dhtmlXCellObject.prototype.attachPropertyGrid=function(){var a=this.attachGrid();new dhtmlXPropertyGrid(a);return a}}function eXcell_tree_property(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid}this.isDisabled=function(){return true};this.getValue=function(){return this.cell.parentNode.valTag.innerHTML}}eXcell_tree_property.prototype=new eXcell_tree;eXcell_tree_property.prototype.setValue=function(a){if(this.cell.parentNode.imgTag){return this.setLabel(a)}if((this.grid._tgc.iconTree==null)||(this.grid._tgc.iconTree!=this.grid.iconTree)){var d={};d.imst="";d.plus=d.imst+"plus.gif"+d.imact;d.minus=d.imst+"minus.gif"+d.imact;d.blank=d.imst+"blank.gif"+d.imact;d.start="
";d.itemim="";d.close="
";this.grid._tgc=d}var e=this.grid._h2;var d=this.grid._tgc;var c=this.cell.parentNode.idd;var f=this.grid._h2.get[c];if(this.grid.kidsXmlFile||this.grid._slowParse){f.has_kids=(f.has_kids||(this.cell.parentNode._attrs.xmlkids&&(f.state!="minus")));f._xml_await=!!f.has_kids}f.image=f.image||(this.cell._attrs.image||"leaf.gif");f.label=a;var b=[d.start];if(f.has_kids){b.push(d.plus);f.state="plus"}else{b.push(d.imst+f.state+".gif"+d.imact+d.itemim)}b.push(f.label);b.push(d.close);this.cell.innerHTML=b.join("");this.cell.style.paddingLeft="0px";this.cell.parentNode.imgTag=this.cell.childNodes[0].childNodes[0];this.cell.parentNode.valTag=this.cell.childNodes[0].childNodes[1];if(f.childs.length){this.grid.getRowById(this.cell.parentNode.idd)._attrs["class"]=" dhx_parent_row ";this.cell.nextSibling.style.borderLeft="1px solid #D4D0C8"}if(_isKHTML){this.cell.vAlign="top"}if(f.parent.id!=0&&f.parent.state=="plus"){this.grid._updateTGRState(f.parent,false);this.cell.parentNode._skipInsert=true}this.grid.callEvent("onCellChanged",[c,this.cell._cellIndex,a])}}function eXcell_list(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid}this.edit=function(){this.cell.innerHTML="";this.obj=this.cell.firstChild;this.obj.onclick=function(f){(f||event).cancelBubble=true};this.obj.onmousedown=function(f){(f||event).cancelBubble=true};this.obj.onkeydown=function(g){var f=(g||event);if(f.keyCode==9||f.keyCode==13){globalActiveDHTMLGridObject.entBox.focus();globalActiveDHTMLGridObject.doKey({keyCode:f.keyCode,shiftKey:f.shiftKey,srcElement:"0"});return false}f.cancelBubble=true};var b=this;this.obj.onchange=function(){b.grid.editStop();b=null};var d=this.getAttribute("values").split(",");for(var c=0;cthis.items.length-1){return null}var b=null;this.forEachItem(function(c){if(b==null&&c==this.items[a]){b=c.conf.name}});return b};dhtmlXLayoutObject.prototype.getIndexById=function(d){var a=this.cells(d);var b=-1;for(var c=0;c