mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 20:48:23 +08:00
Made javascript code nicer
This commit is contained in:
parent
055746bfd9
commit
3074acbc0d
2 changed files with 5 additions and 9 deletions
|
@ -2,10 +2,7 @@
|
||||||
<% if @protocolsio_too_big %>
|
<% if @protocolsio_too_big %>
|
||||||
alert('<%= I18n.t('my_modules.protocols.load_from_file_size_error',
|
alert('<%= I18n.t('my_modules.protocols.load_from_file_size_error',
|
||||||
size: Constants::FILE_MAX_SIZE_MB ) %>');
|
size: Constants::FILE_MAX_SIZE_MB ) %>');
|
||||||
|
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
$('#modal-import-json-protocol').modal('hide');
|
$('#modal-import-json-protocol').modal('hide');
|
||||||
<% if remotipart_submitted? %> <%# a workaround to a bug with remotipart, that caused alot of headache, courtesy of github.com/dhampik %>
|
<% if remotipart_submitted? %> <%# a workaround to a bug with remotipart, that caused alot of headache, courtesy of github.com/dhampik %>
|
||||||
$('#protocolsio-preview-modal-target').html("<%= j "#{render(:partial => 'protocols/import_export/import_json_protocol_preview_modal')}" %>");
|
$('#protocolsio-preview-modal-target').html("<%= j "#{render(:partial => 'protocols/import_export/import_json_protocol_preview_modal')}" %>");
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<% if @protocolsio_general_error %>
|
<% if @protocolsio_general_error %>
|
||||||
alert('<%= I18n.t('my_modules.protocols.load_from_file_protocol_general_error', max: Constants::NAME_MAX_LENGTH, min: Constants::NAME_MIN_LENGTH) %>');
|
alert('<%= I18n.t('my_modules.protocols.load_from_file_protocol_general_error', max: Constants::NAME_MAX_LENGTH, min: Constants::NAME_MIN_LENGTH) %>');
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
$('#modal-import-json-protocol-preview').modal('hide');
|
$('#modal-import-json-protocol-preview').modal('hide');
|
||||||
protocolsDatatable.ajax.reload();
|
protocolsDatatable.ajax.reload();
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in a new issue