Change ng-hide for ng-show
parent
e986cf1dd8
commit
a2cc055f08
|
@ -92,6 +92,15 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
unblock: ->
|
||||
@rootscope.$broadcast("unblock", @scope.issue)
|
||||
|
||||
delete: ->
|
||||
#TODO: i18n
|
||||
title = "Delete Issue"
|
||||
subtitle = @scope.issue.subject
|
||||
|
||||
@confirm.ask(title, subtitle).then =>
|
||||
@.repo.remove(@scope.issue).then =>
|
||||
@location.path("/project/#{@scope.project.slug}/issues")
|
||||
|
||||
module.controller("IssueDetailController", IssueDetailController)
|
||||
|
||||
|
||||
|
@ -234,7 +243,6 @@ 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")
|
||||
|
|
|
@ -15,7 +15,7 @@ block content
|
|||
div.us-title
|
||||
input(type="text", ng-model="issue.subject")
|
||||
|
||||
div.blocked-warning(ng-hide="!issue.is_blocked")
|
||||
div.blocked-warning(ng-show="issue.is_blocked")
|
||||
span.icon.icon-warning
|
||||
p.blocked Blocked!
|
||||
p(tg-bind-html="issue.blocked_note_html")
|
||||
|
@ -55,8 +55,8 @@ block content
|
|||
// label.clickable.button.button-green(for="team-requirement", ng-class="{true:'active', false:''}[issue.team_requirement]") Team requirement
|
||||
// input(ng-model="issue.team_requirement", type="checkbox", id="team-requirement", name="team-requirement")
|
||||
|
||||
a.button.button-gray.clickable(ng-hide="issue.is_blocked", ng-click="ctrl.block()") Block
|
||||
a.button.button-red(href="") Delete
|
||||
a.button.button-gray.clickable(ng-show="!issue.is_blocked", ng-click="ctrl.block()") Block
|
||||
a.button.button-red(ng-click="ctrl.delete()", href="") Delete
|
||||
|
||||
div.lightbox.lightbox_block.hidden(tg-lb-block, title="Blocking issue", ng-model="issue")
|
||||
include views/modules/lightbox_block
|
||||
|
|
|
@ -20,7 +20,7 @@ block content
|
|||
a.icon.icon-arrow-left(href="", title="next issue")
|
||||
a.icon.icon-arrow-right(href="", title="previous issue")
|
||||
|
||||
div.blocked-warning(ng-hide="!issue.is_blocked")
|
||||
div.blocked-warning(ng-show="issue.is_blocked")
|
||||
span.icon.icon-warning
|
||||
p.blocked Blocked!
|
||||
p(tg-bind-html="issue.blocked_note_html")
|
||||
|
|
Loading…
Reference in New Issue