-
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jokob-sk
committed
Dec 27, 2024
1 parent
fa570b9
commit 4fef6e1
Showing
12 changed files
with
119 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,70 @@ | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
function askDeleteDevice () { | ||
function askDeleteDevice() { | ||
// Check MAC | ||
if (mac == '') { | ||
return; | ||
} | ||
|
||
// Ask delete device | ||
showModalWarning ('Delete Device', 'Are you sure you want to delete this device?<br>(maybe you prefer to archive it)', | ||
getString('Gen_Cancel'), getString('Gen_Delete'), 'deleteDevice'); | ||
showModalWarning( | ||
getString("DevDetail_button_Delete"), | ||
getString("DevDetail_button_Delete_ask"), | ||
getString('Gen_Cancel'), | ||
getString('Gen_Delete'), | ||
'deleteDevice'); | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
function askDelDevDTInline(mac) { | ||
// Check MAC | ||
if (mac == '') { | ||
return; | ||
} | ||
|
||
showModalWarning( | ||
getString("DevDetail_button_Delete"), | ||
getString("DevDetail_button_Delete_ask"), | ||
getString('Gen_Cancel'), | ||
getString('Gen_Delete'), | ||
() => deleteDeviceByMac(mac)) | ||
} | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
function deleteDevice () { | ||
function deleteDevice() { | ||
// Check MAC | ||
if (mac == '') { | ||
return; | ||
} | ||
|
||
// Delete device | ||
$.get('php/server/devices.php?action=deleteDevice&mac='+ mac, function(msg) { | ||
showMessage (msg); | ||
$.get('php/server/devices.php?action=deleteDevice&mac=' + mac, function (msg) { | ||
showMessage(msg); | ||
}); | ||
|
||
// refresh API | ||
updateApi("devices,appevents") | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
function deleteDeviceByMac (mac) { | ||
function deleteDeviceByMac(mac) { | ||
// Check MAC | ||
if (mac == '') { | ||
return; | ||
return; | ||
} | ||
|
||
// alert(mac) | ||
// return; | ||
|
||
// Delete device | ||
$.get('php/server/devices.php?action=deleteDevice&mac='+ mac, function(msg) { | ||
showMessage (msg); | ||
$.get('php/server/devices.php?action=deleteDevice&mac=' + mac, function (msg) { | ||
showMessage(msg); | ||
}); | ||
|
||
// refresh API | ||
updateApi("devices,appevents") | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters