root / trunk / web / dojo / dojox / grid / EnhancedGrid.js @ 13
History | View | Annotate | Download (2.41 KB)
1 |
/*
|
---|---|
2 |
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
3 |
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
4 |
see: http://dojotoolkit.org/license for details
|
5 |
*/
|
6 |
|
7 |
|
8 |
if(!dojo._hasResource["dojox.grid.EnhancedGrid"]){ |
9 |
dojo._hasResource["dojox.grid.EnhancedGrid"]=true; |
10 |
dojo.provide("dojox.grid.EnhancedGrid");
|
11 |
dojo.require("dojox.grid.DataGrid");
|
12 |
dojo.require("dojox.grid.enhanced._Plugin");
|
13 |
dojo.requireLocalization("dojox.grid.enhanced","EnhancedGrid",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw"); |
14 |
dojo.experimental("dojox.grid.EnhancedGrid");
|
15 |
dojo.declare("dojox.grid.EnhancedGrid",dojox.grid.DataGrid,{plugins:null,pluginMgr:null,doubleAffordance:false,minRowHeight:10,keepSortSelection:false,rowSelectionChangedTopic:"ROW_SELECTION_CHANGED",sortRowSelectionChangedTopic:"SORT_ROW_SELECTION_CHANGED",rowMovedTopic:"ROW_MOVED",postMixInProperties:function(){ |
16 |
this._nls=dojo.i18n.getLocalization("dojox.grid.enhanced","EnhancedGrid",this.lang); |
17 |
this.inherited(arguments); |
18 |
},postCreate:function(){ |
19 |
this.pluginMgr=new dojox.grid.enhanced._Plugin(this); |
20 |
this.pluginMgr.preInit();
|
21 |
this.inherited(arguments); |
22 |
this.pluginMgr.postInit();
|
23 |
},_fillContent:function(){ |
24 |
this.menuContainer=this.srcNodeRef; |
25 |
this.inherited(arguments); |
26 |
},startup:function(){ |
27 |
this.menuContainer&&this._initMenus&&this._initMenus(); |
28 |
this.inherited(arguments); |
29 |
if(this.doubleAffordance){ |
30 |
dojo.addClass(this.domNode,"dojoxGridDoubleAffordance"); |
31 |
} |
32 |
},textSizeChanged:function(){ |
33 |
if(!dojo.isWebKit){
|
34 |
this.inherited(arguments); |
35 |
}else{
|
36 |
if(this.textSizeChanging){ |
37 |
return;
|
38 |
} |
39 |
this.textSizeChanging=true; |
40 |
this.inherited(arguments); |
41 |
this.textSizeChanging=false; |
42 |
} |
43 |
},removeSelectedRows:function(){ |
44 |
if(this.indirectSelection&&this._canEdit){ |
45 |
var _1=dojo.clone(this.selection.selected); |
46 |
this.inherited(arguments); |
47 |
dojo.forEach(_1,function(_2,_3){
|
48 |
_2&&this.grid.rowSelectCell.toggleRow(_3,false); |
49 |
}); |
50 |
} |
51 |
},doApplyCellEdit:function(_4,_5,_6){ |
52 |
if(!_6){
|
53 |
this.invalidated[_5]=true; |
54 |
return;
|
55 |
} |
56 |
this.inherited(arguments); |
57 |
},mixin:function(_7,_8){ |
58 |
var _9={};
|
59 |
for(p in _8){ |
60 |
if(p=="_inherited"||p=="declaredClass"||p=="constructor"){ |
61 |
continue;
|
62 |
} |
63 |
_9[p]=_8[p]; |
64 |
} |
65 |
dojo.mixin(_7,_9); |
66 |
},_copyAttr:function(_a,_b){ |
67 |
if(!_b){
|
68 |
return;
|
69 |
} |
70 |
return this.inherited(arguments); |
71 |
}}); |
72 |
dojox.grid.EnhancedGrid.markupFactory=function(_c,_d,_e,_f){ |
73 |
return dojox.grid._Grid.markupFactory(_c,_d,_e,dojo.partial(dojox.grid.DataGrid.cell_markupFactory,_f));
|
74 |
}; |
75 |
} |