Revision 1298:4f746d8966dd app/views/watchers
| app/views/watchers/_new.html.erb | ||
|---|---|---|
| 2 | 2 |
|
| 3 | 3 |
<%= form_tag({:controller => 'watchers',
|
| 4 | 4 |
:action => (watched ? 'create' : 'append'), |
| 5 |
:object_type => watched.class.name.underscore, |
|
| 6 |
:object_id => watched}, |
|
| 5 |
:object_type => (watched && watched.class.name.underscore), |
|
| 6 |
:object_id => watched, |
|
| 7 |
:project_id => @project}, |
|
| 7 | 8 |
:remote => true, |
| 8 | 9 |
:method => :post, |
| 9 | 10 |
:id => 'new-watcher-form') do %> |
| ... | ... | |
| 11 | 12 |
<p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p> |
| 12 | 13 |
<%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript url_for(:controller => 'watchers',
|
| 13 | 14 |
:action => 'autocomplete_for_user', |
| 14 |
:object_type => watched.class.name.underscore, |
|
| 15 |
:object_id => watched) }')" %> |
|
| 15 |
:object_type => (watched && watched.class.name.underscore), |
|
| 16 |
:object_id => watched, |
|
| 17 |
:project_id => @project) }')" %> |
|
| 16 | 18 |
|
| 17 | 19 |
<div id="users_for_watcher"> |
| 18 | 20 |
<%= principals_check_box_tags 'watcher[user_ids][]', (watched ? watched.addable_watcher_users : User.active.all(:limit => 100)) %> |
| app/views/watchers/_set_watcher.js.erb | ||
|---|---|---|
| 1 | 1 |
<% selector = ".#{watcher_css(watched)}" %>
|
| 2 |
$("<%= selector %>").each(function(){$(this).html("<%= escape_javascript watcher_link(watched, user) %>")});
|
|
| 2 |
$("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link(watched, user) %>")});
|
|
Also available in: Unified diff