mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -05:00
Remove misc typo. Fix NewModelModal name field focus while at it.
This commit is contained in:
parent
08f983db59
commit
40da26f99c
1 changed files with 3 additions and 4 deletions
|
@ -17,7 +17,6 @@ module.exports = class NewModelModal extends ModalView
|
|||
@modelLabel = options.modelLabel
|
||||
@newModelTitle = "editor.new_#{_.string.slugify @modelLabel}_title"
|
||||
@properties = options.properties
|
||||
$('#name').ready @focusOnName
|
||||
|
||||
makeNewModel: ->
|
||||
model = new @modelClass
|
||||
|
@ -45,6 +44,6 @@ module.exports = class NewModelModal extends ModalView
|
|||
@trigger 'model-created', model
|
||||
#Backbone.Mediator.publish 'model-save-success', model
|
||||
|
||||
focusOnName: (e) ->
|
||||
$('#name').focus() # TODO Why isn't this working anymore.. It does get called
|
||||
x
|
||||
afterInsert: ->
|
||||
super()
|
||||
_.delay (=> @$el?.find('#name').focus()), 500
|
||||
|
|
Loading…
Reference in a new issue