зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1176908 - Unforget to disable runtime commands in WebIDE. r=jryans
This commit is contained in:
Родитель
b3e9af2a44
Коммит
9833957fd5
|
@ -458,6 +458,39 @@ let UI = {
|
|||
}
|
||||
}
|
||||
|
||||
// Runtime commands
|
||||
let monitorCmd = document.querySelector("#cmd_showMonitor");
|
||||
let screenshotCmd = document.querySelector("#cmd_takeScreenshot");
|
||||
let permissionsCmd = document.querySelector("#cmd_showPermissionsTable");
|
||||
let detailsCmd = document.querySelector("#cmd_showRuntimeDetails");
|
||||
let disconnectCmd = document.querySelector("#cmd_disconnectRuntime");
|
||||
let devicePrefsCmd = document.querySelector("#cmd_showDevicePrefs");
|
||||
let settingsCmd = document.querySelector("#cmd_showSettings");
|
||||
|
||||
if (AppManager.connected) {
|
||||
if (AppManager.deviceFront) {
|
||||
monitorCmd.removeAttribute("disabled");
|
||||
detailsCmd.removeAttribute("disabled");
|
||||
permissionsCmd.removeAttribute("disabled");
|
||||
screenshotCmd.removeAttribute("disabled");
|
||||
}
|
||||
if (AppManager.preferenceFront) {
|
||||
devicePrefsCmd.removeAttribute("disabled");
|
||||
}
|
||||
if (AppManager.settingsFront) {
|
||||
settingsCmd.removeAttribute("disabled");
|
||||
}
|
||||
disconnectCmd.removeAttribute("disabled");
|
||||
} else {
|
||||
monitorCmd.setAttribute("disabled", "true");
|
||||
detailsCmd.setAttribute("disabled", "true");
|
||||
permissionsCmd.setAttribute("disabled", "true");
|
||||
screenshotCmd.setAttribute("disabled", "true");
|
||||
disconnectCmd.setAttribute("disabled", "true");
|
||||
devicePrefsCmd.setAttribute("disabled", "true");
|
||||
settingsCmd.setAttribute("disabled", "true");
|
||||
}
|
||||
|
||||
let runtimePanelButton = document.querySelector("#runtime-panel-button");
|
||||
|
||||
if (AppManager.connected) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче