Add "Save and Update" button

This commit is contained in:
DL6ER
2017-01-02 15:07:23 +01:00
parent 4b3173b434
commit ffe40009f1
2 changed files with 24 additions and 2 deletions

View File

@@ -32,9 +32,23 @@ $("#gravityBtn").on("click", () => {
eventsource();
});
$("#gravityBtn").on("click", () => {
$("#gravityBtn").attr("disabled", true);
eventsource();
});
// Handle hiding of alerts
$(function(){
$("[data-hide]").on("click", function(){
$(this).closest("." + $(this).attr("data-hide")).hide();
});
// Do we want to start updating immediately?
// gravity.php?go
var searchString = window.location.search.substring(1);
if(searchString.indexOf("go") !== -1)
{
$("#gravityBtn").attr("disabled", true);
eventsource();
}
});