sync
authorAlan Knowles <alan@roojs.com>
Tue, 23 Mar 2021 08:33:46 +0000 (16:33 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 23 Mar 2021 08:33:46 +0000 (16:33 +0800)
Roo/grid/Grid.js
Roo/util/Observable.js
roojs-all.js
roojs-core-debug.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 804f069..3b3d47a 100644 (file)
@@ -755,6 +755,11 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, {
     getView : function(){
         if(!this.view){
             this.view = new Roo.grid.GridView(this.viewConfig);
+           this.relayEvents(this.view, [
+               "beforerowremoved", "beforerowsinserted",
+               "beforerefresh", "rowremoved",
+               "rowsinserted", "rowupdated" ,"refresh"
+           ]);
         }
         return this.view;
     },
index 0bb6870..1735439 100644 (file)
@@ -188,12 +188,15 @@ Roo.util.Observable.prototype = {
     relayEvents : function(o, events){
         var createHandler = function(ename){
             return function(){
+                
                 return this.fireEvent.apply(this, Roo.combine(ename, Array.prototype.slice.call(arguments, 0)));
             };
         };
         for(var i = 0, len = events.length; i < len; i++){
             var ename = events[i];
-            if(!this.events[ename]){ this.events[ename] = true; };
+            if(!this.events[ename]){
+               this.events[ename] = true;
+           };
             o.on(ename, createHandler(ename), this);
         }
     },
index dc21778..3786462 100644 (file)
@@ -2315,8 +2315,8 @@ var ds=this.dataSource;if(cs.length==1&&ds.getAt(D)==cs[0]){A='dblclick';}}if(!A
 },onContextMenu:function(e,t){this.processEvent("contextmenu",e);},onDblClick:function(e){this.processEvent("dblclick",e);},walkCells:function(A,B,C,fn,D){var cm=this.colModel,E=cm.getColumnCount();var ds=this.dataSource,F=ds.getCount(),G=true;if(C<0){if(B<0){A--;
 G=false;}while(A>=0){if(!G){B=E-1;}G=false;while(B>=0){if(fn.call(D||this,A,B,cm)===true){return [A,B];}B--;}A--;}}else{if(B>=E){A++;G=false;}while(A<F){if(!G){B=0;}G=false;while(B<E){if(fn.call(D||this,A,B,cm)===true){return [A,B];}B++;}A++;}}return null;
 },getSelections:function(){return this.selModel.getSelections();},autoSize:function(){if(this.rendered){this.view.layout();if(this.view.adjustForScroll){this.view.adjustForScroll();}}},getGridEl:function(){return this.container;},stopEditing:function(){},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.grid.RowSelectionModel();
-}return this.selModel;},getDataSource:function(){return this.dataSource;},getColumnModel:function(){return this.colModel;},getView:function(){if(!this.view){this.view=new Roo.grid.GridView(this.viewConfig);}return this.view;},getDragDropText:function(){var A=this.selModel.getCount();
-return String.format(this.ddText,A,A==1?'':'s');}});
+}return this.selModel;},getDataSource:function(){return this.dataSource;},getColumnModel:function(){return this.colModel;},getView:function(){if(!this.view){this.view=new Roo.grid.GridView(this.viewConfig);this.relayEvents(this.view,["beforerowremoved","beforerowsinserted","beforerefresh","rowremoved","rowsinserted","rowupdated","refresh"]);
+}return this.view;},getDragDropText:function(){var A=this.selModel.getCount();return String.format(this.ddText,A,A==1?'':'s');}});
 // Roo/grid/AbstractGridView.js
 Roo.grid.AbstractGridView=function(){this.grid=null;this.events={"beforerowremoved":true,"beforerowsinserted":true,"beforerefresh":true,"rowremoved":true,"rowsinserted":true,"rowupdated":true,"refresh":true};Roo.grid.AbstractGridView.superclass.constructor.call(this);
 };Roo.extend(Roo.grid.AbstractGridView,Roo.util.Observable,{rowClass:"x-grid-row",cellClass:"x-grid-cell",tdClass:"x-grid-td",hdClass:"x-grid-hd",splitClass:"x-grid-hd-split",init:function(A){this.grid=A;var B=this.grid.getGridEl().id;this.colSelector="#"+B+" ."+this.cellClass+"-";
index 697592c..dbe892c 100644 (file)
@@ -5949,12 +5949,15 @@ Roo.util.Observable.prototype = {
     relayEvents : function(o, events){
         var createHandler = function(ename){
             return function(){
+                
                 return this.fireEvent.apply(this, Roo.combine(ename, Array.prototype.slice.call(arguments, 0)));
             };
         };
         for(var i = 0, len = events.length; i < len; i++){
             var ename = events[i];
-            if(!this.events[ename]){ this.events[ename] = true; };
+            if(!this.events[ename]){
+               this.events[ename] = true;
+           };
             o.on(ename, createHandler(ename), this);
         }
     },
index 257bcc4..d0b2174 100644 (file)
@@ -5949,12 +5949,15 @@ Roo.util.Observable.prototype = {
     relayEvents : function(o, events){
         var createHandler = function(ename){
             return function(){
+                
                 return this.fireEvent.apply(this, Roo.combine(ename, Array.prototype.slice.call(arguments, 0)));
             };
         };
         for(var i = 0, len = events.length; i < len; i++){
             var ename = events[i];
-            if(!this.events[ename]){ this.events[ename] = true; };
+            if(!this.events[ename]){
+               this.events[ename] = true;
+           };
             o.on(ename, createHandler(ename), this);
         }
     },
@@ -55843,6 +55846,11 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, {
     getView : function(){
         if(!this.view){
             this.view = new Roo.grid.GridView(this.viewConfig);
+           this.relayEvents(this.view, [
+               "beforerowremoved", "beforerowsinserted",
+               "beforerefresh", "rowremoved",
+               "rowsinserted", "rowupdated" ,"refresh"
+           ]);
         }
         return this.view;
     },
index a0f42ec..c20c019 100644 (file)
@@ -32838,6 +32838,11 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, {
     getView : function(){
         if(!this.view){
             this.view = new Roo.grid.GridView(this.viewConfig);
+           this.relayEvents(this.view, [
+               "beforerowremoved", "beforerowsinserted",
+               "beforerefresh", "rowremoved",
+               "rowsinserted", "rowupdated" ,"refresh"
+           ]);
         }
         return this.view;
     },
index 902b377..668c182 100644 (file)
@@ -1421,8 +1421,8 @@ var ds=this.dataSource;if(cs.length==1&&ds.getAt(D)==cs[0]){A='dblclick';}}if(!A
 },onContextMenu:function(e,t){this.processEvent("contextmenu",e);},onDblClick:function(e){this.processEvent("dblclick",e);},walkCells:function(A,B,C,fn,D){var cm=this.colModel,E=cm.getColumnCount();var ds=this.dataSource,F=ds.getCount(),G=true;if(C<0){if(B<0){A--;
 G=false;}while(A>=0){if(!G){B=E-1;}G=false;while(B>=0){if(fn.call(D||this,A,B,cm)===true){return [A,B];}B--;}A--;}}else{if(B>=E){A++;G=false;}while(A<F){if(!G){B=0;}G=false;while(B<E){if(fn.call(D||this,A,B,cm)===true){return [A,B];}B++;}A++;}}return null;
 },getSelections:function(){return this.selModel.getSelections();},autoSize:function(){if(this.rendered){this.view.layout();if(this.view.adjustForScroll){this.view.adjustForScroll();}}},getGridEl:function(){return this.container;},stopEditing:function(){},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.grid.RowSelectionModel();
-}return this.selModel;},getDataSource:function(){return this.dataSource;},getColumnModel:function(){return this.colModel;},getView:function(){if(!this.view){this.view=new Roo.grid.GridView(this.viewConfig);}return this.view;},getDragDropText:function(){var A=this.selModel.getCount();
-return String.format(this.ddText,A,A==1?'':'s');}});
+}return this.selModel;},getDataSource:function(){return this.dataSource;},getColumnModel:function(){return this.colModel;},getView:function(){if(!this.view){this.view=new Roo.grid.GridView(this.viewConfig);this.relayEvents(this.view,["beforerowremoved","beforerowsinserted","beforerefresh","rowremoved","rowsinserted","rowupdated","refresh"]);
+}return this.view;},getDragDropText:function(){var A=this.selModel.getCount();return String.format(this.ddText,A,A==1?'':'s');}});
 // Roo/grid/AbstractGridView.js
 Roo.grid.AbstractGridView=function(){this.grid=null;this.events={"beforerowremoved":true,"beforerowsinserted":true,"beforerefresh":true,"rowremoved":true,"rowsinserted":true,"rowupdated":true,"refresh":true};Roo.grid.AbstractGridView.superclass.constructor.call(this);
 };Roo.extend(Roo.grid.AbstractGridView,Roo.util.Observable,{rowClass:"x-grid-row",cellClass:"x-grid-cell",tdClass:"x-grid-td",hdClass:"x-grid-hd",splitClass:"x-grid-hd-split",init:function(A){this.grid=A;var B=this.grid.getGridEl().id;this.colSelector="#"+B+" ."+this.cellClass+"-";