Commit 7dfb2bd9 by François C.

Change modal click waiting

parent 574f0397
Pipeline #2056 passed with stage
in 1 minute 28 seconds
...@@ -229,7 +229,9 @@ function confirmDeletion(childId) { ...@@ -229,7 +229,9 @@ function confirmDeletion(childId) {
modalContent = modalContent.html(); modalContent = modalContent.html();
openModal(modalContent, () => { openModal(modalContent, () => {
if (is_time_to('delete_pair')) { if (is_time_to('delete_pair')) {
delete_pair(childId) closeModal();
openModal();
delete_pair(childId)
} }
}, 'Valider', false); }, 'Valider', false);
} }
...@@ -394,6 +396,8 @@ $(document).ready(function() { ...@@ -394,6 +396,8 @@ $(document).ready(function() {
modalContent = modalContent.html(); modalContent = modalContent.html();
openModal(modalContent, () => { openModal(modalContent, () => {
if (is_time_to('create_pair')) { if (is_time_to('create_pair')) {
closeModal();
openModal(); // Show gears
create_pair(payload) create_pair(payload)
} }
}, 'Valider', false); }, 'Valider', false);
......
...@@ -240,11 +240,14 @@ function openModal() { ...@@ -240,11 +240,14 @@ function openModal() {
// 4th argument: if set and false, validate button doesn't close the modal // 4th argument: if set and false, validate button doesn't close the modal
if (typeof (arguments[3]) == "undefined" || arguments[3] != false) if (typeof (arguments[3]) == "undefined" || arguments[3] != false)
btn_ok.on('click', closeModal); btn_ok.on('click', closeModal);
else /*
else {
btn_ok.on('click', function() { btn_ok.on('click', function() {
$(this).addClass("loading"); $(this).addClass("loading");
$(this).removeClass("btn--success"); $(this).removeClass("btn--success");
}) })
}
*/
btns.append(btn_ok); btns.append(btn_ok);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment