git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8593 e93f8b46-1217-0410-a6f0-8f06a7374b81tags/1.4.0
render :update do |page| | render :update do |page| | ||||
page.replace_html 'ajax-modal', :partial => 'watchers/new', :locals => {:watched => @watched} | page.replace_html 'ajax-modal', :partial => 'watchers/new', :locals => {:watched => @watched} | ||||
page << "showModal('ajax-modal', '400px');" | page << "showModal('ajax-modal', '400px');" | ||||
page << "$('ajax-modal').addClassName('new-watcher');" | |||||
end | end | ||||
end | end | ||||
end | end |
:action => 'new', | :action => 'new', | ||||
:object_type => watched.class.name.underscore, | :object_type => watched.class.name.underscore, | ||||
:object_id => watched}, | :object_id => watched}, | ||||
:method => 'get' %> | |||||
:method => 'get', | |||||
:before => "if ($('ajax-modal').hasClassName('new-watcher')) {showModal('ajax-modal'); return false;}" %> | |||||
</div> | </div> | ||||
<% end %> | <% end %> | ||||