فهرست منبع

Merge pull request #5678 from GordonSmith/HPCC-11189

HPCC-11189 onContentChanged is no longer needed

Reviewed-By: Kevin Wang <kevin.wang@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 11 سال پیش
والد
کامیت
5b82f4f2ea

+ 0 - 3
esp/src/eclwatch/DFUQueryWidget.js

@@ -499,9 +499,6 @@ define([
             this.workunitsGrid.onSelectionChanged(function (event) {
                 context.refreshActionState();
             });
-            this.workunitsGrid.onContentChanged(function (object, removedFrom, insertedInto) {
-                context.refreshActionState();
-            });
             this.workunitsGrid.startup();
 
             this.copyGrid.createGrid({

+ 1 - 18
esp/src/eclwatch/ESPUtil.js

@@ -149,7 +149,6 @@ define([
 
         GridHelper: declare(null, {
             allowTextSelection: true,
-            __hpcc_pagedGridObserver: [],
             noDataMessage: "<span class='dojoxGridNoData'>" + nlsHPCC.noDataMessage + "</span>",
             loadingMessage: "<span class='dojoxGridNoData'>" + nlsHPCC.loadingMessage + "</span>",
 
@@ -178,27 +177,11 @@ define([
 
             onSelectionChanged: function (callback) {
                 this.onSelectedChangedCallback = callback;
-                this.on("dgrid-select, dgrid-deselect", function (event) {
+                this.on("dgrid-select, dgrid-deselect, dgrid-refresh-complete", function (event) {
                     callback(event);
                 });
             },
 
-            onContentChanged: function (callback) {
-                var context = this;
-                this.on("dgrid-page-complete", function (event) {
-                    callback();
-                    if (context.__hpcc_pagedGridObserver[event.page]) {
-                        context.__hpcc_pagedGridObserver[event.page].cancel();
-                    }
-                    context.__hpcc_pagedGridObserver[event.page] = event.results.observe(function (object, removedFrom, insertedInto) {
-                        callback(object, removedFrom, insertedInto);
-                    }, true);
-                });
-                this.on("dgrid-children-complete", function (event) {
-                    callback();
-                });
-            },
-
             setSelection: function (arrayOfIDs) {
                 this.clearSelection();
                 var context = this;

+ 0 - 3
esp/src/eclwatch/EventScheduleWorkunitWidget.js

@@ -189,9 +189,6 @@ define([
             this.eventGrid.onSelectionChanged(function (event) {
                 context.refreshActionState();
             });
-            this.eventGrid.onContentChanged(function (object, removedFrom, insertedInto) {
-                context.refreshActionState();
-            });
             this.eventGrid.startup();
             this.refreshActionState();
         },

+ 0 - 3
esp/src/eclwatch/GetDFUWorkunitsWidget.js

@@ -387,9 +387,6 @@ define([
             this.workunitsGrid.onSelectionChanged(function (event) {
                 context.refreshActionState();
             });
-            this.workunitsGrid.onContentChanged(function (object, removedFrom, insertedInto) {
-                context.refreshActionState();
-            });
             this.workunitsGrid.startup();
         },
 

+ 0 - 3
esp/src/eclwatch/GridDetailsWidget.js

@@ -135,9 +135,6 @@ define([
             this.grid.onSelectionChanged(function (event) {
                 context._refreshActionState();
             });
-            this.grid.onContentChanged(function (object, removedFrom, insertedInto) {
-                context._refreshActionState();
-            });
             this.grid.startup();
         },
 

+ 0 - 3
esp/src/eclwatch/LZBrowseWidget.js

@@ -424,9 +424,6 @@ define([
             this.landingZonesGrid.onSelectionChanged(function (event) {
                 context.refreshActionState();
             });
-            this.landingZonesGrid.onContentChanged(function (object, removedFrom, insertedInto) {
-                context.refreshActionState();
-            });
             this.landingZonesGrid.startup();
 
             this.sprayFixedGrid.createGrid({

+ 0 - 3
esp/src/eclwatch/QuerySetQueryWidget.js

@@ -420,9 +420,6 @@ define([
             this.querySetGrid.onSelectionChanged(function (event) {
                 context.refreshActionState();
             });
-            this.querySetGrid.onContentChanged(function (event) {
-                context.refreshActionState();
-            });
             this.querySetGrid.startup();
             this.refreshActionState();
         },

+ 0 - 6
esp/src/eclwatch/UserQueryWidget.js

@@ -252,9 +252,6 @@ define([
             this.groupsGrid.onSelectionChanged(function (event) {
                 context.refreshActionState();
             });
-            this.groupsGrid.onContentChanged(function (event) {
-                context.refreshActionState();
-            });
             this.groupsGrid.startup();
         },
 
@@ -349,9 +346,6 @@ define([
             this.usersGrid.onSelectionChanged(function (event) {
                 context.refreshActionState();
             });
-            this.usersGrid.onContentChanged(function (event) {
-                context.refreshActionState();
-            });
             this.usersGrid.startup();
         },
 

+ 0 - 3
esp/src/eclwatch/WUQueryWidget.js

@@ -426,9 +426,6 @@ define([
             this.workunitsGrid.onSelectionChanged(function (event) {
                 context.refreshActionState();
             });
-            this.workunitsGrid.onContentChanged(function (object, removedFrom, insertedInto) {
-                context.refreshActionState();
-            });
             this.workunitsGrid.startup();
         },