summaryrefslogtreecommitdiffstats
path: root/app/controllers/issue_statuses_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-17 07:40:39 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-17 07:40:39 +0000
commit42b5c332b2c24c8dcc2581e0cd130ef930959d99 (patch)
tree3ddade3fa50427138419d48c57b20d93ac960048 /app/controllers/issue_statuses_controller.rb
parent64afa24a7f72526a2cbf6761e51b6cd326aa0c36 (diff)
downloadredmine-42b5c332b2c24c8dcc2581e0cd130ef930959d99.tar.gz
redmine-42b5c332b2c24c8dcc2581e0cd130ef930959d99.zip
Lists can be reordered with drag and drop (#12909).
git-svn-id: http://svn.redmine.org/redmine/trunk@15336 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issue_statuses_controller.rb')
-rw-r--r--app/controllers/issue_statuses_controller.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/controllers/issue_statuses_controller.rb b/app/controllers/issue_statuses_controller.rb
index 6d574fe87..e49878f1d 100644
--- a/app/controllers/issue_statuses_controller.rb
+++ b/app/controllers/issue_statuses_controller.rb
@@ -51,10 +51,18 @@ class IssueStatusesController < ApplicationController
def update
@issue_status = IssueStatus.find(params[:id])
if @issue_status.update_attributes(params[:issue_status])
- flash[:notice] = l(:notice_successful_update)
- redirect_to issue_statuses_path(:page => params[:page])
+ respond_to do |format|
+ format.html {
+ flash[:notice] = l(:notice_successful_update)
+ redirect_to issue_statuses_path(:page => params[:page])
+ }
+ format.js { render :nothing => true }
+ end
else
- render :action => 'edit'
+ respond_to do |format|
+ format.html { render :action => 'edit' }
+ format.js { render :nothing => true, :status => 422 }
+ end
end
end