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