Skip to content
This repository has been archived by the owner on Oct 27, 2019. It is now read-only.

Commit

Permalink
HUE-145. Launching HUE help app after closing it fails
Browse files Browse the repository at this point in the history
* removing errant .orig file
* changing usage of the deprecated .destroyed property on widgets to the .isDestroyed() method
* fixing the showHelp launcher
  • Loading branch information
anutron committed Aug 12, 2010
1 parent c330fd4 commit bda50b2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/help/src/help/static/js/Source/Help/Help.js
Expand Up @@ -44,6 +44,6 @@ var Help = new Class({
return path.replace('/help/', '');
}
});
if (!CCS.Desktop.helpInstance || CCS.Desktop.helpInstance.destroyed) CCS.Desktop.helpInstance = this;
if (!CCS.Desktop.helpInstance || CCS.Desktop.helpInstance.isDestroyed()) CCS.Desktop.helpInstance = this;
}
});
11 changes: 8 additions & 3 deletions desktop/core/static/js/Source/CCS/CCS.Desktop.js
Expand Up @@ -297,7 +297,7 @@ CCS.Desktop = {
instances.each(function(instance) {
//if it has a serialize method and it's not destroyed
//store its serialization
if (instance.serialize && !instance.destroyed) state[component].push(instance.serialize());
if (instance.serialize && !instance.isDestroyed()) state[component].push(instance.serialize());
});
});
//return the object of all the states
Expand Down Expand Up @@ -528,8 +528,13 @@ CCS.Desktop = {

showHelp: function(componentOrInstance, url) {
var data = this.getBootstrap(componentOrInstance) || {};
if (this.healthInstance && !this.healthInstance.destroyed && data.help) this.healthInstance.load({ requestPath: url || data.help }).focus();
else this.healthInstance = CCS.Desktop.launch('Help', data.help);
if (this.healthInstance && !this.healthInstance.isDestroyed() && (url || data.help)) {
this.healthInstance.load({ requestPath: url || data.help }).focus();
} else {
CCS.Desktop.launch('Help', data.help, function(instance) {
if (instance) this.healthInstance = instance;
}.bind(this));
}
}

};
Expand Down
2 changes: 1 addition & 1 deletion ext/thirdparty/js/art-widgets.hash
@@ -1 +1 @@
9bbccdd1056faa716874312dff00264293388f1a
64154fa1c0dce2a58654fcd308f17ac538b54c1a
5 changes: 0 additions & 5 deletions ext/thirdparty/js/art-widgets.hash.orig

This file was deleted.

0 comments on commit bda50b2

Please sign in to comment.