- Improved the RetryHandler.

- Made the tester buttons on the settings pages a bit more robust and added an indication when it's testing (spinner)
This commit is contained in:
TidusJar 2016-05-15 20:32:59 -04:00
commit 741a4ae75c
20 changed files with 232 additions and 149 deletions

View file

@ -39,7 +39,7 @@
<div class="form-group">
<div>
<button id="testPushover" type="submit" class="btn btn-primary-outline">Test</button>
<button id="testPushover" type="submit" class="btn btn-primary-outline">Test <div id="spinner"></div></button>
</div>
</div>
@ -59,6 +59,7 @@
$('#save').click(function (e) {
e.preventDefault();
$('#spinner').attr("class", "fa fa-spinner fa-spin");
var $form = $("#mainForm");
$.ajax({
type: $form.prop("method"),
@ -68,13 +69,16 @@
success: function (response) {
if (response.result === true) {
generateNotify(response.message, "success");
$('#spinner').attr("class", "fa fa-check");
} else {
generateNotify(response.message, "warning");
$('#spinner').attr("class", "fa fa-times");
}
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
$('#spinner').attr("class", "fa fa-times");
}
});
});