Adding a "Deselect All" button #9
|
@ -77,6 +77,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer align-right">
|
<div class="modal-footer align-right">
|
||||||
|
<button class="button-secondary" name="deselectAll">Deselect all</button>
|
||||||
<button class="button-secondary" name="closeSave">Close</button>
|
<button class="button-secondary" name="closeSave">Close</button>
|
||||||
<button class="button-primary" name="save">OK</button>
|
<button class="button-primary" name="save">OK</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -101,6 +102,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer align-right">
|
<div class="modal-footer align-right">
|
||||||
|
<button class="button-secondary" name="deselectAll">Deselect all</button>
|
||||||
<button class="button-secondary" name="closeEdit">Close</button>
|
<button class="button-secondary" name="closeEdit">Close</button>
|
||||||
<button class="button-primary" name="edit">OK</button>
|
<button class="button-primary" name="edit">OK</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -66,7 +66,10 @@ document.addEventListener("click", (e) => {
|
||||||
hideModal("loadModal");
|
hideModal("loadModal");
|
||||||
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (action.includes("deselectAll")) {
|
||||||
|
let container = document.getElementById("editSelectionContainer");
|
||||||
|
deselectAll(container);
|
||||||
|
}
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
if (/(download|delete|edit|load)/.test(action)) {
|
if (/(download|delete|edit|load)/.test(action)) {
|
||||||
|
|
|
@ -193,6 +193,15 @@ const getSelectionData = (container = null, keys = null, keysLength = 0) => {
|
||||||
return sessionData;
|
return sessionData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const deselectAll = (container = null) => {
|
||||||
|
let selAlls = container.querySelectorAll('.selAll');
|
||||||
|
for (var i = 0; i < selAlls.length; i++) {
|
||||||
|
var selAll = selAlls[i];
|
||||||
|
selAll.checked = false;
|
||||||
|
toggleSelect(selAll, "Win" + i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const doUrlAction = (url = "https://www.paypal.me/ITDominator", fileName = "", isDownload = false) => {
|
const doUrlAction = (url = "https://www.paypal.me/ITDominator", fileName = "", isDownload = false) => {
|
||||||
let aTagElm = document.getElementById('downloadAnchorElem');
|
let aTagElm = document.getElementById('downloadAnchorElem');
|
||||||
aTagElm.setAttribute("href", url);
|
aTagElm.setAttribute("href", url);
|
||||||
|
|
Loading…
Reference in New Issue
Please change from "var" to "let"