Bug 1482351 - Add placeholder for calendar preferences, and remove it if Lightning is not enabled. r=aceman,MakeMyDay
This commit is contained in:
Родитель
274345af14
Коммит
35d55a8af9
|
@ -16,13 +16,8 @@ var gLightningPane = {
|
|||
ltnPrefs.addEventListener("select", gLightningPane.tabSelectionChanged.bind(this));
|
||||
this.mInitialized = true;
|
||||
|
||||
let prefTab = document.documentElement;
|
||||
let lightningButton = prefTab._makePaneButton(document.getElementById("paneLightning"));
|
||||
let advancedButton = document.querySelector('#category-box radio[pane="paneAdvanced"]');
|
||||
advancedButton.parentNode.insertBefore(lightningButton, advancedButton);
|
||||
|
||||
// We probably messed this up just by existing. Fix it.
|
||||
prefTab._paneDeck.selectedIndex = prefTab._selector.selectedIndex;
|
||||
let categoryButton = document.querySelector('#category-box radio[pane="paneLightning"]');
|
||||
categoryButton.label = document.getElementById("paneLightning").label;
|
||||
|
||||
let elements = document.querySelectorAll("#paneLightning preference");
|
||||
for (let element of elements) {
|
||||
|
|
|
@ -52,5 +52,6 @@
|
|||
#include privacy.inc.xul
|
||||
#include security.inc.xul
|
||||
#include applications.inc.xul
|
||||
<prefpane id="paneLightning"/>
|
||||
#include advanced.inc.xul
|
||||
</preftab>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
ChromeUtils.import("resource:///modules/MailServices.jsm");
|
||||
ChromeUtils.import("resource:///modules/extensionSupport.jsm");
|
||||
|
||||
window.addEventListener("load", function() {
|
||||
let prefWindow = document.getElementById("MailPreferences");
|
||||
|
@ -15,6 +16,13 @@ window.addEventListener("load", function() {
|
|||
prefWindow.showPane(document.getElementById("paneGeneral"));
|
||||
radio.hidden = true;
|
||||
}
|
||||
if (!ExtensionSupport.loadedLegacyExtensions.has("{e2fda1a4-762b-4020-b5ad-a41df1933103}")) {
|
||||
let radio =
|
||||
document.getAnonymousElementByAttribute(prefWindow, "pane", "paneLightning");
|
||||
if (radio.selected)
|
||||
prefWindow.showPane(document.getElementById("paneGeneral"));
|
||||
radio.hidden = true;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче