summaryrefslogtreecommitdiffstats
path: root/app/controllers/watchers_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-25 18:17:00 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-25 18:17:00 +0000
commitd15ab86459a70d5aa8e19f3f8922f70ea6b8b44e (patch)
treec4e61d43d9d3393e3309c53b3593fa69e8478660 /app/controllers/watchers_controller.rb
parent5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7 (diff)
downloadredmine-d15ab86459a70d5aa8e19f3f8922f70ea6b8b44e.tar.gz
redmine-d15ab86459a70d5aa8e19f3f8922f70ea6b8b44e.zip
Manually generates the javascript that prototype_helper fails to do with ruby1.9.2.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9529 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/watchers_controller.rb')
-rw-r--r--app/controllers/watchers_controller.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb
index c4f857f98..f462a3859 100644
--- a/app/controllers/watchers_controller.rb
+++ b/app/controllers/watchers_controller.rb
@@ -70,9 +70,7 @@ class WatchersController < ApplicationController
format.js do
render :update do |page|
users.each do |user|
- page.select("#issue_watcher_user_ids_#{user.id}").each do |item|
- page.remove item
- end
+ page << %|$$("#issue_watcher_user_ids_#{user.id}").each(function(el){el.remove();});|
end
page.insert_html :bottom, 'watchers_inputs', :text => watchers_checkboxes(nil, users, true)
end
@@ -122,9 +120,7 @@ private
format.js do
render(:update) do |page|
c = watcher_css(@watched)
- page.select(".#{c}").each do |item|
- page.replace_html item, watcher_link(@watched, user)
- end
+ page << %|$$(".#{c}").each(function(el){el.innerHTML="#{escape_javascript watcher_link(@watched, user)}"});|
end
end
end