mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-29 00:24:52 +02:00
disable navigation bar while editing file
This commit is contained in:
parent
e7f0736a7a
commit
01d70fde47
@ -249,6 +249,7 @@ class NavFile extends NavEntry {
|
||||
if (!button.classList.contains("editor-btn"))
|
||||
button.disabled = true;
|
||||
}
|
||||
document.getElementById("pwd").disabled = true;
|
||||
var proc_output = await cockpit.spawn(["file", "--mime-type", this.path_str()], {superuser: "try"});
|
||||
var fields = proc_output.split(':');
|
||||
var type = fields[1].trim();
|
||||
@ -276,6 +277,7 @@ class NavFile extends NavEntry {
|
||||
for (let button of document.getElementsByTagName("button")) {
|
||||
button.disabled = false;
|
||||
}
|
||||
document.getElementById("pwd").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user