refresh table after archive or unarchive

This commit is contained in:
Andrew Bauer 2020-09-13 11:32:28 -05:00
parent 29710f67ac
commit 0a0b555c4c
1 changed files with 8 additions and 2 deletions

View File

@ -173,7 +173,10 @@ function initPage() {
evt.preventDefault(); evt.preventDefault();
$j.getJSON(thisUrl + '?request=events&action=archive&eids[]='+selections.join('&eids[]=')) $j.getJSON(thisUrl + '?request=events&action=archive&eids[]='+selections.join('&eids[]='))
.done(window.location.reload(true)) .done( function(data) {
$j('#eventTable').bootstrapTable('refresh');
window.location.reload(true);
})
.fail(function(jqxhr, textStatus, error) { .fail(function(jqxhr, textStatus, error) {
console.log("Request Failed: " + textStatus + ", " + error); console.log("Request Failed: " + textStatus + ", " + error);
console.log("Response Text: " + jqxhr.responseText); console.log("Response Text: " + jqxhr.responseText);
@ -192,7 +195,10 @@ function initPage() {
evt.preventDefault(); evt.preventDefault();
$j.getJSON(thisUrl + '?request=events&action=unarchive&eids[]='+selections.join('&eids[]=')) $j.getJSON(thisUrl + '?request=events&action=unarchive&eids[]='+selections.join('&eids[]='))
.done(window.location.reload(true)) .done( function(data) {
$j('#eventTable').bootstrapTable('refresh');
window.location.reload(true);
})
.fail(function(jqxhr, textStatus, error) { .fail(function(jqxhr, textStatus, error) {
console.log("Request Failed: " + textStatus + ", " + error); console.log("Request Failed: " + textStatus + ", " + error);
console.log("Response Text: " + jqxhr.responseText); console.log("Response Text: " + jqxhr.responseText);