Merge pull request #471 from taigaio/issue/2698-wip_limit_and_is_archived
Fix probles with status between the options WIP limit and is_archivedstable
commit
fdbf37a758
|
@ -470,13 +470,16 @@ KanbanWipLimitDirective = ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
$el.disableSelection()
|
$el.disableSelection()
|
||||||
|
|
||||||
redrawWipLimit = ->
|
status = $scope.$eval($attrs.tgKanbanWipLimit)
|
||||||
|
|
||||||
|
redrawWipLimit = =>
|
||||||
$el.find(".kanban-wip-limit").remove()
|
$el.find(".kanban-wip-limit").remove()
|
||||||
timeout 200, ->
|
timeout 200, =>
|
||||||
element = $el.find(".kanban-task")[$scope.$eval($attrs.tgKanbanWipLimit)]
|
element = $el.find(".kanban-task")[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>")
|
||||||
|
|
||||||
|
if status and not status.is_archived
|
||||||
$scope.$on "redraw:wip", redrawWipLimit
|
$scope.$on "redraw:wip", redrawWipLimit
|
||||||
$scope.$on "kanban:us:move", redrawWipLimit
|
$scope.$on "kanban:us:move", redrawWipLimit
|
||||||
$scope.$on "usform:new:success", redrawWipLimit
|
$scope.$on "usform:new:success", redrawWipLimit
|
||||||
|
|
|
@ -38,7 +38,7 @@ section.project-us-status
|
||||||
div.icon.icon-check-square(ng-show="value.is_archived")
|
div.icon.icon-check-square(ng-show="value.is_archived")
|
||||||
|
|
||||||
div.status-wip-limit
|
div.status-wip-limit
|
||||||
span {{ value.wip_limit }}
|
span(ng-hide="value.is_archived") {{ value.wip_limit }}
|
||||||
|
|
||||||
div.options-column
|
div.options-column
|
||||||
a.edit-value.icon.icon-edit(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_EDIT_VALUE' | translate}}")
|
a.edit-value.icon.icon-edit(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_EDIT_VALUE' | translate}}")
|
||||||
|
@ -63,8 +63,9 @@ section.project-us-status
|
||||||
ng-options="e.id as e.name | translate for e in [{'id':true, 'name':'COMMON.YES'},{'id':false, 'name': 'COMMON.NO'}]")
|
ng-options="e.id as e.name | translate for e in [{'id':true, 'name':'COMMON.YES'},{'id':false, 'name': 'COMMON.NO'}]")
|
||||||
|
|
||||||
div.status-wip-limit
|
div.status-wip-limit
|
||||||
input(name="wip_limit", type="number", placeholder="{{'ADMIN.US_STATUS.WIP_LIMIT_COLUMN' | translate}}",
|
input(name="wip_limit", type="number", ng-hide="value.is_archived",
|
||||||
ng-model="value.wip_limit", data-type="digits")
|
ng-model="value.wip_limit", data-type="digits",
|
||||||
|
placeholder="{{'ADMIN.US_STATUS.WIP_LIMIT_COLUMN' | translate}}")
|
||||||
|
|
||||||
div.options-column
|
div.options-column
|
||||||
a.save.icon.icon-floppy(href="", title="{{'COMMON.SAVE' | translate}}")
|
a.save.icon.icon-floppy(href="", title="{{'COMMON.SAVE' | translate}}")
|
||||||
|
@ -77,8 +78,9 @@ section.project-us-status
|
||||||
include ../../components/select-color
|
include ../../components/select-color
|
||||||
|
|
||||||
div.status-name
|
div.status-name
|
||||||
input(name="name", type="text", placeholder="{{'ADMIN.US_STATUS.PLACEHOLDER_WRITE_NAME' | translate}}",
|
input(name="name", type="text",
|
||||||
ng-model="newValue.name", data-required="true", data-maxlength="255")
|
ng-model="newValue.name", data-required="true", data-maxlength="255",
|
||||||
|
placeholder="{{'ADMIN.US_STATUS.PLACEHOLDER_WRITE_NAME' | translate}}")
|
||||||
|
|
||||||
div.is-closed-column
|
div.is-closed-column
|
||||||
select(name="is_closed", ng-model="newValue.is_closed", data-required="true",
|
select(name="is_closed", ng-model="newValue.is_closed", data-required="true",
|
||||||
|
@ -89,8 +91,9 @@ section.project-us-status
|
||||||
ng-options="e.id as e.name | translate for e in [{'id':true, 'name':'COMMON.YES'},{'id':false, 'name': 'COMMON.NO'}]")
|
ng-options="e.id as e.name | translate for e in [{'id':true, 'name':'COMMON.YES'},{'id':false, 'name': 'COMMON.NO'}]")
|
||||||
|
|
||||||
div.status-wip-limit
|
div.status-wip-limit
|
||||||
input(name="wip_limit", type="number", placeholder="{{'ADMIN.US_STATUS.WIP_LIMIT_COLUMN' | translate}}",
|
input(name="wip_limit", type="number", ng-hide="newValue.is_archived",
|
||||||
ng-model="newValue.wip_limit", data-type="digits")
|
ng-model="newValue.wip_limit", data-type="digits",
|
||||||
|
placeholder="{{'ADMIN.US_STATUS.WIP_LIMIT_COLUMN' | translate}}")
|
||||||
|
|
||||||
div.options-column
|
div.options-column
|
||||||
a.add-new.icon.icon-floppy(href="", title="{{'COMMON.ADD' | translate}}")
|
a.add-new.icon.icon-floppy(href="", title="{{'COMMON.ADD' | translate}}")
|
||||||
|
|
|
@ -36,7 +36,7 @@ div.kanban-table(tg-kanban-squish-column)
|
||||||
div.kanban-uses-box.task-column(ng-class='{vfold:folds[s.id]}',
|
div.kanban-uses-box.task-column(ng-class='{vfold:folds[s.id]}',
|
||||||
ng-repeat="s in usStatusList track by s.id",
|
ng-repeat="s in usStatusList track by s.id",
|
||||||
tg-kanban-sortable,
|
tg-kanban-sortable,
|
||||||
tg-kanban-wip-limit="s.wip_limit",
|
tg-kanban-wip-limit="s",
|
||||||
tg-kanban-column-height-fixer,
|
tg-kanban-column-height-fixer,
|
||||||
tg-bind-scope)
|
tg-bind-scope)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue