1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Code cleanup.

This commit is contained in:
Ylian Saint-Hilaire 2020-06-15 16:37:02 -07:00
parent 72d9698dce
commit cf54f6f34b
15 changed files with 802 additions and 802 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -584,7 +584,7 @@ function AmtStackCreateService(wsmanStack) {
1611: 'TLS Trusted Root Certificate Removed',
1612: 'TLS Preshared Key Set',
1613: 'Kerberos Settings Modified',
1614: 'Kerberos Master Key Modified',
1614: 'Kerberos Main Key Modified',
1615: 'Flash Wear out Counters Reset',
1616: 'Power Package Modified',
1617: 'Set Realm Authentication Mode',

File diff suppressed because one or more lines are too long

View file

@ -455,7 +455,6 @@ body {
color: white;
}
/* Support for new footer made with div (like masterhead) */
.footer1 {
text-align: left;
float: left;

View file

@ -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 () {