Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
20 changes: 20 additions & 0 deletions src/main/resources/static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

});
1 change: 1 addition & 0 deletions src/main/resources/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<link rel="stylesheet" type="text/css" th:href="@{/webjars/bootstrap/3.3.7-1/css/bootstrap.min.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/css/app.css}"/>
<script th:src="@{/webjars/jquery/3.2.0/jquery.min.js}"></script>
<script th:src="@{/webjars/jquery-blockui/2.65/jquery.blockUI.js}"></script>
<script th:src="@{/webjars/bootstrap/3.3.7-1/js/bootstrap.min.js}"></script>
<script th:src="@{/webjars/clipboard.js/1.6.1/clipboard.min.js}"></script>
<script th:src="@{/js/app.js}"></script>
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/templates/send/send_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ <h1>Secure Transfer</h1>

<p>Securely send your sensitive data.</p>

<form th:action="@{/send}" method="post" th:object="${command}" enctype="multipart/form-data" autocomplete="off">
<form th:action="@{/send}" method="post" class="submit--blocking"
th:object="${command}" enctype="multipart/form-data" autocomplete="off">

<div class="panel panel-danger" th:if="${#fields.hasAnyErrors()}">
<div class="panel-heading">Error processing your request</div>
Expand Down