Browse Source

Show hide save button

pull/1/head
Wahyu Ramadhan 1 year ago
parent
commit
6254fed1fc
  1. 1
      edit-mode/function/function.js
  2. 13
      edit-mode/function/restActivityLink.js

1
edit-mode/function/function.js

@ -677,6 +677,7 @@ function batchUpdate(){
}).then(function (response) {
$("body").removeClass("loading");
localStorage.setItem('batchEntity', '');
$("#save-activity").hide();
sendStorage();
refresData();
}).catch(function (error) {

13
edit-mode/function/restActivityLink.js

@ -10,6 +10,12 @@ gantt.ajax.get({
}
}).then(function (xhr) {
$("body").removeClass("loading");
let batchEntity = localStorage.getItem('batchEntity');
if (!batchEntity || batchEntity == '') {
$("#save-activity").hide();
} else {
$("#save-activity").show();
}
let data = {};
let response = xhr.responseText;
let obj = JSON.parse(response);
@ -64,6 +70,12 @@ function refresData(id) {
}
}).then(function (xhr) {
$("body").removeClass("loading");
let batchEntity = localStorage.getItem('batchEntity');
if (!batchEntity || batchEntity == '') {
$("#save-activity").hide();
} else {
$("#save-activity").show();
}
gantt.clearAll();
let data = {};
let response = xhr.responseText;
@ -198,6 +210,7 @@ var dp = gantt.createDataProcessor(function (entity, action, data, id) {
toBeSet = [batchEntity]
}
localStorage.setItem('batchEntity', JSON.stringify(toBeSet));
$("#save-activity").show();
sendStorage();
// $("body").addClass("loading");
// return gantt.ajax.put({

Loading…
Cancel
Save