mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 05:34:53 +08:00
29 lines
1.4 KiB
Text
29 lines
1.4 KiB
Text
$('#modal-import-json-protocol').on('hidden.bs.modal', function () {
|
|
$('#pio_no_file_error_span').empty();
|
|
})
|
|
<% if @protocolsio_too_big %>
|
|
$('#modal-import-json-protocol').modal('hide');
|
|
HelperModule.flashAlertMsg(I18n.t('my_modules.protocols.load_from_file_size_error',
|
|
{ size: GLOBAL_CONSTANTS.FILE_MAX_SIZE_MB ) }, 'danger');
|
|
<% elsif @protocolsio_general_error %>
|
|
$('#pio_no_file_error_span').addClass('has-error').html('<span class="help-block"> <%= t('protocols.import_export.load_file_error') %></span>');
|
|
<% elsif @protocolsio_invalid_file %>
|
|
$('#modal-import-json-protocol').modal('hide');
|
|
HelperModule.flashAlertMsg(' <%= t('my_modules.protocols.load_from_file_invalid_error') %>','danger');
|
|
<% elsif @protocolsio_no_file %>
|
|
$('#pio_no_file_error_span').addClass('has-error').html('<span class="help-block"> <%= t('repositories.parse_sheet.errors.no_file_selected') %></span>');
|
|
<% @protocolsio_no_file = false %>
|
|
<% else %>
|
|
$('#modal-import-json-protocol').modal('hide');
|
|
$('#protocolsio-preview-modal-target').html(
|
|
"<%= j render(:partial => 'protocols/import_export/import_json_protocol_preview_modal') %>"
|
|
);
|
|
$('#modal-import-json-protocol-preview').modal('show');
|
|
$('.modal').on('hidden.bs.modal', function (e) {
|
|
if($('.modal').hasClass('in')) {
|
|
$('body').addClass('modal-open');
|
|
}
|
|
});
|
|
<% end %>
|
|
$("#protocols_io_form")[0].reset();
|
|
$('#protocols_io_form').trigger("reset");
|