mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-25 14:04:54 -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
|
@modelLabel = options.modelLabel
|
||||||
@newModelTitle = "editor.new_#{_.string.slugify @modelLabel}_title"
|
@newModelTitle = "editor.new_#{_.string.slugify @modelLabel}_title"
|
||||||
@properties = options.properties
|
@properties = options.properties
|
||||||
$('#name').ready @focusOnName
|
|
||||||
|
|
||||||
makeNewModel: ->
|
makeNewModel: ->
|
||||||
model = new @modelClass
|
model = new @modelClass
|
||||||
|
@ -45,6 +44,6 @@ module.exports = class NewModelModal extends ModalView
|
||||||
@trigger 'model-created', model
|
@trigger 'model-created', model
|
||||||
#Backbone.Mediator.publish 'model-save-success', model
|
#Backbone.Mediator.publish 'model-save-success', model
|
||||||
|
|
||||||
focusOnName: (e) ->
|
afterInsert: ->
|
||||||
$('#name').focus() # TODO Why isn't this working anymore.. It does get called
|
super()
|
||||||
x
|
_.delay (=> @$el?.find('#name').focus()), 500
|
||||||
|
|
Loading…
Reference in a new issue