Add improvements on add sprint lightbox

stable
Jesús Espino 2014-09-17 11:13:00 +02:00
parent 5fbe46cc1c
commit 092c7883c3
3 changed files with 17 additions and 10 deletions

View File

@ -68,7 +68,9 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope, lightboxService, $loading)
$loading.finish(target)
form.setErrors(data)
if data._error_message
$confirm.notify("error", data._error_message)
$confirm.notify("light-error", data._error_message)
else if data.__all__
$confirm.notify("light-error", data.__all__[0])
remove = ->
#TODO: i18n
@ -107,6 +109,7 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope, lightboxService, $loading)
$el.find(".title").text("New sprint") #TODO i18n
$el.find(".button-green").text("Create") #TODO i18n
lightboxService.open($el)
$el.find(".sprint-name").focus()
$scope.$on "sprintform:edit", (ctx, sprint) ->
createSprint = false
@ -119,6 +122,14 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope, lightboxService, $loading)
$el.find(".title").text("Edit sprint") #TODO i18n
$el.find(".button-green").text("Save") #TODO i18n
lightboxService.open($el)
$el.find(".sprint-name").focus().select()
$el.find(".last-sprint-name").addClass("disappear")
$el.on "keyup", ".sprint-name", (event) ->
if $el.find(".sprint-name").val().length > 0
$el.find(".last-sprint-name").addClass("disappear")
else
$el.find(".last-sprint-name").removeClass("disappear")
$el.on "click", ".button-green", (event) ->
event.preventDefault()

View File

@ -63,7 +63,7 @@
position: absolute;
top: 0;
width: 400px;
z-index: 9999;
z-index: 99999;
&.inactive {
@include transition (all .6s ease-in-out);
}

View File

@ -231,14 +231,6 @@
form {
@include table-flex-child(0, 600px, 0, 600px);
}
.sprint-name {
&:focus {
+.last-sprint-name {
@include transition (opacity .3s linear);
opacity: 0;
}
}
}
.last-sprint-name {
@include transition (opacity .3s linear);
color: $gray;
@ -246,6 +238,10 @@
position: absolute;
right: 1rem;
top: .7rem;
&.disappear {
@include transition (opacity .3s linear);
opacity: 0;
}
}
.dates {
margin-bottom: 1rem;