Fix for edit files
This commit is contained in:
parent
8013bc2a98
commit
aedd7e966b
|
@ -3344,6 +3344,10 @@ function popup_breadcrumbs(data) {
|
|||
|
||||
function popup_edit_file(data) {
|
||||
var popup_list = document.getElementById('popup_list');
|
||||
var accept = document.getElementById("popup_accept");
|
||||
accept.classList.add("btn-secondary");
|
||||
accept.classList.remove("btn-primary");
|
||||
accept.textContent = "Save";
|
||||
//first, let's clear out our existing data
|
||||
while (popup_list.firstChild) {
|
||||
popup_list.removeChild(popup_list.firstChild);
|
||||
|
@ -3354,6 +3358,7 @@ function popup_edit_file(data) {
|
|||
var textarea = document.getElementById("filecontents");
|
||||
socket.emit("popup_change_file", {"file": textarea.getAttribute("filename"), "data": textarea.value});
|
||||
document.getElementById("popup").classList.add("hidden");
|
||||
this.classList.add("hidden");
|
||||
};
|
||||
|
||||
var textarea = document.createElement("textarea");
|
||||
|
@ -3364,7 +3369,9 @@ function popup_edit_file(data) {
|
|||
textarea.value = data.text;
|
||||
textarea.onblur = function () {
|
||||
var accept = document.getElementById("popup_accept");
|
||||
accept.classList.remove("disabled");
|
||||
accept.classList.remove("hidden");
|
||||
accept.classList.remove("btn-secondary");
|
||||
accept.classList.add("btn-primary");
|
||||
};
|
||||
popup_list.append(textarea);
|
||||
|
||||
|
|
Loading…
Reference in New Issue