All CSS used are prefixed with afus-, uuid v4 for each upload group

Set uuid v4 for each upload group as ".uploadQueueUid"
Add max upload files as ".uploadQueueMax"
Change to upload files to ".uploadQueueOpen" (from ".uploadQueueMax")

Extract retrun message from two types for messages that could come
from the server
This commit is contained in:
2024-09-17 15:50:39 +09:00
parent 960d396aae
commit c53eea0b42
5 changed files with 86 additions and 4 deletions

View File

@@ -93,6 +93,16 @@ function ajaxWrapper(call_id, queryString = {}, control = {}, url = 'backend.php
});
}
/**
* uuid4 creator
* @returns {String} uuid4
*/
function uuidv4() {
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, c =>
(+c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)
);
}
/**
* FILE CHANGE:
* helper call for ajax file upload on file selected
@@ -331,6 +341,9 @@ $(document).ready(function () {
form_parameters: {'parameter_a': 'Value 123'},
auto_submit: false,
function_options: {action_box_id: 'actionBox-alt', 'other': 'free'},
translation: {
remove: "REMOVE"
},
fileChange: fileChangeFunction,
fileChangeAll: fileChangeFunctionAll,
fileRemove: fileRemoveFunction,