Clean code (minor refactor)

stable
David Barragán Merino 2014-06-27 14:53:59 +02:00
parent fab4d6ffe7
commit 120f42d383
1 changed files with 17 additions and 11 deletions

View File

@ -27,8 +27,23 @@ scopeDefer = @.taiga.scopeDefer
bindOnce = @.taiga.bindOnce
groupBy = @.taiga.groupBy
module = angular.module("taigaBacklog")
#############################################################################
## Backlog Controller
#############################################################################
class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin)
@.$inject = [
"$scope",
"$rootScope",
"$tgRepo",
"$tgConfirm",
"$tgResources",
"$routeParams",
"$q"
]
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q) ->
_.bindAll(@)
@ -140,6 +155,8 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin)
addNewSprint: () ->
@rootscope.$broadcast("sprintform:create")
module.controller("BacklogController", BacklogController)
#############################################################################
## Backlog Directive
@ -698,7 +715,6 @@ GmBacklogGraphDirective = ->
return {link: link}
module = angular.module("taigaBacklog")
module.directive("tgBacklog", ["$tgRepo", BacklogDirective])
module.directive("tgBacklogSprint", ["$tgRepo", BacklogSprintDirective])
module.directive("tgUsPoints", ["$tgRepo", UsPointsDirective])
@ -706,13 +722,3 @@ module.directive("tgUsRolePointsSelector", ["$rootScope", UsRolePointsSelectorDi
module.directive("tgGmBacklogGraph", GmBacklogGraphDirective)
module.controller("BacklogController", [
"$scope",
"$rootScope",
"$tgRepo",
"$tgConfirm",
"$tgResources",
"$routeParams",
"$q",
BacklogController
])