diff --git a/app/coffee/modules/backlog/lightboxes.coffee b/app/coffee/modules/backlog/lightboxes.coffee index a26f5d10..399d7dbd 100644 --- a/app/coffee/modules/backlog/lightboxes.coffee +++ b/app/coffee/modules/backlog/lightboxes.coffee @@ -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() diff --git a/app/styles/components/notification-message.scss b/app/styles/components/notification-message.scss index aad728ec..6f2754cf 100644 --- a/app/styles/components/notification-message.scss +++ b/app/styles/components/notification-message.scss @@ -63,7 +63,7 @@ position: absolute; top: 0; width: 400px; - z-index: 9999; + z-index: 99999; &.inactive { @include transition (all .6s ease-in-out); } diff --git a/app/styles/modules/common/lightbox.scss b/app/styles/modules/common/lightbox.scss index 36df3683..d4622e61 100644 --- a/app/styles/modules/common/lightbox.scss +++ b/app/styles/modules/common/lightbox.scss @@ -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;