mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 09:49:14 +00:00
Bug 734013 - Implement the pane-switching functionality for the in-content preferences. r=bmcbride
This commit is contained in:
parent
fded1bed26
commit
bff3188a63
@ -23,6 +23,7 @@ function init_all() {
|
||||
}
|
||||
|
||||
function gotoPref(page) {
|
||||
search(page, "data-category");
|
||||
window.history.pushState(page, document.title);
|
||||
updateCommands();
|
||||
}
|
||||
@ -56,3 +57,11 @@ function canGoForward() {
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.canGoForward;
|
||||
}
|
||||
|
||||
function search(aQuery, aAttribute) {
|
||||
let elements = document.getElementById("mainPrefPane").children;
|
||||
for (let element of elements) {
|
||||
let attributeValue = element.getAttribute(aAttribute);
|
||||
element.hidden = (attributeValue != aQuery);
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +88,7 @@
|
||||
</hbox>
|
||||
|
||||
<hbox class="main-content" flex="1">
|
||||
<prefpane flex="1">
|
||||
<prefpane flex="1" id="mainPrefPane">
|
||||
#include landing.xul
|
||||
</prefpane>
|
||||
</hbox>
|
||||
|
Loading…
x
Reference in New Issue
Block a user