From 42b5c332b2c24c8dcc2581e0cd130ef930959d99 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 17 Apr 2016 07:40:39 +0000 Subject: Lists can be reordered with drag and drop (#12909). git-svn-id: http://svn.redmine.org/redmine/trunk@15336 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issue_statuses_controller.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'app/controllers/issue_statuses_controller.rb') 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 -- cgit v1.2.3