зеркало из https://github.com/mozilla/pjs.git
Disable the delete menuitem when no places node is explicitly selected. r=dietrich.
This commit is contained in:
Родитель
eb9f63b5a2
Коммит
b80ae1f003
|
@ -931,7 +931,13 @@
|
|||
this._ensureInitialized();
|
||||
this._contextMenuShown = true;
|
||||
this.focus();
|
||||
return this.controller.buildContextMenu(aPopup);
|
||||
var show = this.controller.buildContextMenu(aPopup);
|
||||
if (show) {
|
||||
// disable the Delete command if the selection isn't explicit
|
||||
if (document.popupNode && document.popupNode.localName == "menupopup")
|
||||
document.getElementById("cmd_delete").setAttribute("disabled", "true");
|
||||
}
|
||||
return false;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
|
|
@ -947,7 +947,13 @@
|
|||
<body><![CDATA[
|
||||
this._contextMenuShown = true;
|
||||
this.focus();
|
||||
return this.controller.buildContextMenu(aPopup);
|
||||
var show = this.controller.buildContextMenu(aPopup);
|
||||
if (show) {
|
||||
// disable the Delete command if the selection isn't explicit
|
||||
if (document.popupNode && document.popupNode.localName == "menupopup")
|
||||
document.getElementById("cmd_delete").setAttribute("disabled", "true");
|
||||
}
|
||||
return false;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче