зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1013872 - [appmgr v2] runtime button doesn't turn blue if not project is selected. r=janx r=ochameau
This commit is contained in:
Родитель
263196efad
Коммит
4316558bf0
|
@ -245,8 +245,7 @@ let UI = {
|
||||||
},
|
},
|
||||||
|
|
||||||
updateRuntimeButton: function() {
|
updateRuntimeButton: function() {
|
||||||
let buttonNode = document.querySelector("#runtime-panel-button");
|
let labelNode = document.querySelector("#runtime-panel-button > .panel-button-label");
|
||||||
let labelNode = buttonNode.querySelector(".panel-button-label");
|
|
||||||
if (!AppManager.selectedRuntime) {
|
if (!AppManager.selectedRuntime) {
|
||||||
labelNode.setAttribute("value", Strings.GetStringFromName("runtimeButton_label"));
|
labelNode.setAttribute("value", Strings.GetStringFromName("runtimeButton_label"));
|
||||||
} else {
|
} else {
|
||||||
|
@ -375,8 +374,6 @@ let UI = {
|
||||||
document.querySelector("#cmd_showProjectPanel").removeAttribute("disabled");
|
document.querySelector("#cmd_showProjectPanel").removeAttribute("disabled");
|
||||||
document.querySelector("#cmd_showRuntimePanel").removeAttribute("disabled");
|
document.querySelector("#cmd_showRuntimePanel").removeAttribute("disabled");
|
||||||
|
|
||||||
document.querySelector("#runtime-panel-button").removeAttribute("active");
|
|
||||||
|
|
||||||
// Action commands
|
// Action commands
|
||||||
let playCmd = document.querySelector("#cmd_play");
|
let playCmd = document.querySelector("#cmd_play");
|
||||||
let stopCmd = document.querySelector("#cmd_stop");
|
let stopCmd = document.querySelector("#cmd_stop");
|
||||||
|
@ -410,7 +407,6 @@ let UI = {
|
||||||
playCmd.setAttribute("disabled", "true");
|
playCmd.setAttribute("disabled", "true");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.querySelector("#runtime-panel-button").setAttribute("active", "true");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove command
|
// Remove command
|
||||||
|
@ -429,18 +425,21 @@ let UI = {
|
||||||
|
|
||||||
let box = document.querySelector("#runtime-actions");
|
let box = document.querySelector("#runtime-actions");
|
||||||
|
|
||||||
|
let runtimePanelButton = document.querySelector("#runtime-panel-button");
|
||||||
if (AppManager.connection.status == Connection.Status.CONNECTED) {
|
if (AppManager.connection.status == Connection.Status.CONNECTED) {
|
||||||
screenshotCmd.removeAttribute("disabled");
|
screenshotCmd.removeAttribute("disabled");
|
||||||
permissionsCmd.removeAttribute("disabled");
|
permissionsCmd.removeAttribute("disabled");
|
||||||
disconnectCmd.removeAttribute("disabled");
|
disconnectCmd.removeAttribute("disabled");
|
||||||
detailsCmd.removeAttribute("disabled");
|
detailsCmd.removeAttribute("disabled");
|
||||||
box.removeAttribute("hidden");
|
box.removeAttribute("hidden");
|
||||||
|
runtimePanelButton.setAttribute("active", "true");
|
||||||
} else {
|
} else {
|
||||||
screenshotCmd.setAttribute("disabled", "true");
|
screenshotCmd.setAttribute("disabled", "true");
|
||||||
permissionsCmd.setAttribute("disabled", "true");
|
permissionsCmd.setAttribute("disabled", "true");
|
||||||
disconnectCmd.setAttribute("disabled", "true");
|
disconnectCmd.setAttribute("disabled", "true");
|
||||||
detailsCmd.setAttribute("disabled", "true");
|
detailsCmd.setAttribute("disabled", "true");
|
||||||
box.setAttribute("hidden", "true");
|
box.setAttribute("hidden", "true");
|
||||||
|
runtimePanelButton.removeAttribute("active");
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
Загрузка…
Ссылка в новой задаче