mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-06-03 22:46:52 +08:00
Modal stays open when renaming an inventory via the bottom toolbar [SCI-8613] (#5567)
* Initialize rename and duplicate inventory models [SCI-8613]
This commit is contained in:
parent
8d1803211e
commit
ad0418947c
1 changed files with 13 additions and 0 deletions
|
@ -26,6 +26,19 @@
|
|||
animateSpinner(null, false);
|
||||
ShareModal.init();
|
||||
}
|
||||
if (['rename-repo-modal', 'copy-repo-modal'].includes($(this).attr('id'))) {
|
||||
$(this).find('form')
|
||||
.on('ajax:success', function(_e, data) {
|
||||
if (data.url) {
|
||||
window.location = data.url;
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
})
|
||||
.on('ajax:error', function(_e, data) {
|
||||
$(this).renderFormErrors('repository', data.responseJSON);
|
||||
});
|
||||
}
|
||||
$(this).find('.selectpicker').selectpicker();
|
||||
})
|
||||
.on('hidden.bs.modal', function() {
|
||||
|
|
Loading…
Add table
Reference in a new issue