Improving watchers
parent
bb52653c29
commit
078bc698b8
|
@ -234,6 +234,13 @@ WatchersDirective = ($rootscope, $confirm) ->
|
||||||
watchers = _.map(watcherIds, (watcherId) -> $scope.usersById[watcherId])
|
watchers = _.map(watcherIds, (watcherId) -> $scope.usersById[watcherId])
|
||||||
html = template({watchers: watchers, editable:editable})
|
html = template({watchers: watchers, editable:editable})
|
||||||
$el.html(html)
|
$el.html(html)
|
||||||
|
console.log "--------", watchers, watchers.length
|
||||||
|
if watchers.length == 0
|
||||||
|
if editable
|
||||||
|
$el.find(".title").text("Add watchers")
|
||||||
|
$el.find(".watchers-header").addClass("no-watchers")
|
||||||
|
else
|
||||||
|
$el.find(".watchers-header").hide()
|
||||||
|
|
||||||
if not editable
|
if not editable
|
||||||
$el.find(".add-watcher").remove()
|
$el.find(".add-watcher").remove()
|
||||||
|
|
Loading…
Reference in New Issue