summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMark Macdonald2012-10-18 20:48:05 (EDT)
committer skaegi2012-10-18 20:55:41 (EDT)
commit44af893ca39e84bc095f6d6669ecb05829cd5870 (patch)
tree38041b8c0cc964dc271dfad816e6758de1cf1dae
parent0dd8b53f8d194ce79dfb2c253d6ae07cc16561f5 (diff)
downloadorg.eclipse.orion.client-44af893ca39e84bc095f6d6669ecb05829cd5870.zip
org.eclipse.orion.client-44af893ca39e84bc095f6d6669ecb05829cd5870.tar.gz
org.eclipse.orion.client-44af893ca39e84bc095f6d6669ecb05829cd5870.tar.bz2
Bug 392386 - Make CommandPopupMenuItem consistent with other dijit wrappers
-Support a DomNode for its 'label' attribute
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/commands.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/commands.js b/bundles/org.eclipse.orion.client.core/web/orion/commands.js
index d43015e..9fd9ac5 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/commands.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/commands.js
@@ -169,7 +169,12 @@ define(['i18n!orion/nls/messages', 'require', 'dojo', 'dijit', 'orion/uiUtils',
var CommandPopupMenuItem = dojo.declare(dijit.PopupMenuItem, {
// Override setter for 'label' attribute to prevent the use of innerHTML
_setLabelAttr: function(content) {
- this.containerNode.textContent = content;
+ if (typeof content === "string") {
+ this.containerNode.textContent = content;
+ } else {
+ dojo.empty(this.containerNode);
+ this.containerNode.appendChild(content);
+ }
}
});