Pārlūkot izejas kodu

Merge pull request #5592 from GordonSmith/HPCC-11058_SelecteAllLZ

HPCC-11058 LandingZone Deselection Fails

Reviewed-By: Miguel Vazquez <miguel.vazquez@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 11 gadi atpakaļ
vecāks
revīzija
3cc85f65e6
2 mainītis faili ar 6 papildinājumiem un 8 dzēšanām
  1. 5 2
      esp/src/eclwatch/ESPUtil.js
  2. 1 6
      esp/src/eclwatch/LZBrowseWidget.js

+ 5 - 2
esp/src/eclwatch/ESPUtil.js

@@ -193,11 +193,14 @@ define([
                 });
             },
 
-            getSelected: function() {
+            getSelected: function(store) {
+                if (!store) {
+                    store = this.store;
+                }
                 var retVal = [];
                 for (var id in this.selection) {
                     if (this.selection[id]) {
-                        var storeItem = this.store.get(id);
+                        var storeItem = store.get(id);
                         if (storeItem) {
                             retVal.push(storeItem);
                         }

+ 1 - 6
esp/src/eclwatch/LZBrowseWidget.js

@@ -407,12 +407,7 @@ define([
                     modifiedtime: { label: this.i18n.Date, width: 180, sortable: false }
                 },
                 getSelected: function () {
-                    var retVal = [];
-                    var store = FileSpray.CreateFileListStore();
-                    for (var key in this.selection) {
-                        retVal.push(store.get(key));
-                    }
-                    return retVal;
+                    return this.inherited(arguments, [FileSpray.CreateFileListStore()]);
                 }
             }, this.id + "LandingZonesGrid");
             this.landingZonesGrid.set("noDataMessage", "<span class='dojoxGridNoData'>" + this.i18n.noDataMessage + "</span>");