mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Merge pull request #902 from biosistemika/rails-5.1
Merge rails-5.1 into decoupling-settings-page
This commit is contained in:
commit
86ac07c69f
7 changed files with 54 additions and 31 deletions
|
@ -29,6 +29,8 @@
|
|||
//= require nested_form_fields
|
||||
//= require highlight.pack
|
||||
//= require tinymce-jquery
|
||||
//= require jsPlumb-2.0.4-min
|
||||
//= require jsnetworkx
|
||||
//= require_directory ./sitewide
|
||||
//= require jquery.dataTables.yadcf
|
||||
//= require datatables
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
})
|
||||
.on("ajax:complete", function(){
|
||||
animateSpinner(null, false);
|
||||
$(id).find('.selectpicker').selectpicker();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class MyModuleTagsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
format.json do
|
||||
redirect_to my_module_tags_edit_path(format: :json),
|
||||
redirect_to my_module_tags_edit_path(format: :json), turbolinks: false,
|
||||
status: 303
|
||||
end
|
||||
end
|
||||
|
@ -58,7 +58,7 @@ class MyModuleTagsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
format.json do
|
||||
redirect_to my_module_tags_edit_path(format: :json),
|
||||
redirect_to my_module_tags_edit_path(format: :json), turbolinks: false,
|
||||
status: 303
|
||||
end
|
||||
end
|
||||
|
|
|
@ -35,9 +35,13 @@ class TagsController < ApplicationController
|
|||
flash[:success] = flash_success
|
||||
redirect_to session.delete(:return_to)
|
||||
}
|
||||
format.json {
|
||||
redirect_to my_module_tags_edit_path(params[:my_module_id], @tag, format: :json), :status => 303
|
||||
}
|
||||
format.json do
|
||||
redirect_to my_module_tags_edit_path(params[:my_module_id],
|
||||
@tag,
|
||||
format: :json),
|
||||
turbolinks: false,
|
||||
status: 303
|
||||
end
|
||||
end
|
||||
else
|
||||
flash_error = t("tags.create.error_flash")
|
||||
|
@ -46,10 +50,14 @@ class TagsController < ApplicationController
|
|||
flash[:error] = flash_error
|
||||
render :new
|
||||
}
|
||||
format.json {
|
||||
format.json do
|
||||
# TODO
|
||||
redirect_to my_module_tags_edit_path(params[:my_module_id], @tag, format: :json), :status => 303
|
||||
}
|
||||
redirect_to my_module_tags_edit_path(params[:my_module_id],
|
||||
@tag,
|
||||
format: :json),
|
||||
turbolinks: false,
|
||||
status: 303
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -59,9 +67,13 @@ class TagsController < ApplicationController
|
|||
if @tag.update_attributes(tag_params)
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json {
|
||||
redirect_to my_module_tags_edit_path(params[:my_module_id], @tag, format: :json), :status => 303
|
||||
}
|
||||
format.json do
|
||||
redirect_to my_module_tags_edit_path(params[:my_module_id],
|
||||
@tag,
|
||||
format: :json),
|
||||
turbolinks: false,
|
||||
status: 303
|
||||
end
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
|
@ -84,9 +96,13 @@ class TagsController < ApplicationController
|
|||
flash[:success] = flash_success
|
||||
redirect_to root_path
|
||||
}
|
||||
format.json {
|
||||
redirect_to my_module_tags_edit_path(params[:my_module_id], @tag, format: :json), :status => 303
|
||||
}
|
||||
format.json do
|
||||
redirect_to my_module_tags_edit_path(params[:my_module_id],
|
||||
@tag,
|
||||
format: :json),
|
||||
turbolinks: false,
|
||||
status: 303
|
||||
end
|
||||
end
|
||||
else
|
||||
flash_error = t(
|
||||
|
@ -98,10 +114,12 @@ class TagsController < ApplicationController
|
|||
flash[:error] = flash_error
|
||||
redirect_to root_path
|
||||
}
|
||||
format.json {
|
||||
format.json do
|
||||
# TODO
|
||||
redirect_to my_module_tags_edit_path(format: :json), :status => 303
|
||||
}
|
||||
redirect_to my_module_tags_edit_path(format: :json),
|
||||
turbolinks: false,
|
||||
status: 303
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -94,9 +94,11 @@ class UserMyModulesController < ApplicationController
|
|||
)
|
||||
|
||||
respond_to do |format|
|
||||
format.json {
|
||||
redirect_to my_module_users_edit_path(format: :json), :status => 303
|
||||
}
|
||||
format.json do
|
||||
redirect_to my_module_users_edit_path(format: :json),
|
||||
turbolinks: false,
|
||||
status: 303
|
||||
end
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
|
|
|
@ -66,9 +66,9 @@ class UserProjectsController < ApplicationController
|
|||
)
|
||||
|
||||
respond_to do |format|
|
||||
format.json {
|
||||
redirect_to :action => :index_edit, :format => :json
|
||||
}
|
||||
format.json do
|
||||
redirect_to project_users_edit_path(format: :json), turbolinks: false
|
||||
end
|
||||
end
|
||||
else
|
||||
error = t('user_projects.create.can_add_user_to_project')
|
||||
|
@ -110,9 +110,9 @@ class UserProjectsController < ApplicationController
|
|||
)
|
||||
|
||||
respond_to do |format|
|
||||
format.json {
|
||||
redirect_to :action => :index_edit, :format => :json
|
||||
}
|
||||
format.json do
|
||||
redirect_to project_users_edit_path(format: :json), turbolinks: false
|
||||
end
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
|
@ -145,9 +145,11 @@ class UserProjectsController < ApplicationController
|
|||
generate_notification(current_user, @up.user, false, false, @project)
|
||||
|
||||
respond_to do |format|
|
||||
format.json {
|
||||
redirect_to project_users_edit_path(format: :json), :status => 303
|
||||
}
|
||||
format.json do
|
||||
redirect_to project_users_edit_path(format: :json),
|
||||
turbolinks: false,
|
||||
status: 303
|
||||
end
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
|
|
|
@ -65,8 +65,6 @@
|
|||
<%= render partial: "my_modules/modals/manage_module_tags_modal", locals: { my_module: nil } %>
|
||||
|
||||
<!-- Include all the neccesary JS libraries -->
|
||||
<%= javascript_include_tag("jsPlumb-2.0.4-min") %>
|
||||
<%= javascript_include_tag("jsnetworkx") %>
|
||||
<%= javascript_include_tag("eventPause-min") %>
|
||||
|
||||
<%= javascript_include_tag("projects/canvas") %>
|
||||
|
|
Loading…
Reference in a new issue