aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Macdonald2012-10-18 20:48:05 (EDT)
committerskaegi2012-10-18 20:55:41 (EDT)
commitf00b694557c4f292db422a38e1a1bd887f7ea234 (patch)
tree38041b8c0cc964dc271dfad816e6758de1cf1dae
parent9eb0dfffeb8a586cf1b26629204c804fc8a3f892 (diff)
downloadorg.eclipse.orion.client-f00b694557c4f292db422a38e1a1bd887f7ea234.zip
org.eclipse.orion.client-f00b694557c4f292db422a38e1a1bd887f7ea234.tar.gz
org.eclipse.orion.client-f00b694557c4f292db422a38e1a1bd887f7ea234.tar.bz2
Bug 392386 - Make CommandPopupMenuItem consistent with other dijit wrappersv20121019-0055
-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);
+ }
}
});