mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Code cleanup.
This commit is contained in:
parent
72d9698dce
commit
cf54f6f34b
15 changed files with 802 additions and 802 deletions
|
@ -88,7 +88,7 @@
|
|||
<div class="areaProgress"><div id="progressbar" style="background-color:blue"></div></div>
|
||||
</div>
|
||||
<div id=deskarea3x style="max-height:calc(100vh - 82px);height:calc(100vh - 54px);background-color:gray">
|
||||
<div id="masterListArea" style="height:calc(33.33vh);overflow-y:scroll">
|
||||
<div id="mainListArea" style="height:calc(33.33vh);overflow-y:scroll">
|
||||
<div class="listItem"><div style="display:inline-block;width:calc(40% - 10px)"></div><div style="display:inline-block;width:calc(40% - 10px)"></div><div style="display:inline-block;width:calc(20% - 10px)"></div></div>
|
||||
</div>
|
||||
<textarea id="defaultTextArea" autocomplete=off readonly style="height:calc(28.33vh);overflow-y:scroll;width:calc(100% - 5px);resize:none;background-color:#EFE"></textarea>
|
||||
|
@ -139,7 +139,7 @@
|
|||
document.ondragover = ondragover;
|
||||
document.ondragleave = ondragleave;
|
||||
document.onkeypress = onkeypress;
|
||||
updateMasterList();
|
||||
updateMainList();
|
||||
loadServerTranslations();
|
||||
QE('SaveServerButton', false);
|
||||
}
|
||||
|
@ -152,14 +152,14 @@
|
|||
|
||||
function langSelectorChange() {
|
||||
selectedLanguage = Q('langSelector').value;
|
||||
updateMasterList();
|
||||
updateMainList();
|
||||
onSearchChanged(true);
|
||||
select(0, true, false);
|
||||
}
|
||||
|
||||
function cleanup() {
|
||||
translationFile = null;
|
||||
updateMasterList();
|
||||
updateMainList();
|
||||
Q('searchInput').value = '';
|
||||
currentSearchFilter = '';
|
||||
}
|
||||
|
@ -236,14 +236,14 @@
|
|||
translations.sort(enSort);
|
||||
Q('searchInput').value = '';
|
||||
currentSearchFilter = '';
|
||||
updateMasterList();
|
||||
updateMainList();
|
||||
select(0, true);
|
||||
}
|
||||
};
|
||||
fr.readAsText(translationFile);
|
||||
}
|
||||
|
||||
function updateMasterList() {
|
||||
function updateMainList() {
|
||||
var x = [];
|
||||
if (translations != null) {
|
||||
//console.log(translations);
|
||||
|
@ -256,7 +256,7 @@
|
|||
x.push('<div class="listItem" id=nx' + i + ' onclick=select(' + i + ')><div id=ns' + i + ' style="display:inline-block;width:calc(40% - 10px)">' + source + '</div><div id=nt' + i + ' style="display:inline-block;width:calc(40% - 10px)">' + target + '</div><div id=nc' + i + ' style="display:inline-block;width:calc(20% - 10px)">' + comment + '</div></div>');
|
||||
}
|
||||
}
|
||||
QH('masterListArea', x.join(''));
|
||||
QH('mainListArea', x.join(''));
|
||||
updateButtons();
|
||||
onSearchChanged(true);
|
||||
}
|
||||
|
@ -271,9 +271,9 @@
|
|||
Q('nx' + selectedItem).classList.remove('listItem');
|
||||
Q('nx' + selectedItem).classList.add('listItemSel');
|
||||
if (scroll === true) {
|
||||
var x = (Q('masterListArea').clientHeight / 2) - (Q('nx' + selectedItem).clientHeight / 2);
|
||||
var x = (Q('mainListArea').clientHeight / 2) - (Q('nx' + selectedItem).clientHeight / 2);
|
||||
if (x < 0) { x = 0; }
|
||||
Q('masterListArea').scrollTop = Q('nx' + selectedItem).offsetTop - x;
|
||||
Q('mainListArea').scrollTop = Q('nx' + selectedItem).offsetTop - x;
|
||||
}
|
||||
onLocChanged();
|
||||
if (translations[i][selectedLanguage] != null) {
|
||||
|
@ -355,7 +355,7 @@
|
|||
translations.sort(enSort);
|
||||
Q('searchInput').value = '';
|
||||
currentSearchFilter = '';
|
||||
updateMasterList();
|
||||
updateMainList();
|
||||
select(0, true);
|
||||
};
|
||||
xdr.onerror = function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue