Minor code style cleaning at kanban/main.coffee file.
parent
94348795cf
commit
7a960b844a
|
@ -135,11 +135,12 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
|
||||||
loadProject: ->
|
loadProject: ->
|
||||||
return @rs.projects.get(@scope.projectId).then (project) =>
|
return @rs.projects.get(@scope.projectId).then (project) =>
|
||||||
@scope.project = project
|
@scope.project = project
|
||||||
@scope.$emit('project:loaded', project)
|
|
||||||
@scope.points = _.sortBy(project.points, "order")
|
@scope.points = _.sortBy(project.points, "order")
|
||||||
@scope.pointsById = groupBy(project.points, (x) -> x.id)
|
@scope.pointsById = groupBy(project.points, (x) -> x.id)
|
||||||
@scope.usStatusById = groupBy(project.us_statuses, (x) -> x.id)
|
@scope.usStatusById = groupBy(project.us_statuses, (x) -> x.id)
|
||||||
@scope.usStatusList = _.sortBy(project.us_statuses, "order")
|
@scope.usStatusList = _.sortBy(project.us_statuses, "order")
|
||||||
|
|
||||||
|
@scope.$emit("project:loaded", project)
|
||||||
return project
|
return project
|
||||||
|
|
||||||
loadInitialData: ->
|
loadInitialData: ->
|
||||||
|
@ -245,12 +246,12 @@ module.directive("tgKanbanRowSizeFixer", KanbanRowSizeFixer)
|
||||||
KanbanUserstoryDirective = ($rootscope) ->
|
KanbanUserstoryDirective = ($rootscope) ->
|
||||||
link = ($scope, $el, $attrs, $model) ->
|
link = ($scope, $el, $attrs, $model) ->
|
||||||
$el.find(".icon-edit").on "click", (event) ->
|
$el.find(".icon-edit").on "click", (event) ->
|
||||||
if $el.find('.icon-edit').hasClass('noclick')
|
if $el.find(".icon-edit").hasClass("noclick")
|
||||||
return
|
return
|
||||||
$scope.$apply ->
|
$scope.$apply ->
|
||||||
$rootscope.$broadcast("usform:edit", $model.$modelValue)
|
$rootscope.$broadcast("usform:edit", $model.$modelValue)
|
||||||
if $scope.us.is_blocked
|
if $scope.us.is_blocked
|
||||||
$el.addClass('blocked')
|
$el.addClass("blocked")
|
||||||
$el.disableSelection()
|
$el.disableSelection()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -272,9 +273,9 @@ KanbanWipLimitDirective = ->
|
||||||
$el.disableSelection()
|
$el.disableSelection()
|
||||||
|
|
||||||
redrawWipLimit = ->
|
redrawWipLimit = ->
|
||||||
$el.find('.kanban-wip-limit').remove()
|
$el.find(".kanban-wip-limit").remove()
|
||||||
timeout 200, ->
|
timeout 200, ->
|
||||||
element = $el.find('.kanban-task')[$scope.status.wip_limit]
|
element = $el.find(".kanban-task")[$scope.status.wip_limit]
|
||||||
if element
|
if element
|
||||||
angular.element(element).before("<div class='kanban-wip-limit'></div>")
|
angular.element(element).before("<div class='kanban-wip-limit'></div>")
|
||||||
|
|
||||||
|
@ -326,7 +327,7 @@ KanbanUserDirective = ($log) ->
|
||||||
username_label = $el.parent().find("a.task-assigned")
|
username_label = $el.parent().find("a.task-assigned")
|
||||||
username_label.html(ctx.name)
|
username_label.html(ctx.name)
|
||||||
username_label.on "click", (event) ->
|
username_label.on "click", (event) ->
|
||||||
if $el.find('a').hasClass('noclick')
|
if $el.find("a").hasClass("noclick")
|
||||||
return
|
return
|
||||||
|
|
||||||
us = $model.$modelValue
|
us = $model.$modelValue
|
||||||
|
@ -337,7 +338,7 @@ KanbanUserDirective = ($log) ->
|
||||||
if project.my_permissions.indexOf("modify_us") > -1
|
if project.my_permissions.indexOf("modify_us") > -1
|
||||||
clickable = true
|
clickable = true
|
||||||
$el.on "click", (event) =>
|
$el.on "click", (event) =>
|
||||||
if $el.find('a').hasClass('noclick')
|
if $el.find("a").hasClass("noclick")
|
||||||
return
|
return
|
||||||
|
|
||||||
us = $model.$modelValue
|
us = $model.$modelValue
|
||||||
|
|
Loading…
Reference in New Issue