mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-13 00:24:42 +08:00
Fix repository reload on cancel button click on import modal [SCI-9316] (#6511)
This commit is contained in:
parent
ae7995fee2
commit
849743a410
1 changed files with 1 additions and 19 deletions
|
@ -25,12 +25,7 @@
|
|||
function handleSuccessfulSubmit(data) {
|
||||
$('#modal-import-records').modal('hide');
|
||||
$(data.html).appendTo('body').promise().done(function() {
|
||||
$('#parse-records-modal')
|
||||
.modal('show')
|
||||
.on('hidden.bs.modal', function() {
|
||||
animateSpinner();
|
||||
location.reload();
|
||||
});
|
||||
$('#parse-records-modal').modal('show');
|
||||
repositoryRecordsImporter();
|
||||
});
|
||||
}
|
||||
|
@ -42,19 +37,11 @@
|
|||
}
|
||||
|
||||
function initParseRecordsModal() {
|
||||
var modal = $('#parse-records-modal');
|
||||
var form = $('#form-records-file');
|
||||
var submitBtn = form.find('input[type="submit"]');
|
||||
var closeBtn = modal.find('.close-button');
|
||||
form.on('ajax:success', function(ev, data) {
|
||||
$('#modal-import-records').modal('hide');
|
||||
$(data.html).appendTo('body').promise().done(function() {
|
||||
$('#parse-records-modal')
|
||||
.modal('show')
|
||||
.on('hidden.bs.modal', function() {
|
||||
animateSpinner();
|
||||
location.reload();
|
||||
});
|
||||
repositoryRecordsImporter();
|
||||
});
|
||||
}).on('ajax:error', function(ev, data) {
|
||||
|
@ -80,8 +67,6 @@
|
|||
contentType: false
|
||||
});
|
||||
});
|
||||
|
||||
closeBtn.on('click', pageReload);
|
||||
}
|
||||
|
||||
function initImportRecordsModal() {
|
||||
|
@ -89,9 +74,6 @@
|
|||
$('#modal-import-records').modal('show');
|
||||
initParseRecordsModal();
|
||||
});
|
||||
|
||||
const closeBtn = $('#modal-import-records').find('.close-button');
|
||||
closeBtn.on('click', pageReload);
|
||||
}
|
||||
|
||||
$('.repository-title-name .inline-editing-container').on('inlineEditing::updated', function(e, value, viewValue) {
|
||||
|
|
Loading…
Add table
Reference in a new issue