]> source.dussan.org Git - redmine.git/commitdiff
Manually generates the javascript that prototype_helper fails to do with ruby1.9.2.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 25 Apr 2012 18:17:00 +0000 (18:17 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 25 Apr 2012 18:17:00 +0000 (18:17 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9529 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/watchers_controller.rb

index c4f857f985655596707d0e7d776ddbd269aea3d9..f462a38595308603a52ab699b3f5512f2c536d6e 100644 (file)
@@ -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