From 03424ad19ac1bb42635a3d6653565aa0dc6ccf5a Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 25 Mar 2019 11:46:50 +0100 Subject: Introduce JS helper for bootstrap confirm dialogs on button-submit --- .../locationinfo/templates/page-panels.html | 37 ++++-------------- .../locationinfo/templates/page-servers.html | 45 ++++++---------------- 2 files changed, 18 insertions(+), 64 deletions(-) (limited to 'modules-available/locationinfo/templates') diff --git a/modules-available/locationinfo/templates/page-panels.html b/modules-available/locationinfo/templates/page-panels.html index b30e7c87..51acf053 100644 --- a/modules-available/locationinfo/templates/page-panels.html +++ b/modules-available/locationinfo/templates/page-panels.html @@ -2,6 +2,9 @@

{{lang_panelsTableHints}}

+
+ + @@ -45,7 +48,8 @@ @@ -53,6 +57,7 @@ {{/panels}}
-
+
@@ -68,32 +73,4 @@ {{lang_urlPanel}}
- -
- - - -
- - \ No newline at end of file + diff --git a/modules-available/locationinfo/templates/page-servers.html b/modules-available/locationinfo/templates/page-servers.html index e295c4fd..2f692078 100644 --- a/modules-available/locationinfo/templates/page-servers.html +++ b/modules-available/locationinfo/templates/page-servers.html @@ -17,7 +17,6 @@ {{#serverlist}}
- {{typename}} {{servername}} @@ -29,8 +28,8 @@ - @@ -40,8 +39,8 @@ - @@ -50,31 +49,15 @@ {{/serverlist}} + - - +
- @@ -97,19 +80,13 @@ document.addEventListener("DOMContentLoaded", function () { - /** - * Confirm deleting a server. - */ - $('.server-delete').click(function(ev) { - var del = confirm("{{lang_deleteConfirmation}}"); - if (!del) ev.preventDefault(); - }); - - /** + /* * Animate refresh icon while page is loading */ - $('.server-check').click(function() { + var $checkBtn = $('.server-check'); + $checkBtn.click(function() { $(this).find('.glyphicon').addClass('slx-rotation'); + setTimeout(function(){$checkBtn.prop('disabled', true);},1); // Delay to not ignore form value }); $('button[data-server-edit]').click(function() { -- cgit v1.2.3-55-g7522