1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 13:34:13 +01:00

Fix toggling the same.

This commit is contained in:
Kris Maglione
2011-01-02 22:30:48 -05:00
parent 20906772ce
commit edb444640c
2 changed files with 7 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ var ConfigBase = Class("ConfigBase", {
<broadcaster id={"pentadactyl-" + id + "Sidebar"} <broadcaster id={"pentadactyl-" + id + "Sidebar"}
autoCheck="false" type="checkbox" group="sidebar" autoCheck="false" type="checkbox" group="sidebar"
sidebartitle={name} sidebarurl={uri} sidebartitle={name} sidebarurl={uri}
oncommand="toggleSidebar(this.observes);" xmlns={XUL}/> oncommand="toggleSidebar(this.id || this.observes);" xmlns={XUL}/>
} }
util.overlayWindow(window, { append: append.elements() }); util.overlayWindow(window, { append: append.elements() });

View File

@@ -213,8 +213,12 @@ var Config = Module("config", ConfigBase, {
let menu = document.getElementById("viewSidebarMenu"); let menu = document.getElementById("viewSidebarMenu");
for (let [, panel] in Iterator(menu.childNodes)) for (let [, panel] in Iterator(menu.childNodes))
if (compare(panel.label, args[0])) if (compare(panel.getAttribute("label"), args[0])) {
return panel.doCommand(); let elem = document.getElementById(panel.observes);
if (elem)
elem.doCommand();
return;
}
return dactyl.echoerr("No sidebar " + args[0] + " found"); return dactyl.echoerr("No sidebar " + args[0] + " found");
}, },