diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-08 08:17:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-08 08:17:55 +0000 |
commit | 5c18e6d0459b3227fd9708a5c621eb9baae573c9 (patch) | |
tree | c32203747cd038f45330373cc13eda75845053b5 /app | |
parent | c4374cb960a08054bf6b92d375bc8ba9afd6c094 (diff) | |
download | redmine-5c18e6d0459b3227fd9708a5c621eb9baae573c9.tar.gz redmine-5c18e6d0459b3227fd9708a5c621eb9baae573c9.zip |
Refresh watchers list when watching/unwatching an issue (#4334).
git-svn-id: http://svn.redmine.org/redmine/trunk@14238 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/views/watchers/_set_watcher.js.erb | 1 | ||||
-rw-r--r-- | app/views/watchers/_watchers.html.erb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/views/watchers/_set_watcher.js.erb b/app/views/watchers/_set_watcher.js.erb index e5cdc4f3e..4090ef6ce 100644 --- a/app/views/watchers/_set_watcher.js.erb +++ b/app/views/watchers/_set_watcher.js.erb @@ -1,2 +1,3 @@ <% selector = ".#{watcher_css(watched)}" %> $("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link(watched, user) %>")}); +$('#watchers').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => watched.first})) %>'); diff --git a/app/views/watchers/_watchers.html.erb b/app/views/watchers/_watchers.html.erb index 697d0bd8e..f3cb895ae 100644 --- a/app/views/watchers/_watchers.html.erb +++ b/app/views/watchers/_watchers.html.erb @@ -1,4 +1,4 @@ -<% if User.current.allowed_to?(:add_issue_watchers, @project) %> +<% if User.current.allowed_to?(:add_issue_watchers, watched.project) %> <div class="contextual"> <%= link_to l(:button_add), {:controller => 'watchers', :action => 'new', :object_type => watched.class.name.underscore, :object_id => watched}, |