Resizin backlog graph automatically
parent
d62b99dc35
commit
3ffecdfe22
|
@ -162,7 +162,7 @@ module.controller("BacklogController", BacklogController)
|
||||||
## Backlog Directive
|
## Backlog Directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
BacklogDirective = ($repo) ->
|
BacklogDirective = ($repo, $rootscope) ->
|
||||||
#########################
|
#########################
|
||||||
## Doom line Link
|
## Doom line Link
|
||||||
#########################
|
#########################
|
||||||
|
@ -322,6 +322,7 @@ BacklogDirective = ($repo) ->
|
||||||
$el.find("sidebar.filters-bar").toggle()
|
$el.find("sidebar.filters-bar").toggle()
|
||||||
target.toggleClass("active")
|
target.toggleClass("active")
|
||||||
toggleText(target.find(".text"), ["Hide Filters", "Show Filters"]) # TODO: i18n
|
toggleText(target.find(".text"), ["Hide Filters", "Show Filters"]) # TODO: i18n
|
||||||
|
$rootscope.$broadcast("resize")
|
||||||
|
|
||||||
$el.on "click", "#show-tags", (event) ->
|
$el.on "click", "#show-tags", (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
@ -339,7 +340,7 @@ BacklogDirective = ($repo) ->
|
||||||
targetScope.tag.selected = not (targetScope.tag.selected or false)
|
targetScope.tag.selected = not (targetScope.tag.selected or false)
|
||||||
$ctrl.filterVisibleUserstories()
|
$ctrl.filterVisibleUserstories()
|
||||||
|
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs, $rootscope) ->
|
||||||
$ctrl = $el.controller()
|
$ctrl = $el.controller()
|
||||||
linkSortable($scope, $el, $attrs, $ctrl)
|
linkSortable($scope, $el, $attrs, $ctrl)
|
||||||
linkMoveToCurrentSprint($scope, $el, $attrs, $ctrl)
|
linkMoveToCurrentSprint($scope, $el, $attrs, $ctrl)
|
||||||
|
@ -709,13 +710,16 @@ GmBacklogGraphDirective = ->
|
||||||
if $scope.stats?
|
if $scope.stats?
|
||||||
redrawChart(element, $scope.stats)
|
redrawChart(element, $scope.stats)
|
||||||
|
|
||||||
|
$scope.$on "resize", ->
|
||||||
|
redrawChart(element, $scope.stats)
|
||||||
|
|
||||||
$scope.$on "$destroy", ->
|
$scope.$on "$destroy", ->
|
||||||
$el.off()
|
$el.off()
|
||||||
|
|
||||||
return {link: link}
|
return {link: link}
|
||||||
|
|
||||||
|
|
||||||
module.directive("tgBacklog", ["$tgRepo", BacklogDirective])
|
module.directive("tgBacklog", ["$tgRepo", "$rootScope", BacklogDirective])
|
||||||
module.directive("tgBacklogSprint", ["$tgRepo", BacklogSprintDirective])
|
module.directive("tgBacklogSprint", ["$tgRepo", BacklogSprintDirective])
|
||||||
module.directive("tgUsPoints", ["$tgRepo", UsPointsDirective])
|
module.directive("tgUsPoints", ["$tgRepo", UsPointsDirective])
|
||||||
module.directive("tgUsRolePointsSelector", ["$rootScope", UsRolePointsSelectorDirective])
|
module.directive("tgUsRolePointsSelector", ["$rootScope", UsRolePointsSelectorDirective])
|
||||||
|
|
|
@ -141,6 +141,9 @@ MainTaigaDirective = ($log, $compile, $rootscope) ->
|
||||||
linkProjecsNav($scope, $el, $attrs, $ctrl)
|
linkProjecsNav($scope, $el, $attrs, $ctrl)
|
||||||
linkMenuNav($scope, $el, $attrs, $ctrl)
|
linkMenuNav($scope, $el, $attrs, $ctrl)
|
||||||
|
|
||||||
|
window.onresize = () ->
|
||||||
|
$rootscope.$broadcast("resize")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
controller: MainTaigaController
|
controller: MainTaigaController
|
||||||
link: link
|
link: link
|
||||||
|
|
Loading…
Reference in New Issue