mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
minor changes, working on refresh after submit
This commit is contained in:
parent
72c707ae88
commit
d59234a1e3
3 changed files with 8 additions and 3 deletions
|
@ -335,9 +335,11 @@ function initModals() {
|
|||
modal.find(".modal-body").html("");
|
||||
|
||||
// Simply re-render table
|
||||
protocolsDatatable.ajax.reload();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Make private modal hidden action
|
||||
$("#make-private-results-modal").on("hidden.bs.modal", function(e) {
|
||||
refresh($(this));
|
||||
|
|
|
@ -835,12 +835,15 @@ def protocolsio_import_save
|
|||
format.json {
|
||||
render json: { name: p_name, status: :bad_request }, status: :bad_request
|
||||
}
|
||||
|
||||
#:location => root_url
|
||||
# protocolsDatatable.ajax.reload();
|
||||
# $('#modal-import-json-protocol-preview').modal('hide');
|
||||
else
|
||||
format.json {
|
||||
render json: {
|
||||
name: p_name, new_name: protocol.name, status: :ok
|
||||
},redirect_to: @protocol,
|
||||
},
|
||||
status: :ok
|
||||
}
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= form_for(@protocol, :url => url_for(:controller => 'protocols', :action => 'protocolsio_import_save'),method: :post,format: :json,remote: true) do |f| %>
|
||||
<%= form_for(@protocol, :url => url_for(:controller => 'protocols', :action => 'protocolsio_import_save'),method: :post,format: :json,remote: true,:html => { :id => "protocolsio-import-form" }) do |f| %>
|
||||
<%#= fields_for :steps do |g| %>
|
||||
<% #json_string= JSON.parse(json_string)%>
|
||||
<% #json_string = JSON.generate(json_string['steps'])
|
||||
|
|
Loading…
Reference in a new issue