mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-06 12:43:06 +08:00
Merge pull request #7168 from lasniscinote/gl_SCI_10204
(fix) Content from previous file persists on 'Match the columns' page after canceling upload [SCI-10204]
This commit is contained in:
commit
ea639deb9c
3 changed files with 18 additions and 3 deletions
|
@ -33,6 +33,15 @@
|
|||
$('#parse-records-modal').modal('show');
|
||||
repositoryRecordsImporter();
|
||||
});
|
||||
|
||||
// Handling cancel click in #parse-records-modal
|
||||
$('#parse-records-modal').on('click', '#parse-records-cancel-btn', () => {
|
||||
$('#parse-records-modal').modal('hide');
|
||||
// remove previous modal (necessary to get the new relevant data instead of old data)
|
||||
setTimeout(() => {
|
||||
$('#parse-records-modal').remove();
|
||||
}, 200);
|
||||
});
|
||||
}
|
||||
|
||||
function initTable() {
|
||||
|
@ -56,7 +65,7 @@
|
|||
data.responseJSON.message + '</span>');
|
||||
});
|
||||
|
||||
submitBtn.on('click', function(event) {
|
||||
submitBtn.one('click', (event) => {
|
||||
var data = new FormData();
|
||||
submitBtn.attr('disabled', true);
|
||||
$('#parse-sheet-loader').removeClass('hidden');
|
||||
|
@ -79,8 +88,14 @@
|
|||
function initImportRecordsModal() {
|
||||
$('.repository-show').on('click', '#importRecordsButton', function() {
|
||||
$('#modal-import-records').modal('show');
|
||||
$('#modal-import-records').find('#file').val('');
|
||||
initParseRecordsModal();
|
||||
});
|
||||
|
||||
// Handling cancel click in #modal-import-records
|
||||
$('#modal-import-records').on('click', '#import-records-cancel-btn', () => {
|
||||
$('#modal-import-records').modal('hide');
|
||||
});
|
||||
}
|
||||
|
||||
$('.repository-title-name .inline-editing-container').on('inlineEditing::updated', function(e, value, viewValue) {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary close-button" data-dismiss="modal"><%= t('general.cancel')%></button>
|
||||
<button id="import-records-cancel-btn" type="button" class="btn btn-secondary close-button"><%= t('general.cancel')%></button>
|
||||
<input type="submit" class="btn btn-success" value="<%= t("repositories.modal_import.upload") %>">
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
</div>
|
||||
<% end %>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('general.cancel')%></button>
|
||||
<button id="parse-records-cancel-btn" type="button" class="btn btn-secondary"><%= t('general.cancel')%></button>
|
||||
<input type="submit" class="btn btn-success" value="<%= t('repositories.modal_parse.import') %>">
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue