mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
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 #cla-link': 'onClickCLALink'
|
||||
'click #agreement-button': 'onAgreedToCLA'
|
||||
'click #submit-patch-button': 'onClickPatchButton'
|
||||
'click #submit-patch-button': 'submitPatch'
|
||||
'submit form': 'submitPatch'
|
||||
|
||||
constructor: (options) ->
|
||||
super options
|
||||
|
@ -45,7 +46,7 @@ module.exports = class SaveVersionModal extends ModalView
|
|||
commitMessage: @$el.find('#commit-message').val()
|
||||
}
|
||||
|
||||
onClickPatchButton: ->
|
||||
submitPatch: ->
|
||||
forms.clearFormAlerts @$el
|
||||
patch = new Patch()
|
||||
patch.set 'delta', @model.getDelta()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue