Add improvements on add sprint lightbox
parent
5fbe46cc1c
commit
092c7883c3
|
@ -68,7 +68,9 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope, lightboxService, $loading)
|
||||||
$loading.finish(target)
|
$loading.finish(target)
|
||||||
form.setErrors(data)
|
form.setErrors(data)
|
||||||
if data._error_message
|
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 = ->
|
remove = ->
|
||||||
#TODO: i18n
|
#TODO: i18n
|
||||||
|
@ -107,6 +109,7 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope, lightboxService, $loading)
|
||||||
$el.find(".title").text("New sprint") #TODO i18n
|
$el.find(".title").text("New sprint") #TODO i18n
|
||||||
$el.find(".button-green").text("Create") #TODO i18n
|
$el.find(".button-green").text("Create") #TODO i18n
|
||||||
lightboxService.open($el)
|
lightboxService.open($el)
|
||||||
|
$el.find(".sprint-name").focus()
|
||||||
|
|
||||||
$scope.$on "sprintform:edit", (ctx, sprint) ->
|
$scope.$on "sprintform:edit", (ctx, sprint) ->
|
||||||
createSprint = false
|
createSprint = false
|
||||||
|
@ -119,6 +122,14 @@ CreateEditSprint = ($repo, $confirm, $rs, $rootscope, lightboxService, $loading)
|
||||||
$el.find(".title").text("Edit sprint") #TODO i18n
|
$el.find(".title").text("Edit sprint") #TODO i18n
|
||||||
$el.find(".button-green").text("Save") #TODO i18n
|
$el.find(".button-green").text("Save") #TODO i18n
|
||||||
lightboxService.open($el)
|
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) ->
|
$el.on "click", ".button-green", (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
z-index: 9999;
|
z-index: 99999;
|
||||||
&.inactive {
|
&.inactive {
|
||||||
@include transition (all .6s ease-in-out);
|
@include transition (all .6s ease-in-out);
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,14 +231,6 @@
|
||||||
form {
|
form {
|
||||||
@include table-flex-child(0, 600px, 0, 600px);
|
@include table-flex-child(0, 600px, 0, 600px);
|
||||||
}
|
}
|
||||||
.sprint-name {
|
|
||||||
&:focus {
|
|
||||||
+.last-sprint-name {
|
|
||||||
@include transition (opacity .3s linear);
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.last-sprint-name {
|
.last-sprint-name {
|
||||||
@include transition (opacity .3s linear);
|
@include transition (opacity .3s linear);
|
||||||
color: $gray;
|
color: $gray;
|
||||||
|
@ -246,6 +238,10 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 1rem;
|
right: 1rem;
|
||||||
top: .7rem;
|
top: .7rem;
|
||||||
|
&.disappear {
|
||||||
|
@include transition (opacity .3s linear);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.dates {
|
.dates {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
|
|
Loading…
Reference in New Issue