mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-16 03:34:06 +00:00
Bug 218775 - double clicking an extension should show its options... patch by steffen wilberg. <steffen.wilberg@web.de>
This commit is contained in:
parent
cc623418bf
commit
0433296feb
@ -68,12 +68,12 @@ function extensionSelect()
|
||||
var description = document.getElementById("extDescription");
|
||||
var uninstallButton = document.getElementById("uninstallExtension");
|
||||
var settingsButton = document.getElementById("extensionSettings");
|
||||
|
||||
|
||||
while (description.hasChildNodes())
|
||||
description.removeChild(description.firstChild);
|
||||
|
||||
nameField.setAttribute("value", extName);
|
||||
|
||||
|
||||
author.setAttribute("value", selectedItem.getAttribute("author"));
|
||||
var authorURL = selectedItem.getAttribute("authorURL");
|
||||
if (authorURL != "") {
|
||||
@ -84,9 +84,9 @@ function extensionSelect()
|
||||
author.removeAttribute("link");
|
||||
author.className = "";
|
||||
}
|
||||
|
||||
|
||||
settingsButton.disabled = selectedItem.getAttribute("settingsURL") == "";
|
||||
|
||||
|
||||
description.appendChild(descText);
|
||||
|
||||
updateDisableExtButton(selectedItem);
|
||||
@ -105,7 +105,7 @@ function toggleExtension()
|
||||
var disabled = (selectedItem.getAttribute("disabledState") == "true");
|
||||
chromeRegistry.setAllowOverlaysForPackage(selectedItem.getAttribute("name"), disabled);
|
||||
updateDisableExtButton(selectedItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateDisableExtButton(item)
|
||||
@ -132,3 +132,10 @@ function showSettings()
|
||||
window.openDialog(selectedItem.getAttribute("settingsURL"), "", "chrome,dialog,modal");
|
||||
}
|
||||
|
||||
function onDoubleClick(event)
|
||||
{
|
||||
var settingsButton = document.getElementById("extensionSettings");
|
||||
|
||||
if (!settingsButton.disabled)
|
||||
showSettings();
|
||||
}
|
||||
|
@ -48,12 +48,14 @@
|
||||
|
||||
<stringbundle id="bundle_prefutilities" src="chrome://browser/locale/pref/prefutilities.properties"/>
|
||||
<script type="application/x-javascript" src="chrome://browser/content/pref/pref-extensions.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
|
||||
<vbox flex="1">
|
||||
<label value="&extensionTitle.label;"/>
|
||||
|
||||
|
||||
<listbox id="extList" datasources="rdf:chrome"
|
||||
onselect="extensionSelect();" flex="1"
|
||||
ondblclick="if (isValidLeftClick(event,'listitem')) onDoubleClick(event);"
|
||||
ref="urn:mozilla:package:root" rows="10">
|
||||
<template xmlns:chrome="http://www.mozilla.org/rdf/chrome">
|
||||
<rule chrome:extension="true">
|
||||
@ -88,6 +90,6 @@
|
||||
<button disabled="true" label="&uninstallExtension.label;" oncommand="uninstallExtension();" hidden="true"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
</page>
|
||||
|
||||
</page>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user