From 078bc698b80a1316abee47dd78613f6b93ed2636 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 4 Jul 2014 10:21:30 +0200 Subject: [PATCH] Improving watchers --- app/coffee/modules/issues/detail.coffee | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/coffee/modules/issues/detail.coffee b/app/coffee/modules/issues/detail.coffee index 339a1915..2ffea9c7 100644 --- a/app/coffee/modules/issues/detail.coffee +++ b/app/coffee/modules/issues/detail.coffee @@ -234,6 +234,13 @@ WatchersDirective = ($rootscope, $confirm) -> watchers = _.map(watcherIds, (watcherId) -> $scope.usersById[watcherId]) html = template({watchers: watchers, editable:editable}) $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 $el.find(".add-watcher").remove()