mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-15 09:42:37 +02:00
moving all - non ancient ;-) - js files to api/js
This commit is contained in:
19
api/js/dhtmlxtree/codebase/ext/dhtmlxtree_dragin.js
Normal file
19
api/js/dhtmlxtree/codebase/ext/dhtmlxtree_dragin.js
Normal file
@ -0,0 +1,19 @@
|
||||
//v.3.6 build 131023
|
||||
|
||||
/*
|
||||
Copyright DHTMLX LTD. http://www.dhtmlx.com
|
||||
You allowed to use this component or parts of it under GPL terms
|
||||
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
|
||||
*/
|
||||
dhtmlXTreeObject.prototype.makeDraggable=function(a,b){typeof a!="object"&&(a=document.getElementById(a));dragger=new dhtmlDragAndDropObject;dropper=new dhx_dragSomethingInTree;dragger.addDraggableItem(a,dropper);a.dragLanding=null;a.ondragstart=dropper._preventNsDrag;a.onselectstart=new Function("return false;");a.parentObject={};a.parentObject.img=a;a.parentObject.treeNod=dropper;dropper._customDrop=b};dhtmlXTreeObject.prototype.makeDragable=dhtmlXTreeObject.prototype.makeDraggable;
|
||||
dhtmlXTreeObject.prototype.makeAllDraggable=function(a){for(var b=document.getElementsByTagName("div"),c=0;c<b.length;c++)b[c].getAttribute("dragInDhtmlXTree")&&this.makeDragable(b[c],a)};
|
||||
function dhx_dragSomethingInTree(){this.lWin=window;this._createDragNode=function(a){var b=document.createElement("div");b.style.position="absolute";b.innerHTML=a.innerHTML||a.value;b.className="dragSpanDiv";return b};this._preventNsDrag=function(a){(a||window.event).cancelBubble=!0;a&&a.preventDefault&&a.preventDefault();return!1};this._nonTrivialNode=function(a,b,c,d){if(this._customDrop)return this._customDrop(a,d.img.id,b.id,c?c.id:null);var e=d.img.getAttribute("image")||"",f=d.img.id||"new",
|
||||
g=d.img.getAttribute("text")||(_isIE?d.img.innerText:d.img.textContent);a[c?"insertNewNext":"insertNewItem"](c?c.id:b.id,f,g,"",e,e,e)}};
|
||||
|
||||
//v.3.6 build 131023
|
||||
|
||||
/*
|
||||
Copyright DHTMLX LTD. http://www.dhtmlx.com
|
||||
You allowed to use this component or parts of it under GPL terms
|
||||
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
|
||||
*/
|
23
api/js/dhtmlxtree/codebase/ext/dhtmlxtree_ed.js
Normal file
23
api/js/dhtmlxtree/codebase/ext/dhtmlxtree_ed.js
Normal file
@ -0,0 +1,23 @@
|
||||
//v.3.6 build 131023
|
||||
|
||||
/*
|
||||
Copyright DHTMLX LTD. http://www.dhtmlx.com
|
||||
You allowed to use this component or parts of it under GPL terms
|
||||
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
|
||||
*/
|
||||
dhtmlXTreeObject.prototype.enableItemEditor=function(c){this._eItEd=convertStringToBoolean(c);if(!this._eItEdFlag)this._edn_dblclick=this._edn_click_IE=!0,this._ie_aFunc=this.aFunc,this._ie_dblclickFuncHandler=this.dblclickFuncHandler,this.setOnDblClickHandler(function(a,b){this._edn_dblclick&&this._editItem(a,b);return!0}),this.setOnClickHandler(function(a,b){this._stopEditItem(a,b);this.ed_hist_clcik==a&&this._edn_click_IE&&this._editItem(a,b);this.ed_hist_clcik=a;return!0}),this._eItEdFlag=!0};
|
||||
dhtmlXTreeObject.prototype.setOnEditHandler=function(c){this.attachEvent("onEdit",c)};dhtmlXTreeObject.prototype.setEditStartAction=function(c,a){this._edn_click_IE=convertStringToBoolean(c);this._edn_dblclick=convertStringToBoolean(a)};
|
||||
dhtmlXTreeObject.prototype._stopEdit=function(c,a){if(this._editCell&&(this.dADTempOff=this.dADTempOffEd,this._editCell.id!=c)){var b=!0;a?(b=!1,this.callEvent("onEditCancel",[this._editCell.id,this._editCell._oldValue])):b=this.callEvent("onEdit",[2,this._editCell.id,this,this._editCell.span.childNodes[0].value]);if(b===!0)b=this._editCell.span.childNodes[0].value;else if(b===!1)b=this._editCell._oldValue;var d=b!=this._editCell._oldValue;this._editCell.span.innerHTML=b;this._editCell.label=this._editCell.span.innerHTML;
|
||||
var e=this._editCell.i_sel?"selectedTreeRow":"standartTreeRow";this._editCell.span.className=e;this._editCell.span.parentNode.className="standartTreeRow";this._editCell.span.style.paddingRight=this._editCell.span.style.paddingLeft="5px";this._editCell.span.onclick=this._editCell.span.ondblclick=function(){};var f=this._editCell.id;this.childCalc&&this._fixChildCountLabel(this._editCell);this._editCell=null;a||this.callEvent("onEdit",[3,f,this,d]);this._enblkbrd&&(this.parentObject.lastChild.focus(),
|
||||
this.parentObject.lastChild.focus())}};dhtmlXTreeObject.prototype._stopEditItem=function(c){this._stopEdit(c)};dhtmlXTreeObject.prototype.stopEdit=function(c){this._editCell&&this._stopEdit(this._editCell.id+"_non",c)};dhtmlXTreeObject.prototype.editItem=function(c){this._editItem(c,this)};
|
||||
dhtmlXTreeObject.prototype._editItem=function(c){if(this._eItEd){this._stopEdit();var a=this._globalIdStorageFind(c);if(a){var b=this.callEvent("onEdit",[0,c,this,a.span.innerHTML]);if(b===!0)b=typeof a.span.innerText!="undefined"?a.span.innerText:a.span.textContent;else if(b===!1)return;this.dADTempOffEd=this.dADTempOff;this.dADTempOff=!1;this._editCell=a;a._oldValue=b;a.span.innerHTML="<input type='text' class='intreeeditRow' />";a.span.style.paddingRight=a.span.style.paddingLeft="0px";a.span.onclick=
|
||||
a.span.ondblclick=function(a){(a||event).cancelBubble=!0};a.span.childNodes[0].value=b;a.span.childNodes[0].onselectstart=function(a){return(a||event).cancelBubble=!0};a.span.childNodes[0].onmousedown=function(a){return(a||event).cancelBubble=!0};a.span.childNodes[0].focus();a.span.childNodes[0].focus();a.span.onclick=function(a){(a||event).cancelBubble=!0;return!1};a.span.className="";a.span.parentNode.className="";var d=this;a.span.childNodes[0].onkeydown=function(a){if(!a)a=window.event;a.keyCode==
|
||||
13?(a.cancelBubble=!0,d._stopEdit(window.undefined)):a.keyCode==27&&d._stopEdit(window.undefined,!0);(a||event).cancelBubble=!0};this.callEvent("onEdit",[1,c,this])}}};
|
||||
|
||||
//v.3.6 build 131023
|
||||
|
||||
/*
|
||||
Copyright DHTMLX LTD. http://www.dhtmlx.com
|
||||
You allowed to use this component or parts of it under GPL terms
|
||||
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
|
||||
*/
|
21
api/js/dhtmlxtree/codebase/ext/dhtmlxtree_er.js
Normal file
21
api/js/dhtmlxtree/codebase/ext/dhtmlxtree_er.js
Normal file
@ -0,0 +1,21 @@
|
||||
//v.3.6 build 131023
|
||||
|
||||
/*
|
||||
Copyright DHTMLX LTD. http://www.dhtmlx.com
|
||||
You allowed to use this component or parts of it under GPL terms
|
||||
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
|
||||
*/
|
||||
var g=[];dhtmlXTreeObject.prototype._createSelfA2=dhtmlXTreeObject.prototype._createSelf;dhtmlXTreeObject.prototype._createSelf=function(){g[g.length]=this;return this._createSelfA2()};
|
||||
window.onerror=function(e,d,a,c){c=document.createElement("DIV");c.style.cssText="position:absolute; background-color:white; top:10px; left:10px; z-index:20; width:500px; border: 2px silver outset;";var b="<div style='width:100%; color:red; font-size:8pt; font-family:Arial; font-weight:bold; '>Javascript Error</div>";b+="<div style='width:100%; font-size:8pt; font-family:Arial; '>The next error ocured :<br/> <strong>"+e+"</strong> in <strong>"+d+"</strong> at line <strong>"+a+"</strong></div>";b+=
|
||||
"<div style='width:100%; font-size:8pt; font-family:Arial; '>If you think that error can be caused by dhtmlxtree press the 'Generate report' button and send generated report to <a href='email:support@dhtmlx.com'>support@dhtmlx.com</a> </div>";b+="<input style='font-size:8pt; font-family:Arial; ' onclick='dhtmlxtreeReport(this)' type='button' value='Generate report'/><input style='font-size:8pt; font-family:Arial; ' type='button' value='Close' onclick='this.parentNode.parentNode.removeChild(this.parentNode);'/>";
|
||||
b+="<div/>";c.innerHTML=b;document.body.appendChild(c);return!0};function dhtmlxtreeErrorReport(e,d,a){var c=e+" ["+d+"]";e=="LoadXML"&&(c+="<br/>"+a[0].responseText+"</br>"+a[0].status);window.onerror(c,"none","none")}
|
||||
function dhtmlxtreeReport(e){var d=e.parentNode;d.lastChild.innerHTML="<textarea style='width:100%; height:300px;'></textarea>";for(var a=d.childNodes[1].innerHTML,c=0;c<g.length;c++){var b=g[c];a+="\n\n Tree "+c+"\n";for(b in b)typeof b[b]!="function"&&(a+=b+"="+b[b]+"\n");a+="---------------------\n";if(b.XMLLoader)try{var i=b.XMLLoader.getXMLTopNode("tree");if(document.all)a+=i.xml+"\n";else{var j=new XMLSerializer;a+=j.serializeToString(i)+"\n"}}catch(l){a+="XML not recognised\n"}a+="---------------------\n";
|
||||
for(var k in b._idpull){var f=b._idpull[k];if(typeof f=="object"){a+="Node: "+f.id;a+=" Childs: "+f.childsCount;for(var h=0;h<f.childsCount;h++)a+=" ch"+h+":"+f.childNodes[h].id;a+="\n"}}}d.lastChild.childNodes[0].value=a}dhtmlxError.catchError("ALL",dhtmlxtreeErrorReport);
|
||||
|
||||
//v.3.6 build 131023
|
||||
|
||||
/*
|
||||
Copyright DHTMLX LTD. http://www.dhtmlx.com
|
||||
You allowed to use this component or parts of it under GPL terms
|
||||
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
|
||||
*/
|
29
api/js/dhtmlxtree/codebase/ext/dhtmlxtree_json.js
Normal file
29
api/js/dhtmlxtree/codebase/ext/dhtmlxtree_json.js
Normal file
@ -0,0 +1,29 @@
|
||||
//v.3.6 build 131023
|
||||
|
||||
/*
|
||||
Copyright DHTMLX LTD. http://www.dhtmlx.com
|
||||
You allowed to use this component or parts of it under GPL terms
|
||||
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
|
||||
*/
|
||||
function jsonPointer(a,b){this.d=a;this.dp=b}
|
||||
jsonPointer.prototype={text:function(){var a=function(a){for(var f=[],c=0;c<a.length;c++)f.push("{"+b(a[c])+"}");return f.join(",")},b=function(d){var f=[],c;for(c in d)typeof d[c]=="object"?c.length?f.push('"'+c+'":['+a(d[c])+"]"):f.push('"'+c+'":{'+b(d[c])+"}"):f.push('"'+c+'":"'+d[c]+'"');return f.join(",")};return"{"+b(this.d)+"}"},get:function(a){return this.d[a]},exists:function(){return!!this.d},content:function(){return this.d.content},each:function(a,b,d){var f=this.d[a],c=new jsonPointer;
|
||||
if(f)for(var e=0;e<f.length;e++)c.d=f[e],b.apply(d,[c,e])},get_all:function(){return this.d},sub:function(a){return new jsonPointer(this.d[a],this.d)},sub_exists:function(a){return!!this.d[a]},each_x:function(a,b,d,f,c){var e=this.d[a],g=new jsonPointer(0,this.d);if(e)for(c=c||0;c<e.length;c++)if(e[c][b]&&(g.d=e[c],d.apply(f,[g,c])==-1))break},up:function(){return new jsonPointer(this.dp,this.d)},set:function(a,b){this.d[a]=b},clone:function(){return new jsonPointer(this.d,this.dp)},through:function(a,
|
||||
b,d,f,c){var e=this.d[a];if(e.length)for(var g=0;g<e.length;g++){if(e[g][b]!=null&&e[g][b]!=""&&(!d||e[g][b]==d)){var h=new jsonPointer(e[g],this.d);f.apply(c,[h,g])}var i=this.d;this.d=e[g];this.sub_exists(a)&&this.through(a,b,d,f,c);this.d=i}}};
|
||||
dhtmlXTreeObject.prototype.loadJSArrayFile=function(a,b){this.parsCount||this.callEvent("onXLS",[this,this._ld_id]);this._ld_id=null;this.xmlstate=1;var d=this;this.XMLLoader=new dtmlXMLLoaderObject(function(a,b,e,g,h){eval("var z="+h.xmlDoc.responseText);d.loadJSArray(z)},this,!0,this.no_cashe);if(b)this.XMLLoader.waitCall=b;this.XMLLoader.loadXML(a)};
|
||||
dhtmlXTreeObject.prototype.loadCSV=function(a,b){this.parsCount||this.callEvent("onXLS",[this,this._ld_id]);this._ld_id=null;this.xmlstate=1;var d=this;this.XMLLoader=new dtmlXMLLoaderObject(function(a,b,e,g,h){d.loadCSVString(h.xmlDoc.responseText)},this,!0,this.no_cashe);if(b)this.XMLLoader.waitCall=b;this.XMLLoader.loadXML(a)};
|
||||
dhtmlXTreeObject.prototype.loadJSArray=function(a,b){for(var d=[],f=0;f<a.length;f++)d[a[f][1]]||(d[a[f][1]]=[]),d[a[f][1]].push({id:a[f][0],text:a[f][2]});var c={id:this.rootId},e=function(a,b){if(d[a.id]){a.item=d[a.id];for(var c=0;c<a.item.length;c++)b(a.item[c],b)}};e(c,e);this.loadJSONObject(c,b)};
|
||||
dhtmlXTreeObject.prototype.loadCSVString=function(a,b){for(var d=[],f=a.split("\n"),c=0;c<f.length;c++){var e=f[c].split(",");d[e[1]]||(d[e[1]]=[]);d[e[1]].push({id:e[0],text:e[2]})}var g={id:this.rootId},h=function(a,b){if(d[a.id]){a.item=d[a.id];for(var c=0;c<a.item.length;c++)b(a.item[c],b)}};h(g,h);this.loadJSONObject(g,b)};
|
||||
dhtmlXTreeObject.prototype.loadJSONObject=function(a,b){this.parsCount||this.callEvent("onXLS",[this,null]);this.xmlstate=1;var d=new jsonPointer(a);this._parse(d);this._p=d;b&&b()};
|
||||
dhtmlXTreeObject.prototype.loadJSON=function(a,b){this.parsCount||this.callEvent("onXLS",[this,this._ld_id]);this._ld_id=null;this.xmlstate=1;var d=this;this.XMLLoader=new dtmlXMLLoaderObject(function(a,b,e,g,h){try{eval("var t="+h.xmlDoc.responseText)}catch(i){dhtmlxError.throwError("LoadXML","Incorrect JSON",[h.xmlDoc,this]);return}var j=new jsonPointer(t);d._parse(j);d._p=j},this,!0,this.no_cashe);if(b)this.XMLLoader.waitCall=b;this.XMLLoader.loadXML(a)};
|
||||
dhtmlXTreeObject.prototype.serializeTreeToJSON=function(){for(var a=['{"id":"'+this.rootId+'", "item":['],b=[],d=0;d<this.htmlNode.childsCount;d++)b.push(this._serializeItemJSON(this.htmlNode.childNodes[d]));a.push(b.join(","));a.push("]}");return a.join("")};
|
||||
dhtmlXTreeObject.prototype._serializeItemJSON=function(a){var b=[];if(a.unParsed)return a.unParsed.text();var d=this._selected.length?this._selected[0].id:"",f=a.span.innerHTML,f=f.replace(/\"/g,'\\"',f);this._xfullXML?b.push('{ "id":"'+a.id+'", '+(this._getOpenState(a)==1?' "open":"1", ':"")+(d==a.id?' "select":"1",':"")+' "text":"'+f+'", "im0":"'+a.images[0]+'", "im1":"'+a.images[1]+'", "im2":"'+a.images[2]+'" '+(a.acolor?', "aCol":"'+a.acolor+'" ':"")+(a.scolor?', "sCol":"'+a.scolor+'" ':"")+(a.checkstate==
|
||||
1?', "checked":"1" ':a.checkstate==2?', "checked":"-1"':"")+(a.closeable?', "closeable":"1" ':"")+(this.XMLsource&&a.XMLload==0?', "child":"1" ':"")):b.push('{ "id":"'+a.id+'", '+(this._getOpenState(a)==1?' "open":"1", ':"")+(d==a.id?' "select":"1",':"")+' "text":"'+f+'"'+(this.XMLsource&&a.XMLload==0?', "child":"1" ':""));if(this._xuserData&&a._userdatalist){b.push(', "userdata":[');for(var c=a._userdatalist.split(","),e=[],g=0;g<c.length;g++)e.push('{ "name":"'+c[g]+'" , "content":"'+a.userData["t_"+
|
||||
c[g]]+'" }');b.push(e.join(","));b.push("]")}if(a.childsCount){b.push(', "item":[');e=[];for(g=0;g<a.childsCount;g++)e.push(this._serializeItemJSON(a.childNodes[g]));b.push(e.join(","));b.push("]\n")}b.push("}\n");return b.join("")};
|
||||
|
||||
//v.3.6 build 131023
|
||||
|
||||
/*
|
||||
Copyright DHTMLX LTD. http://www.dhtmlx.com
|
||||
You allowed to use this component or parts of it under GPL terms
|
||||
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
|
||||
*/
|
20
api/js/dhtmlxtree/codebase/ext/dhtmlxtree_start.js
Normal file
20
api/js/dhtmlxtree/codebase/ext/dhtmlxtree_start.js
Normal file
@ -0,0 +1,20 @@
|
||||
//v.3.6 build 131023
|
||||
|
||||
/*
|
||||
Copyright DHTMLX LTD. http://www.dhtmlx.com
|
||||
You allowed to use this component or parts of it under GPL terms
|
||||
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
|
||||
*/
|
||||
function dhtmlXTreeFromHTML(a){typeof a!="object"&&(a=document.getElementById(a));for(var b=a,l=b.id,e="",d=0;d<a.childNodes.length;d++)if(a.childNodes[d].nodeType=="1"){if(a.childNodes[d].tagName=="XMP")for(var j=a.childNodes[d],g=0;g<j.childNodes.length;g++)e+=j.childNodes[g].data;else a.childNodes[d].tagName.toLowerCase()=="ul"&&(e=dhx_li2trees(a.childNodes[d],[],0));break}a.innerHTML="";var c=new dhtmlXTreeObject(a,"100%","100%",0),k=[];for(b in c)k[b.toLowerCase()]=b;for(var f=a.attributes,h=
|
||||
0;h<f.length;h++)if(f[h].name.indexOf("set")==0||f[h].name.indexOf("enable")==0){var m=f[h].name;c[m]||(m=k[f[h].name]);c[m].apply(c,f[h].value.split(","))}if(typeof e=="object"){c.XMLloadingWarning=1;for(var i=0;i<e.length;i++)b=c.insertNewItem(e[i][0],e[i][3],e[i][1]),e[i][2]&&c._setCheck(b,e[i][2]);c.XMLloadingWarning=0;c.lastLoadedXMLId=0;c._redrawFrom(c)}else c.loadXMLString("<tree id='0'>"+e+"</tree>");window[l]=c;var n=a.getAttribute("oninit");n&&eval(n);return c}
|
||||
function dhx_init_trees(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)a[b].className=="dhtmlxTree"&&dhtmlXTreeFromHTML(a[b])}
|
||||
function dhx_li2trees(a,b,l){for(var e=0;e<a.childNodes.length;e++){var d=a.childNodes[e];if(d.nodeType==1&&d.tagName.toLowerCase()=="li"){for(var j="",g=null,c=d.getAttribute("checked"),k=0;k<d.childNodes.length;k++){var f=d.childNodes[k];f.nodeType==3?j+=f.data:f.tagName.toLowerCase()!="ul"?j+=dhx_outer_html(f):g=f}b[b.length]=[l,j,c,d.id||b.length+1];g&&(b=dhx_li2trees(g,b,d.id||b.length))}}return b}
|
||||
function dhx_outer_html(a){if(a.outerHTML)return a.outerHTML;var b=document.createElement("DIV");b.appendChild(a.cloneNode(!0));return b=b.innerHTML}window.addEventListener?window.addEventListener("load",dhx_init_trees,!1):window.attachEvent&&window.attachEvent("onload",dhx_init_trees);
|
||||
|
||||
//v.3.6 build 131023
|
||||
|
||||
/*
|
||||
Copyright DHTMLX LTD. http://www.dhtmlx.com
|
||||
You allowed to use this component or parts of it under GPL terms
|
||||
To use it on other terms or get Professional edition of the component please contact us at sales@dhtmlx.com
|
||||
*/
|
Reference in New Issue
Block a user