Merge pull request #178 from FlorianBezagu/use_enter_to_create_task
Catch submit event of form to create and edit taskstable
commit
895ebb4444
|
@ -54,6 +54,15 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootscope, lightboxService) ->
|
|||
lightboxService.open($el)
|
||||
|
||||
$el.on "click", ".button-green", debounce 2000, (event) ->
|
||||
formSubmitted event
|
||||
|
||||
$el.on "submit", "form", debounce 2000, (event) ->
|
||||
formSubmitted event
|
||||
|
||||
$scope.$on "$destroy", ->
|
||||
$el.off()
|
||||
|
||||
formSubmitted = (event) ->
|
||||
event.preventDefault()
|
||||
|
||||
form = $el.find("form").checksley()
|
||||
|
@ -72,9 +81,6 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootscope, lightboxService) ->
|
|||
lightboxService.close($el)
|
||||
$rootscope.$broadcast(broadcastEvent, data)
|
||||
|
||||
$scope.$on "$destroy", ->
|
||||
$el.off()
|
||||
|
||||
return {link: link}
|
||||
|
||||
|
||||
|
|
|
@ -34,5 +34,6 @@ form
|
|||
|
||||
tg-blocking-message-input(watch="task.is_blocked", ng-model="task.blocked_note")
|
||||
|
||||
button(title="Save" style="display: none;")
|
||||
a.button.button-green(href="", title="Save")
|
||||
span Create
|
||||
|
|
Loading…
Reference in New Issue