/*
Product Name: dhtmlxSuite
Version: 4.6
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
*/
window.dhtmlxAjax={get:function(a,c,b){if(b){return dhx4.ajax.getSync(a)}else{dhx4.ajax.get(a,c)}},post:function(a,b,d,c){if(c){return dhx4.ajax.postSync(a,b)}else{dhx4.ajax.post(a,b,d)}},getSync:function(a){return dhx4.ajax.getSync(a)},postSync:function(a,b){return dhx4.ajax.postSync(a,b)}};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){};window.dhtmlxSlider=window.dhtmlXSlider;dhtmlXSlider.prototype.setOnChangeHandler=function(a){if(typeof a=="function"){this.attachEvent("onChange",a)}};dhtmlXSlider.prototype.init=function(){};dhtmlXSlider.prototype.setImagePath=function(){};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;dhtmlXForm.prototype.getItemsList=function(){var d=[];var c=[];for(var b in this.itemPull){var e=null;if(this.itemPull[b]._group){e=this.itemPull[b]._group}else{e=b.replace(this.idPrefix,"")}if(c[e]!=true){d.push(e)}c[e]=true}return d};dhtmlXForm.prototype.setItemText=function(){this.setItemLabel.apply(this,arguments)};dhtmlXForm.prototype.getItemText=function(){return this.getItemLabel.apply(this,arguments)};dhtmlXForm.prototype.loadStructString=function(b,a){this.loadStruct(b,a)};dhtmlXAccordion.prototype.setEffect=function(a){};dhtmlXAccordion.prototype.setIcon=function(b,a){this.cells(b).setIcon(a)};dhtmlXAccordion.prototype.clearIcon=function(a){this.cells(a).clearIcon()};dhtmlXAccordion.prototype.setActive=function(a){this.cells(a).open()};dhtmlXAccordion.prototype.isActive=function(a){return this.cells(a).isOpened()};dhtmlXAccordion.prototype.openItem=function(a){this.cells(a).open()};dhtmlXAccordion.prototype.closeItem=function(a){this.cells(a).close()};dhtmlXAccordion.prototype.moveOnTop=function(a){this.cells(a).moveOnTop()};dhtmlXAccordion.prototype.setItemHeight=function(a){this.cells(id).setHeight(a)};dhtmlXAccordion.prototype.setText=function(b,a){this.cells(b).setText(a)};dhtmlXAccordion.prototype.getText=function(){return this.cells(id).getText()};dhtmlXAccordion.prototype.showItem=function(a){this.cells(a).show()};dhtmlXAccordion.prototype.hideItem=function(a){this.cells(a).hide()};dhtmlXAccordion.prototype.isItemHidden=function(a){return !this.cells(a).isVisible()};dhtmlXAccordion.prototype.loadJSON=function(a,b){this.loadStruct(a,b)};dhtmlXAccordion.prototype.loadXML=function(a,b){this.loadStruct(a,b)};dhtmlXAccordion.prototype.setSkinParameters=function(a,b){if(a!=null){this.setOffset(a)}};dhtmlXLayoutObject.prototype.listViews=function(){return this.listPatterns()};dhtmlXLayoutObject.prototype.setEffect=function(){};dhtmlXLayoutObject.prototype.getEffect=function(){};dhtmlXLayoutObject.prototype.dockWindow=function(a){this.cells(a).dock()};dhtmlXLayoutObject.prototype.unDockWindow=function(a){this.cells(a).undock()};dhtmlXLayoutObject.prototype.setCollapsedText=function(b,a){this.cells(b).setCollapsedText(a)};dhtmlXLayoutObject.prototype.getIdByIndex=function(a){if(a<0||a>this.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