Ft/custom fields (#1631)

* Set focus after create a new option for the dropdown custom field

* Repair JS error when adding options to a dropdown custom field
stable
Daniel García Barcala 2018-11-22 22:22:51 +01:00 committed by Alex Hermida
parent 2855706c78
commit 3b9081252c
2 changed files with 3 additions and 2 deletions

View File

@ -945,12 +945,13 @@ ProjectCustomAttributesDirective = ($log, $confirm, animationFrame, $translate)
addExtraOption = (formEl, formExtraEl) ->
formScope = formEl.scope()
attrExtra = if formScope.newAttr then formScope.newAttr.extra else formScope.attr.extra
attrExtra = if formScope.newAttr?.extra then formScope.newAttr.extra else formScope.attr.extra
attrExtra.push("")
formScope.$apply()
formEl.find(".js-edit-custom-field-extra").last().removeClass("hidden")
formEl.find(".js-view-custom-field-extra").last().addClass("hidden")
formEl.find(".js-edit-custom-field-extra input").last().focus()
removeExtraOption = (formEl, formExtraEl) ->
attrExtra = formEl.scope().attr.extra

File diff suppressed because one or more lines are too long