зеркало из https://github.com/mozilla/gecko-dev.git
Bug 734013 - Implement the pane-switching functionality for the in-content preferences. r=bmcbride
This commit is contained in:
Родитель
fded1bed26
Коммит
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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче