Fixed custom attribute edition template
parent
e1c0e2e7af
commit
9f6f080a39
|
@ -145,7 +145,6 @@ CustomAttributeValueDirective = ($template, $selectedText) ->
|
||||||
|
|
||||||
saveAttributeValue = ->
|
saveAttributeValue = ->
|
||||||
attributeValue.value = $el.find("input").val()
|
attributeValue.value = $el.find("input").val()
|
||||||
$el.find('.custom-field-single').removeClass('editable')
|
|
||||||
|
|
||||||
$scope.$apply ->
|
$scope.$apply ->
|
||||||
$ctrl.updateAttributeValue(attributeValue).then ->
|
$ctrl.updateAttributeValue(attributeValue).then ->
|
||||||
|
@ -168,7 +167,6 @@ CustomAttributeValueDirective = ($template, $selectedText) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
render(attributeValue, true)
|
render(attributeValue, true)
|
||||||
$el.find("input[name='description']").focus().select()
|
$el.find("input[name='description']").focus().select()
|
||||||
$el.find('.custom-field-single').addClass('editable')
|
|
||||||
|
|
||||||
## Actions (on edit mode)
|
## Actions (on edit mode)
|
||||||
submit = debounce 2000, (event) =>
|
submit = debounce 2000, (event) =>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
form.custom-field-single
|
form.custom-field-single.editable
|
||||||
div.custom-field-data
|
div.custom-field-data
|
||||||
label.custom-field-name(for="custom-field-description")
|
label.custom-field-name(for="custom-field-description")
|
||||||
<%- name %>
|
<%- name %>
|
||||||
|
|
Loading…
Reference in New Issue