mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-17 14:19:05 +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);
|
animateSpinner(null, false);
|
||||||
ShareModal.init();
|
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();
|
$(this).find('.selectpicker').selectpicker();
|
||||||
})
|
})
|
||||||
.on('hidden.bs.modal', function() {
|
.on('hidden.bs.modal', function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue