@@ -42,6 +42,7 class WatchersController < ApplicationController | |||||
42 | render :update do |page| |
|
42 | render :update do |page| | |
43 | page.replace_html 'ajax-modal', :partial => 'watchers/new', :locals => {:watched => @watched} |
|
43 | page.replace_html 'ajax-modal', :partial => 'watchers/new', :locals => {:watched => @watched} | |
44 | page << "showModal('ajax-modal', '400px');" |
|
44 | page << "showModal('ajax-modal', '400px');" | |
|
45 | page << "$('ajax-modal').addClassName('new-watcher');" | |||
45 | end |
|
46 | end | |
46 | end |
|
47 | end | |
47 | end |
|
48 | end |
@@ -5,7 +5,8 | |||||
5 | :action => 'new', |
|
5 | :action => 'new', | |
6 | :object_type => watched.class.name.underscore, |
|
6 | :object_type => watched.class.name.underscore, | |
7 | :object_id => watched}, |
|
7 | :object_id => watched}, | |
8 |
:method => 'get' |
|
8 | :method => 'get', | |
|
9 | :before => "if ($('ajax-modal').hasClassName('new-watcher')) {showModal('ajax-modal'); return false;}" %> | |||
9 | </div> |
|
10 | </div> | |
10 | <% end %> |
|
11 | <% end %> | |
11 |
|
12 |
General Comments 0
You need to be logged in to leave comments.
Login now