diff options
Diffstat (limited to 'internal/admin/templates/duplicate-rooms.html')
| -rw-r--r-- | internal/admin/templates/duplicate-rooms.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/admin/templates/duplicate-rooms.html b/internal/admin/templates/duplicate-rooms.html index 4e603bb..9533460 100644 --- a/internal/admin/templates/duplicate-rooms.html +++ b/internal/admin/templates/duplicate-rooms.html @@ -64,9 +64,9 @@ function checkDups() { } function deleteDupFile(path) { - if (!confirm('Delete this file?\n\n' + path)) return; API.post('/api/rooms/resolve-duplicate', {path: path, action: 'delete'}).then(function() { notify('Deleted', 'success'); + updateUndoBar(); checkDups(); }).catch(function(e) { notify('Delete failed: ' + e.message, 'error'); @@ -77,9 +77,9 @@ function renameDupFile(path, inputId) { var el = document.getElementById(inputId); var newID = parseInt(el.value, 10); if (!newID || newID <= 0) { notify('Enter a valid new room ID', 'error'); return; } - if (!confirm('Rename this file to ID ' + newID + '?\n\n' + path)) return; API.post('/api/rooms/resolve-duplicate', {path: path, action: 'rename', new_id: newID}).then(function() { notify('Renamed to ' + newID, 'success'); + updateUndoBar(); checkDups(); }).catch(function(e) { notify('Rename failed: ' + e.message, 'error'); @@ -89,5 +89,6 @@ function renameDupFile(path, inputId) { function esc(s) { return String(s || '').replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); } function escAttr(s) { return String(s || '').replace(/&/g,'&').replace(/"/g,'"'); } checkDups(); +window.refreshPage = checkDups; </script> {{end}} |
