Removes RJS from VersionsController.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10052 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-07-19 18:13:21 +00:00
parent dee586e9eb
commit 3386008491
3 changed files with 6 additions and 1 deletions

View File

@ -165,7 +165,7 @@ class VersionsController < ApplicationController
def status_by def status_by
respond_to do |format| respond_to do |format|
format.html { render :action => 'show' } format.html { render :action => 'show' }
format.js { render(:update) {|page| page.replace_html 'status_by', render_issue_status_by(@version, params[:status_by])} } format.js
end end
end end

View File

@ -0,0 +1 @@
Element.update('status_by', '<%= escape_javascript(render_issue_status_by(@version, params[:status_by])) %>');

View File

@ -196,12 +196,16 @@ class VersionsControllerTest < ActionController::TestCase
def test_issue_status_by def test_issue_status_by
xhr :get, :status_by, :id => 2 xhr :get, :status_by, :id => 2
assert_response :success assert_response :success
assert_template 'status_by'
assert_template '_issue_counts' assert_template '_issue_counts'
end end
def test_issue_status_by_status def test_issue_status_by_status
xhr :get, :status_by, :id => 2, :status_by => 'status' xhr :get, :status_by, :id => 2, :status_by => 'status'
assert_response :success assert_response :success
assert_template 'status_by'
assert_template '_issue_counts' assert_template '_issue_counts'
assert_include 'Assigned', response.body
assert_include 'Closed', response.body
end end
end end