Adding last sprint name to sprint creation in backlog

stable
Alejandro Alonso 2014-06-26 16:47:33 +02:00
parent d07289301b
commit 439939faf3
2 changed files with 9 additions and 1 deletions

View File

@ -19,6 +19,9 @@
# File: modules/backlog/lightboxes.coffee # File: modules/backlog/lightboxes.coffee
### ###
taiga = @.taiga
bindOnce = @.taiga.bindOnce
CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope) -> CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope) ->
editDescription = ($scope, $el) -> editDescription = ($scope, $el) ->
@ -182,6 +185,11 @@ CreateSprint = ($repo, $rs, $rootscope) ->
estimated_finish: null estimated_finish: null
} }
lastSprintNameDom = $el.find(".last-sprint-name")
sprintName = $scope.sprints?[0].name
if sprintName?
lastSprintNameDom.text(" last sprint is <strong> #{sprintName} ;-) </strong>")
$el.on "click", ".close", (event) -> $el.on "click", ".close", (event) ->
event.preventDefault() event.preventDefault()
$el.addClass("hidden") $el.addClass("hidden")

View File

@ -3,7 +3,7 @@ a.close(href="", title="close")
form form
h2.title New Sprint h2.title New Sprint
fieldset fieldset
label.last-sprint-name last sprint is <strong> {{sprintname}} ;-) </strong> label.last-sprint-name
input(ng-model="sprint.name", type="text", placeholder="sprint name", name="name", data-required="true") input(ng-model="sprint.name", type="text", placeholder="sprint name", name="name", data-required="true")
fieldset.dates fieldset.dates
input.date-start(tg-date-selector, ng-model="sprint.estimated_start", type="text", placeholder="Estimated Start", data-required="true") input.date-start(tg-date-selector, ng-model="sprint.estimated_start", type="text", placeholder="Estimated Start", data-required="true")