Fixed dialog more/less advanced feature.
Ylian Saint-Hilaire committed
May 8, 2022 at 13:40 UTC
71c1c3bad927a18a240d4a76210ee4993e9cbba3
1 file changed
+7
-7
views/default.handlebars
+7
-7
@@ -1380,8 +1380,8 @@
1380
<input id="idx_dlgOkButton" type="button" value="OK" style="" onclick="dialogclose(1)" />
1381
<div><input id="idx_dlgDeleteButton" type="button" value="Delete" style="display:none" onclick="dialogclose(2)" /></div>
1382
<div id="idx_dlgMoreButtons">
1383
- <a href=# id=morexxx1 style=cursor:pointer;color:gray;text-decoration:none title="Toggle advanced options" onclick=MoreToggle(true)>▼</a>
1384
- <a href=# id=morexxx2 style=cursor:pointer;color:gray;text-decoration:none title="Toggle advanced options" onclick=MoreToggle(false)>▲</a>
1383
+ <a href=# id=idx_dlgMoreButtons1 style=cursor:pointer;color:gray;text-decoration:none title="Toggle advanced options" onclick=MoreToggle(true)>▼</a>
1384
+ <a href=# id=idx_dlgMoreButtons2 style=cursor:pointer;color:gray;text-decoration:none title="Toggle advanced options" onclick=MoreToggle(false)>▲</a>
1385
</div>
1386
</div>
1387
</div>
@@ -8561,7 +8561,7 @@
8561
x += addHtmlValue("Alt Shell", '<input type=text id=d2altshell style=width:230px maxlength=2048 />');
8562
x += addHtmlValue("Working Dir", '<input type=text id=d2workdir style=width:230px maxlength=2048 />');
8563
x += MoreEnd();
8564
- setDialogMode(2, "RDP Credentials", 3, askRdpCredentialsEx, x);
8564
+ setDialogMode(2, "RDP Credentials", 19, askRdpCredentialsEx, x);
8565
}
8566
8567
function askRdpCredentialsValidate() {
@@ -16865,7 +16865,6 @@
16865
16866
// Reset dialog size
16867
QS('dialog').width = QS('dialog').top = QS('dialog').left = QS('dialog').right = QS('dialog').bottom = null;
16868
- MoreToggle(false);
16868
16869
QE('idx_dlgOkButton', true);
16870
QV('idx_dlgOkButton', b & 1);
@@ -16874,11 +16873,12 @@
16873
QV('id_dialogclose', (b & 2) || (b & 8));
16874
QV('idx_dlgDeleteButton', b & 4);
16875
QV('idx_dlgButtonBar', b & 7);
16876
+ QV('idx_dlgMoreButtons', b & 16);
16877
if (y) QH('id_dialogtitle', y);
16878
for (var i = 1; i < 24; i++) { QV('dialog' + i, i == x); } // Edit this line when more dialogs are added
16879
QV('dialog', x);
16880
if (c) { if (x == 2) { QH('id_dialogOptions', c); } else { QH('id_dialogMessage', c); } }
16881
- QV('idx_dlgMoreButtons', (Q('morexxx3') != null));
16881
+ MoreToggle(false);
16882
}
16883
16884
function dialogclose(x) {
@@ -17480,9 +17480,9 @@
17480
function AddButton(v, f) { return '<input type=button value="' + v + '" onclick="' + f + '" style=margin:4px>'; }
17481
function AddButton2(v, f) { return '<input type=button value="' + v + '" onclick="' + f + '">'; }
17482
function AddRefreshButton(f) { return '<input type=button name=refreshbtn value=Refresh onclick="refreshButtons(false);' + f + '" style=margin:4px ' + (refreshButtonsState==false?'disabled':'') + '>'; }
17483
- function MoreStart() { return '<div id=morexxx3 style=display:none><hr>'; };
17483
+ function MoreStart() { return '<div id=idx_dlgMoreButtons3 style=display:none><hr>'; };
17484
function MoreEnd() { return '</div>'; };
17485
- function MoreToggle(v) { QV("morexxx1",!v); QV("morexxx2",v); QV("morexxx3",v); }
17485
+ function MoreToggle(v) { QV('idx_dlgMoreButtons1',!v); QV('idx_dlgMoreButtons2',v); QV('idx_dlgMoreButtons3',v); }
17486
function getSelectedOptions(sel) { var opts = [], opt; for (var i = 0, len = sel.options.length; i < len; i++) { opt = sel.options[i]; if (opt.selected) { opts.push(opt.value); } } return opts; }
17487
function getInstance(x, y) { for (var i in x) { if (x[i]['InstanceID'] == y) return x[i]; } return null; }
17488
function getItem(x, y, z) { for (var i in x) { if (x[i][y] == z) return x[i]; } return null; }