2015-04-15 12:30:37 +08:00
|
|
|
<% selector = ".#{watcher_css(watched)}" %>
|
|
|
|
<% id_selector = "#{watcher_css(watched)}" %>
|
|
|
|
if($("<%= selector %>").get(0) == undefined)
|
|
|
|
{
|
|
|
|
$("#<%= id_selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link_for_project(watched, user) %>")});
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link(watched, user) %>")});
|
|
|
|
}
|
|
|
|
|