diff --git a/views/default3.handlebars b/views/default3.handlebars index 26c28029..6ebc4f4c 100644 --- a/views/default3.handlebars +++ b/views/default3.handlebars @@ -6273,7 +6273,11 @@ */ function showModal(modalId, okButtonId, okCallback, b = null, tag = null) { if (xxModal == null) { - QE(okButtonId, true); + ['idx_dlgOkButton', 'idx_dlgCancelButton'].forEach(function (id) { // clear existing onclick, enable buttons and show them + Q(id).onclick = null; + QE(id, true); + QV(id, true); + }); xxModal = new bootstrap.Modal(document.getElementById(modalId)); var hiddenModal = function (event) { if (xxModal) { xxModal.dispose(); xxModal = null; } @@ -12284,11 +12288,11 @@ function p13fileNameCheck(e) { var x = isFilenameValid(Q('p13renameinput').value); QE('idx_dlgOkButton', x); if ((x == true) && (e != null) && (e.keyCode == 13)) { dialogclose(1); } } function p13uploadFile() { setModalContent('xxAddAgent', "Upload File", ''); - showModal('xxAddAgentModal', 'idx_dlgOkButton', () => p13uploadFileEx); + showModal('xxAddAgentModal', 'idx_dlgOkButton', () => p13uploadFileEx()); updateUploadDialogOk('p13uploadinput'); } function updateUploadDialogOk(x) { QE('idx_dlgOkButton', Q('p13uploadinput').files.length > 0); } - function p13uploadFileEx() { p13doUploadFiles(Q('p13uploadinput').files); } + function p13uploadFileEx() { p13doUploadFiles(Q('p13uploadinput').files); return false; } function p13viewfile() { var checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { @@ -12347,7 +12351,7 @@ } } setModalContent('xxAddAgent', "Paste", x); - showModal('xxAddAgentModal', 'idx_dlgOkButton', () => p13pasteFileEx); + showModal('xxAddAgentModal', 'idx_dlgOkButton', () => p13pasteFileEx()); } function p13pasteFileEx() { files.sendText({ action: (p13clipboardCut == 0 ? 'copy' : 'move'), reqid: 1, scpath: p13clipboardFolder, dspath: p13targetpath, names: p13clipboard }); p13folderup(999); if (p13clipboardCut == 1) { p13clipboard = null, p13clipboardFolder = null, p13clipboardCut = 0; p13updateClipview(); } } function p13updateClipview() { @@ -12418,7 +12422,7 @@ //console.log('p13downloadFileCancel', gdownloadFile); files.sendText({ action: 'download', sub: 'start', id: gdownloadFile.id, path: gdownloadFile.path }); setModalContent('xxAddAgent', "Download File", '
';
@@ -13646,7 +13652,7 @@
x += ' ' + "Phone number:" + ' |
';
@@ -13966,7 +13972,7 @@
if (xxdialogMode || (userinfo.emailVerified == true) || (serverinfo.emailcheck != true)) return false;
var x = "Click ok to send a verification mail to:" + ' ' + EscapeHtml(userinfo.email) + ' ' + "Please wait a few minute to receive the verification.";
setModalContent('xxAddAgent', "Email Verification", x);
- showModal('xxAddAgentModal', 'idx_dlgOkButton', () => account_showVerifyEmailEx);
+ showModal('xxAddAgentModal', 'idx_dlgOkButton', () => account_showVerifyEmailEx());
return false;
}
@@ -19843,6 +19849,7 @@
for (var i = 1; i < 24; i++) { QV('dialog' + i, i == x); } // Edit this line when more dialogs are added
QV('dialog', x);
if (c) { if (x == 2) { QH('id_dialogOptions', c); } else { QH('id_dialogMessage', c); } }
+ if (x == 0) { if (xxModal) xxModal.hide(); }
MoreToggle(false);
}
|