summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorSimon Rettberg2020-09-28 15:25:58 +0200
committerSimon Rettberg2020-09-28 15:25:58 +0200
commit39354a0cc0ef32ddd432d8421dc8483002cd855b (patch)
tree7b3975bc77ce6899fd128080c2e0035485ef1bb8 /script
parent[remoteaccess/exams] Disable screen-saver timeout for these modes (diff)
downloadslx-admin-39354a0cc0ef32ddd432d8421dc8483002cd855b.tar.gz
slx-admin-39354a0cc0ef32ddd432d8421dc8483002cd855b.tar.xz
slx-admin-39354a0cc0ef32ddd432d8421dc8483002cd855b.zip
[dozmod] Implement deleting orphaned files from vm store
This is the UI part that communicates with dmsd to show or delete all files on the vm store that don't belong to a known VM. Might be dangerous, use wisely. Closes #3321
Diffstat (limited to 'script')
-rw-r--r--script/slx-fixes.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/slx-fixes.js b/script/slx-fixes.js
index 992ca337..a06761e4 100644
--- a/script/slx-fixes.js
+++ b/script/slx-fixes.js
@@ -61,6 +61,7 @@ $(document).ready(function() {
var $title, $body, $button, $modal = null, $cache = {};
slxModalConfirmHandler = function (e) {
e.preventDefault();
+ e.stopImmediatePropagation();
var $this = $(this);
if ($modal === null) {
$modal = $('<div class="modal fade" id="modal-autogen" tabindex="-1" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal">&times;</button>'
@@ -74,7 +75,7 @@ $(document).ready(function() {
$title.text($this.data('title') || $this.text());
$button.html($this.data('close') || $this.html()).attr('class', $this.attr('class')).removeClass('btn-xs btn-sm btn-lg').off('click').click(function() {
// Click and reconnect click handler so pressing "back" on the next page works
- $this.off('click').click().click(slxModalConfirmHandler);
+ $this.off('click', slxModalConfirmHandler).click().click(slxModalConfirmHandler);
});
var $wat, str = $this.data('confirm');
if (str.substr(0, 9) === '#confirm-') {