Improve displa/hide management with hidden css class.
parent
b19022acf7
commit
54207eca54
|
@ -57,6 +57,8 @@ class BacklogController extends taiga.TaigaController
|
|||
|
||||
return promise
|
||||
|
||||
## Template actions
|
||||
|
||||
deleteUserStory: (us) ->
|
||||
title = "Delete User Story"
|
||||
subtitle = us.subject
|
||||
|
@ -64,6 +66,11 @@ class BacklogController extends taiga.TaigaController
|
|||
@confirm.ask(title, subtitle).then =>
|
||||
console.log "#TODO"
|
||||
|
||||
addNewUs: (type) ->
|
||||
switch type
|
||||
when "standard" then @rootscope.$emit("usform:new")
|
||||
when "bulk" then @rootscope.$emit("usform:bulk")
|
||||
|
||||
|
||||
BacklogDirective = ($compile, $templateCache) ->
|
||||
link = ($scope, $el, $attrs) ->
|
||||
|
|
|
@ -29,7 +29,7 @@ class ConfirmService extends taiga.TaigaService
|
|||
_.bindAll(@)
|
||||
|
||||
hide: ->
|
||||
@.el.css("display", "none")
|
||||
@.el.addClass("hidden")
|
||||
@.el.off(".confirm-dialog")
|
||||
|
||||
ask: (title, subtitle) ->
|
||||
|
@ -49,7 +49,7 @@ class ConfirmService extends taiga.TaigaService
|
|||
defered.reject()
|
||||
@.hide()
|
||||
|
||||
@.el.css("display", "flex")
|
||||
@.el.removeClass("hidden")
|
||||
return defered.promise
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ html(lang="en", ng-app="taiga")
|
|||
body
|
||||
include partials/views/modules/nav
|
||||
div.master(ng-view="")
|
||||
div.lightbox.lightbox_confirm-delete
|
||||
div.hidden.lightbox.lightbox_confirm-delete
|
||||
include partials/views/modules/lightbox_confirm-delete
|
||||
script(src="/js/libs.js?v=#{v}")
|
||||
script(src="/js/app.js?v=#{v}")
|
||||
|
|
|
@ -25,9 +25,9 @@ block content
|
|||
include views/modules/backlog-table
|
||||
sidebar.menu-secondary.sidebar
|
||||
include views/modules/sprints
|
||||
div.lightbox.lightbox_add-new-us
|
||||
div.lightbox.lightbox_add-new-us.hidden(tg-lightbox-create-edit-userstory)
|
||||
include views/modules/lightbox_add-new-us
|
||||
div.lightbox.lightbox_add-bulk
|
||||
div.lightbox.lightbox_add-bulk.hidden
|
||||
include views/modules/lightbox_add-bulk
|
||||
div.lightbox.lightbox_add-sprint
|
||||
div.lightbox.lightbox_add-sprint.hidden
|
||||
include views/modules/lightbox_add-sprint
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
div.new-us
|
||||
a.button-green(href="", title="Add New US")
|
||||
span.text + Add new US
|
||||
a.button-bulk(href="", title="Bulk")
|
||||
span.icon.icon-bulk
|
||||
a.button-green(href="", ng-click="ctrl.addNewUs('standard')", title="Add New US")
|
||||
span.text + Add new US
|
||||
a.button-bulk(href="", ng-click="ctrl.addNewUs('bulk')", title="Bulk")
|
||||
span.icon.icon-bulk
|
||||
|
|
|
@ -56,3 +56,7 @@ body {
|
|||
.icon {
|
||||
font-family: 'taiga';
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
Loading…
Reference in New Issue