Set up the save version modal/patch modal to submit on submit form (like pressing enter in an input).
This commit is contained in:
parent
c1f9d51b37
commit
c03004166c
1 changed files with 3 additions and 2 deletions
|
@ -14,7 +14,8 @@ module.exports = class SaveVersionModal extends ModalView
|
||||||
'click #save-version-button': 'onClickSaveButton'
|
'click #save-version-button': 'onClickSaveButton'
|
||||||
'click #cla-link': 'onClickCLALink'
|
'click #cla-link': 'onClickCLALink'
|
||||||
'click #agreement-button': 'onAgreedToCLA'
|
'click #agreement-button': 'onAgreedToCLA'
|
||||||
'click #submit-patch-button': 'onClickPatchButton'
|
'click #submit-patch-button': 'submitPatch'
|
||||||
|
'submit form': 'submitPatch'
|
||||||
|
|
||||||
constructor: (options) ->
|
constructor: (options) ->
|
||||||
super options
|
super options
|
||||||
|
@ -45,7 +46,7 @@ module.exports = class SaveVersionModal extends ModalView
|
||||||
commitMessage: @$el.find('#commit-message').val()
|
commitMessage: @$el.find('#commit-message').val()
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickPatchButton: ->
|
submitPatch: ->
|
||||||
forms.clearFormAlerts @$el
|
forms.clearFormAlerts @$el
|
||||||
patch = new Patch()
|
patch = new Patch()
|
||||||
patch.set 'delta', @model.getDelta()
|
patch.set 'delta', @model.getDelta()
|
||||||
|
|
Reference in a new issue