Skip to content

Commit

Permalink
HPCC-10371 Reopening a WU Details page fails
Browse files Browse the repository at this point in the history
Dijit.Dialogs need to be specifically destroyed.

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>
  • Loading branch information
GordonSmith committed Nov 11, 2013
1 parent deda88d commit e43bd44
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions esp/files/scripts/WUDetailsWidget.js
Expand Up @@ -114,6 +114,7 @@ define([
this.publishForm = registry.byId(this.id + "PublishForm");

this.infoGridWidget = registry.byId(this.id + "InfoContainer");
this.zapDialog = registry.byId(this.id + "ZapDialog");
},

startup: function (args) {
Expand All @@ -135,12 +136,17 @@ define([
this.variablesGrid.startup();
},

destroy: function (args) {
this.zapDialog.destroyRecursive();
this.inherited(arguments);
},

getTitle: function () {
return "ECL Workunit Details";
},

_onCancelDialog: function (){
registry.byId(this.id + "ZapDialog").hide();
this.zapDialog.hide();
},

// Hitched actions ---
Expand Down Expand Up @@ -188,7 +194,7 @@ define([
WUID: this.wu.Wuid
}
}).then(function (response) {
registry.byId(context.id + "ZapDialog").show();
context.zapDialog.show();
if (lang.exists("WUGetZAPInfoResponse", response)) {
context.updateInput("ZapWUID", null, response.WUGetZAPInfoResponse.WUID);
context.updateInput("BuildVersion", null, response.WUGetZAPInfoResponse.BuildVersion);
Expand All @@ -206,7 +212,7 @@ define([
var frame = iframe.create("ZapDownload" + uniqueID++);
var url = ESPRequest.getBaseURL("WsWorkunits") + "/WUCreateZAPInfo?WUID=" + this.wu.Wuid + "&ESPIPAddress=" + this.espIPAddress + "&ThorIPAddress=" + this.thorIPAddress + "&BuildVersion=" + encodeURIComponent(this.buildVersion);
iframe.setSrc(frame, url, true);
registry.byId(this.id + "ZapDialog").hide();
this.zapDialog.hide();
},

// Implementation ---
Expand Down

0 comments on commit e43bd44

Please sign in to comment.