🔒DB lock v0.4 #685 + 🔔userNotifications

This commit is contained in:
jokob-sk
2024-06-01 20:05:15 +10:00
parent 2e9aa37cd2
commit de561e1ad0
29 changed files with 1932 additions and 1460 deletions

View File

@@ -1437,6 +1437,8 @@ function setDeviceData (direction='', refreshCallback='') {
return;
}
showSpinner()
// update data to server
$.get('php/server/devices.php?action=setDeviceData&mac='+ mac
+ '&name=' + encodeURIComponent($('#txtName').val())
@@ -1459,32 +1461,37 @@ function setDeviceData (direction='', refreshCallback='') {
+ '&archived=' + ($('#chkArchived')[0].checked * 1)
, function(msg) {
showMessage (msg);
showMessage (msg);
// clear session storage
setCache("#dropdownOwner","");
setCache("#dropdownDeviceType","");
setCache("#dropdownGroup","");
setCache("#dropdownLocation","");
setCache("#dropdownNetworkNodeMac","");
// clear session storage
setCache("#dropdownOwner","");
setCache("#dropdownDeviceType","");
setCache("#dropdownGroup","");
setCache("#dropdownLocation","");
setCache("#dropdownNetworkNodeMac","");
// Remove navigation prompt "Are you sure you want to leave..."
window.onbeforeunload = null;
somethingChanged = false;
// Remove navigation prompt "Are you sure you want to leave..."
window.onbeforeunload = null;
somethingChanged = false;
// refresh API
updateApi()
// refresh API
updateApi()
// Callback fuction
if (typeof refreshCallback == 'function') {
refreshCallback(direction);
}
hideSpinner()
// Callback fuction
if (typeof refreshCallback == 'function') {
refreshCallback(direction);
}
});
}
// -----------------------------------------------------------------------------
function askSkipNotifications () {
// Check MAC