diff --git a/build.gradle b/build.gradle index 427b566..b1a3ff5 100644 --- a/build.gradle +++ b/build.gradle @@ -36,6 +36,7 @@ dependencies { compile('com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.8.8') compile('org.webjars:bootstrap:3.3.7-1') compile('org.webjars:jquery:3.2.0') + compile('org.webjars:jquery-blockui:2.65') compile('org.webjars:clipboard.js:1.6.1') compile('org.webjars.bower:pwstrength-bootstrap:2.0.3') compile('org.webjars.bower:bootstrap-maxlength:1.7.0') diff --git a/src/main/resources/static/js/app.js b/src/main/resources/static/js/app.js index 90eef28..cde8775 100644 --- a/src/main/resources/static/js/app.js +++ b/src/main/resources/static/js/app.js @@ -27,4 +27,24 @@ $(function () { setTooltip(e.trigger, 'Failed!'); hideTooltip(e.trigger); }); + + // must be greater than z-index of maxlength indicator + $.blockUI.defaults.baseZ = 2000; + $.blockUI.defaults.css.border = '6px double #669966'; + + $('form.submit--blocking').submit(function(event) { + var abortSend = function() { + $.unblockUI(); + history.go(0); // reset page + }; + var block = function() { + $.blockUI({ + message: 'Please wait .. click to ABORT', + overlayCSS: { backgroundColor: '#99CC00' }, + onOverlayClick: abortSend + }); + }; + setTimeout(block, 700); + }); + }); diff --git a/src/main/resources/templates/layout.html b/src/main/resources/templates/layout.html index 9a671db..2eab3f2 100644 --- a/src/main/resources/templates/layout.html +++ b/src/main/resources/templates/layout.html @@ -18,6 +18,7 @@ + diff --git a/src/main/resources/templates/send/send_form.html b/src/main/resources/templates/send/send_form.html index 9efc123..118e20e 100644 --- a/src/main/resources/templates/send/send_form.html +++ b/src/main/resources/templates/send/send_form.html @@ -29,7 +29,8 @@

Secure Transfer

Securely send your sensitive data.

-
+
Error processing your request