Fix tree-caret on zip imports

This commit is contained in:
Andrew 2022-01-09 23:47:10 -05:00
parent 70cc90549d
commit 2cd15ba738

View File

@ -312,7 +312,7 @@
</button>
</div>
<div class="modal-body">
<div class="tree-ctx-item" data-path="" style="overflow: scroll; max-height:75%;">
<div class="tree-ctx-item" id="main-tree-div" data-path="" style="overflow: scroll; max-height:75%;">
<input type="radio" id="main-tree-input" name="root_path" value="" checked>
<span id="main-tree" class="files-tree-title tree-caret-down root-dir" data-path="">
<i class="far fa-folder"></i>
@ -415,7 +415,7 @@
document.getElementById("root_files_button").addEventListener("click", function(){
if(document.forms["zip"]["server_path"].value != ""){
if(document.getElementById('root_files_button').classList.contains('clicked')){
document.getElementById('main-tree').innerHTML = '<i class="far fa-folder"></i><i class="far fa-folder-open"></i>{{ translate("serverFiles", "files", data["lang"]) }}</span>'
document.getElementById('main-tree-div').innerHTML = '<input type="radio" id="main-tree-input" name="root_path" value="" checked><span id="main-tree" class="files-tree-title tree-caret-down root-dir" data-path=""><i class="far fa-folder"></i><i class="far fa-folder-open"></i>{{ translate('serverFiles', 'files', data['lang']) }}</span></input>'
}else{
document.getElementById('root_files_button').classList.add('clicked')
}
@ -508,7 +508,7 @@ function hide(event) {
text = dataArr.join('\n');
try{
document.getElementById('main-tree').innerHTML += text;
document.getElementById('main-tree-div').innerHTML += text;
document.getElementById('main-tree').parentElement.classList.add("clicked");
}catch{
document.getElementById('files-tree').innerHTML = text;