nnnjjj123
2020-11-17 1b2c1edb61190eeb19f465ff031eaa3b2a1b8dbc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//>>built
require({cache:{"url:dojox/grid/resources/Expando.html":'\x3cdiv class\x3d"dojoxGridExpando"\r\n\t\x3e\x3cdiv class\x3d"dojoxGridExpandoNode" dojoAttachEvent\x3d"onclick:onToggle"\r\n\t\t\x3e\x3cdiv class\x3d"dojoxGridExpandoNodeInner" dojoAttachPoint\x3d"expandoInner"\x3e\x3c/div\r\n\t\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n'}});
define("dijit/registry ../main dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/_base/event dojo/dom-attr dojo/dom-class dojo/dom-style dojo/dom-construct dojo/query dojo/parser dojo/text!./resources/Expando.html dijit/_Widget dijit/_TemplatedMixin ./_View ./_Builder ./util".split(" "),function(x,C,t,y,E,G,k,e,F,H,g,I,u,J,K,L,M,N){t("dojox.grid._Expando",[J,K],{open:!1,toggleClass:"",itemId:"",cellIdx:-1,view:null,rowNode:null,rowIdx:-1,expandoCell:null,level:0,templateString:u,_toggleRows:function(a,
b){if(a&&this.rowNode)if(g("table.dojoxGridRowTableNeedsRowUpdate").length)this._initialized&&this.view.grid.updateRow(this.rowIdx);else{var c=this;if(this.view.grid.treeModel){var d=this._tableRow?k.get(this._tableRow,"dojoxTreeGridPath"):"";d&&g('tr[dojoxTreeGridPath^\x3d"'+d+'/"]',this.rowNode).forEach(function(c){var f=g(".dojoxGridExpando",c)[0];f&&f.parentNode&&f.parentNode.parentNode&&!e.contains(f.parentNode.parentNode,"dojoxGridNoChildren")&&(f=x.byNode(f))&&f._toggleRows(a,f.open&&b);c.style.display=
b?"":"none"})}else g("tr."+a,this.rowNode).forEach(function(a){if(e.contains(a,"dojoxGridExpandoRow")){var f=g(".dojoxGridExpando",a)[0];if(f){var d=x.byNode(f),m=d?d.toggleClass:f.getAttribute("toggleClass"),f=d?d.open:c.expandoCell.getOpenState(f.getAttribute("itemId"));c._toggleRows(m,f&&b)}}a.style.display=b?"":"none"})}},setOpen:function(a){a&&e.contains(this.domNode,"dojoxGridExpandoLoading")&&(a=!1);var b=this.view.grid,c=b.store,d=b.treeModel,m=this;if(b._by_idx[this.rowIdx])if(d&&!this._loadedChildren)if(a){var f=
b.getItem(k.get(this._tableRow,"dojoxTreeGridPath"));f?(this.expandoInner.innerHTML="o",e.add(this.domNode,"dojoxGridExpandoLoading"),d.getChildren(f,function(c){m._loadedChildren=!0;m._setOpen(a)})):this._setOpen(a)}else this._setOpen(a);else!d&&c?a?(d=b._by_idx[this.rowIdx])&&!c.isItemLoaded(d.item)?(this.expandoInner.innerHTML="o",e.add(this.domNode,"dojoxGridExpandoLoading"),c.loadItem({item:d.item,onItem:E.hitch(this,function(f){var d=c.getIdentity(f);b._by_idty[d]=b._by_idx[this.rowIdx]={idty:d,
item:f};this._setOpen(a)})})):this._setOpen(a):this._setOpen(a):this._setOpen(a)},_setOpen:function(a){if(a&&this._tableRow&&e.contains(this._tableRow,"dojoxGridNoChildren"))this._setOpen(!1);else{this.expandoInner.innerHTML=a?"-":"+";e.remove(this.domNode,"dojoxGridExpandoLoading");e.toggle(this.domNode,"dojoxGridExpandoOpened",a);if(this._tableRow){e.toggle(this._tableRow,"dojoxGridRowCollapsed",!a);var b=k.get(this._tableRow,"dojoxTreeGridBaseClasses"),c="",c=a?E.trim((" "+b+" ").replace(" dojoxGridRowCollapsed ",
" ")):0>(" "+b+" ").indexOf(" dojoxGridRowCollapsed ")?b+(b?" ":"")+"dojoxGridRowCollapsed":b;k.set(this._tableRow,"dojoxTreeGridBaseClasses",c)}b=this.open!==a;this.open=a;this.expandoCell&&this.itemId&&(this.expandoCell.openStates[this.itemId]=a);var c=this.view,d=c.grid;this.toggleClass&&b&&(this._tableRow&&this._tableRow.style.display||this._toggleRows(this.toggleClass,a));c&&this._initialized&&0<=this.rowIdx&&(d.rowHeightChanged(this.rowIdx),d.postresize(),c.hasVScrollbar(!0));this._initialized=
!0}},onToggle:function(a){this.setOpen(!this.open);G.stop(a)},setRowNode:function(a,b,c){if(0>this.cellIdx||!this.itemId)return!1;this._initialized=!1;this.view=c;this.rowNode=b;this.rowIdx=a;this.expandoCell=c.structure.cells[0][this.cellIdx];(a=this.domNode)&&a.parentNode&&a.parentNode.parentNode&&(this._tableRow=a.parentNode.parentNode);this.open=this.expandoCell.getOpenState(this.itemId);c.grid.treeModel&&(F.set(this.domNode,"marginLeft",18*this.level+"px"),this.domNode.parentNode&&F.set(this.domNode.parentNode,
"backgroundPosition",18*this.level+3+"px"));this.setOpen(this.open);return!0}});u=t("dojox.grid._TreeContentBuilder",M._ContentBuilder,{generateHtml:function(a,b){var c=this.getTableArray(),d=this.view,m=d.structure.cells[0];a=this.grid.getItem(b);var f=this.grid,e=this.grid.store;N.fire(this.view,"onBeforeRow",[b,[m]]);var g=function(a,b,h,n,l,k){if(k){var z=c.length;n=n||[];var D=n.join("|"),A=n[n.length-1],p=A+(h?" dojoxGridSummaryRow":"");f.treeModel&&b&&!f.treeModel.mayHaveChildren(b)&&(p+=" dojoxGridNoChildren");
c.push('\x3ctr style\x3d"" class\x3d"'+p+'" dojoxTreeGridPath\x3d"'+l.join("/")+'" dojoxTreeGridBaseClasses\x3d"'+p+'"\x3e');for(var t=a+1,p=null,v=0,q;q=m[v];v++){var B=q.markup,u=q.customClasses=[],x=q.customStyles=[];B[5]=q.formatAtLevel(l,b,a,h,A,u);B[1]=u.join(" ");B[3]=x.join(";");c.push.apply(c,B);!p&&q.level===t&&q.parentCell&&(p=q.parentCell)}c.push("\x3c/tr\x3e");b&&e&&e.isItem(b)&&(v=e.getIdentity(b),"undefined"==typeof f._by_idty_paths[v]&&(f._by_idty_paths[v]=l.join("/")));var w,r=l.concat([]);
f.treeModel&&b?f.treeModel.mayHaveChildren(b)&&(h=d.structure.cells[0][f.expandoCell||0],w=h.getOpenState(b)&&k,h=new C.grid.TreePath(l.join("/"),f),h=h.children(!0)||[],y.forEach(h,function(a,b){var c=D.split("|");c.push(c[c.length-1]+"-"+b);r.push(b);g(t,a,!1,c,r,w);r.pop()})):b&&p&&!h?(h=d.structure.cells[0][p.level],w=h.getOpenState(b)&&k,e.hasAttribute(b,p.field)?(k=D.split("|"),k.pop(),h=new C.grid.TreePath(l.join("/"),f),h=h.children(!0)||[],h.length?(c[z]='\x3ctr class\x3d"'+k.join(" ")+' dojoxGridExpandoRow" dojoxTreeGridPath\x3d"'+
l.join("/")+'"\x3e',y.forEach(h,function(a,b){var c=D.split("|");c.push(c[c.length-1]+"-"+b);r.push(b);g(t,a,!1,c,r,w);r.pop()}),r.push(h.length),g(a,b,!0,n,r,w)):c[z]='\x3ctr class\x3d"'+A+' dojoxGridNoChildren" dojoxTreeGridPath\x3d"'+l.join("/")+'"\x3e'):e.isItemLoaded(b)?c[z]='\x3ctr class\x3d"'+A+' dojoxGridNoChildren" dojoxTreeGridPath\x3d"'+l.join("/")+'"\x3e':c[0]=c[0].replace("dojoxGridRowTable","dojoxGridRowTable dojoxGridRowTableNeedsRowUpdate")):b&&!h&&1<n.length&&(c[z]='\x3ctr class\x3d"'+
n[n.length-2]+'" dojoxTreeGridPath\x3d"'+l.join("/")+'"\x3e')}else-1==c[0].indexOf("dojoxGridRowTableNeedsRowUpdate")&&(c[0]=c[0].replace("dojoxGridRowTable","dojoxGridRowTable dojoxGridRowTableNeedsRowUpdate"))};g(0,a,!1,["dojoxGridRowToggle-"+b],[b],!0);c.push("\x3c/table\x3e");return c.join("")},findTarget:function(a,b){for(;a&&a!=this.domNode&&(!a.tagName||"tr"!=a.tagName.toLowerCase());)a=a.parentNode;return a!=this.domNode?a:null},getCellNode:function(a,b){if((a=g("td[idx\x3d'"+b+"']",a)[0])&&
a.parentNode&&!e.contains(a.parentNode,"dojoxGridSummaryRow"))return a},decorateEvent:function(a){a.rowNode=this.findRowTarget(a.target);if(!a.rowNode)return!1;a.rowIndex=k.get(a.rowNode,"dojoxTreeGridPath");this.baseDecorateEvent(a);a.cell=this.grid.getCell(a.cellIndex);return!0}});return t("dojox.grid._TreeView",L,{_contentBuilderClass:u,_onDndDrop:function(a,b,c){this.grid&&this.grid.aggregator&&this.grid.aggregator.clearSubtotalCache();this.inherited(arguments)},postCreate:function(){this.inherited(arguments);
this.connect(this.grid,"_cleanupExpandoCache","_cleanupExpandoCache")},_cleanupExpandoCache:function(a,b,c){if(-1!=a)if(y.forEach(this.grid.layout.cells,function(a){"undefined"!=typeof a.openStates&&b in a.openStates&&delete a.openStates[b]}),"string"==typeof a&&-1<a.indexOf("/")){var d=new C.grid.TreePath(a,this.grid);for(a=d.parent();a;)d=a,a=d.parent();if(d=d.item())if(d=this.grid.store.getIdentity(d),"undefined"!=typeof this._expandos[d]){for(var e in this._expandos[d])(a=this._expandos[d][e])&&
a.destroy(),delete this._expandos[d][e];delete this._expandos[d]}}else{for(e in this._expandos)if("undefined"!=typeof this._expandos[e])for(d in this._expandos[e])(a=this._expandos[e][d])&&a.destroy();this._expandos={}}},postMixInProperties:function(){this.inherited(arguments);this._expandos={}},onBeforeRow:function(a,b){var c=this.grid;c._by_idx&&c._by_idx[a]&&c._by_idx[a].idty&&(c=c._by_idx[a].idty,this._expandos[c]=this._expandos[c]||{});this.inherited(arguments)},onAfterRow:function(a,b,c){y.forEach(g("span.dojoxGridExpando",
c),function(b){if(b&&b.parentNode){var d=b.getAttribute("toggleClass"),f,e,g=this.grid;g._by_idx&&g._by_idx[a]&&g._by_idx[a].idty&&(f=g._by_idx[a].idty,e=this._expandos[f][d]);e?(H.place(e.domNode,b,"replace"),e.itemId=b.getAttribute("itemId"),e.cellIdx=parseInt(b.getAttribute("cellIdx"),10),isNaN(e.cellIdx)&&(e.cellIdx=-1)):f&&(e=I.parse(b.parentNode)[0],this._expandos[f][d]=e);e&&!e.setRowNode(a,c,this)&&e.domNode.parentNode.removeChild(e.domNode)}},this);var d=!1,m=this;g("tr[dojoxTreeGridPath]",
c).forEach(function(a){e.toggle(a,"dojoxGridSubRowAlt",d);k.set(a,"dojoxTreeGridBaseClasses",a.className);d=!d;m.grid.rows.styleRowNode(k.get(a,"dojoxTreeGridPath"),a)});this.inherited(arguments)},updateRowStyles:function(a){var b=g("tr[dojoxTreeGridPath\x3d'"+a+"']",this.domNode);b.length&&this.styleRowNode(a,b[0])},getCellNode:function(a,b){if(a=g("tr[dojoxTreeGridPath\x3d'"+a+"']",this.domNode)[0])return this.content.getCellNode(a,b)},destroy:function(){this._cleanupExpandoCache();this.inherited(arguments)}})});