Improve drop area on empty sprints

stable
Xavier Julián 2015-10-20 12:19:02 +02:00 committed by Alejandro Alonso
parent 829946095f
commit 86d4d97f34
4 changed files with 15 additions and 9 deletions

View File

@ -35,12 +35,6 @@ BacklogSprintDirective = ($repo, $rootscope) ->
easing: 'linear'
}
refreshSprintTableHeight = (sprintTable) =>
if !sprintTable.find(".row").length
sprintTable.css("height", sprintTableMinHeight)
else
sprintTable.css("height", "auto")
toggleSprint = ($el) =>
sprintTable = $el.find(".sprint-table")
sprintArrow = $el.find(".icon-arrow-up")
@ -48,8 +42,6 @@ BacklogSprintDirective = ($repo, $rootscope) ->
sprintArrow.toggleClass('active')
sprintTable.toggleClass('open')
refreshSprintTableHeight(sprintTable)
link = ($scope, $el, $attrs) ->
$scope.$watch $attrs.tgBacklogSprint, (sprint) ->
sprint = $scope.$eval($attrs.tgBacklogSprint)

View File

@ -951,6 +951,7 @@
"TITLE_LINK_TASKBOARD": "Go to Taskboard of \"{{name}}\"",
"NUMBER_SPRINTS": "<br/>sprints",
"EMPTY": "YOU HAVE NO SPRINTS",
"WARNING_EMPTY_SPRINT": "Drop here Stories from your backlog to start a new sprint",
"TITLE_ACTION_NEW_SPRINT": "Add new sprint",
"TEXT_ACTION_NEW_SPRINT": "You may want to create a new sprint in your project",
"ACTION_SHOW_CLOSED_SPRINTS": "Show closed sprints",

View File

@ -3,7 +3,12 @@ header(tg-backlog-sprint-header, ng-model="sprint")
div.sprint-progress-bar(tg-progress-bar="100 * sprint.closed_points / sprint.total_points")
div.sprint-table
div.row.milestone-us-item-row(ng-repeat="us in sprint.user_stories track by us.id", tg-bind-scope, tg-class-permission="{'readonly': '!modify_us'}")
div.sprint-empty(ng-if="!sprint.user_stories.length") {{ 'BACKLOG.SPRINTS.WARNING_EMPTY_SPRINT' | translate }}
div.row.milestone-us-item-row(
ng-repeat="us in sprint.user_stories track by us.id"
tg-bind-scope
tg-class-permission="{'readonly': '!modify_us'}"
)
div.column-us
a.us-name.clickable(tg-nav="project-userstories-detail:project=project.slug,ref=us.ref",
tg-nav-get-params="{\"milestone\": {{us.milestone}}}"

View File

@ -146,6 +146,14 @@
}
}
.sprint-table {
.sprint-empty {
@extend %light;
background: lighten($gray-light, 18%);
border: 2px dashed lighten($gray-light, 10%);
color: $gray;
padding: 1rem;
text-align: center;
}
.row {
border-bottom: 1px solid $gray-light;
display: flex;