X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/pkgs/data-grouping.js diff --git a/pkgs/data-grouping.js b/pkgs/data-grouping.js deleted file mode 100644 index f5d173eb..00000000 --- a/pkgs/data-grouping.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Ext JS Library 3.0.0 - * Copyright(c) 2006-2009 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license - */ -Ext.data.GroupingStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.GroupingStore.superclass.constructor.call(this,a);this.applyGroupField()},remoteGroup:false,groupOnSort:false,groupDir:"ASC",clearGrouping:function(){this.groupField=false;if(this.remoteGroup){if(this.baseParams){delete this.baseParams.groupBy}var a=this.lastOptions;if(a&&a.params){delete a.params.groupBy}this.reload()}else{this.applySort();this.fireEvent("datachanged",this)}},groupBy:function(d,b,c){c=c?(String(c).toUpperCase()=="DESC"?"DESC":"ASC"):this.groupDir;if(this.groupField==d&&this.groupDir==c&&!b){return}this.groupField=d;this.groupDir=c;this.applyGroupField();if(this.groupOnSort){this.sort(d,c);return}if(this.remoteGroup){this.reload()}else{var a=this.sortInfo||{};if(a.field!=d||a.direction!=c){this.applySort()}else{this.sortData(d,c)}this.fireEvent("datachanged",this)}},applyGroupField:function(){if(this.remoteGroup){if(!this.baseParams){this.baseParams={}}this.baseParams.groupBy=this.groupField;this.baseParams.groupDir=this.groupDir}},applySort:function(){Ext.data.GroupingStore.superclass.applySort.call(this);if(!this.groupOnSort&&!this.remoteGroup){var a=this.getGroupState();if(a&&(a!=this.sortInfo.field||this.groupDir!=this.sortInfo.direction)){this.sortData(this.groupField,this.groupDir)}}},applyGrouping:function(a){if(this.groupField!==false){this.groupBy(this.groupField,true,this.groupDir);return true}else{if(a===true){this.fireEvent("datachanged",this)}return false}},getGroupState:function(){return this.groupOnSort&&this.groupField!==false?(this.sortInfo?this.sortInfo.field:undefined):this.groupField}});Ext.reg("groupingstore",Ext.data.GroupingStore); \ No newline at end of file