aboutsummaryrefslogtreecommitdiffstats
path: root/interface/js/app/history.js
diff options
context:
space:
mode:
Diffstat (limited to 'interface/js/app/history.js')
-rw-r--r--interface/js/app/history.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/interface/js/app/history.js b/interface/js/app/history.js
index 0d953ec1e..a429b21ca 100644
--- a/interface/js/app/history.js
+++ b/interface/js/app/history.js
@@ -151,6 +151,7 @@ define(["jquery", "app/common", "app/libft", "footable"],
}
ui.getHistory = function () {
+ $("#refresh, #updateHistory").attr("disabled", true);
common.query("history", {
success: function (req_data) {
function differentVersions(neighbours_data) {
@@ -190,7 +191,8 @@ define(["jquery", "app/common", "app/libft", "footable"],
libft.destroyTable("history");
// Is there a way to get an event when the table is destroyed?
setTimeout(() => {
- libft.initHistoryTable(data, items, "history", get_history_columns(data), false);
+ libft.initHistoryTable(data, items, "history", get_history_columns(data), false,
+ () => $("#refresh, #updateHistory").removeAttr("disabled"));
}, 200);
}
prevVersion = version;
@@ -198,7 +200,7 @@ define(["jquery", "app/common", "app/libft", "footable"],
libft.destroyTable("history");
}
},
- complete: function () { $("#refresh").removeAttr("disabled").removeClass("disabled"); },
+ error: () => $("#refresh, #updateHistory").removeAttr("disabled"),
errorMessage: "Cannot receive history",
});
};