Commits

Anonymous committed 0200519

Manually generates the javascript that prototype_helper fails to do with ruby1.9.2.

Comments (0)

Files changed (1)

app/controllers/watchers_controller.rb

         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
       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