Add separations between directives on backlog lightboxes.

stable
Andrey Antukh 2014-07-10 19:58:44 +02:00
parent 8c1c3a376d
commit 6bc662a1b9
1 changed files with 29 additions and 16 deletions

View File

@ -22,6 +22,12 @@
taiga = @.taiga
bindOnce = @.taiga.bindOnce
module = angular.module("taigaBacklog")
#############################################################################
## Create/Edit Userstory Lightbox Directive
#############################################################################
CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope) ->
link = ($scope, $el, attrs) ->
isNew = true
@ -104,6 +110,17 @@ CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope) ->
return {link: link}
module.directive("tgLbCreateEditUserstory", [
"$tgRepo",
"$tgModel",
"$tgResources",
"$rootScope",
CreateEditUserstoryDirective
])
#############################################################################
## Creare Bulk Userstories Lightbox Directive
#############################################################################
CreateBulkUserstoriesDirective = ($repo, $rs, $rootscope) ->
link = ($scope, $el, attrs) ->
@ -136,11 +153,23 @@ CreateBulkUserstoriesDirective = ($repo, $rs, $rootscope) ->
return {link: link}
module.directive("tgLbCreateBulkUserstories", [
"$tgRepo",
"$tgResources",
"$rootScope",
CreateBulkUserstoriesDirective
])
#############################################################################
## Creare/Edit Sprint Lightbox Directive
#############################################################################
CreateEditSprint = ($repo, $confirm, $rs, $rootscope) ->
link = ($scope, $el, attrs) ->
createSprint = true
# FIXME: form should be initialized once and used in
# each submit...
submit = ->
form = $el.find("form").checksley()
if not form.validate()
@ -217,22 +246,6 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope) ->
return {link: link}
module = angular.module("taigaBacklog")
module.directive("tgLbCreateEditUserstory", [
"$tgRepo",
"$tgModel",
"$tgResources",
"$rootScope",
CreateEditUserstoryDirective
])
module.directive("tgLbCreateBulkUserstories", [
"$tgRepo",
"$tgResources",
"$rootScope",
CreateBulkUserstoriesDirective
])
module.directive("tgLbCreateEditSprint", [
"$tgRepo",
"$tgConfirm",