mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Pass all arguments from constructor to initialize in CoreViews, add lodash to default view context
This commit is contained in:
parent
2a739ea765
commit
b38a6c5060
2 changed files with 3 additions and 2 deletions
|
@ -51,7 +51,7 @@ module.exports = class CocoView extends Backbone.View
|
|||
@listenTo(@supermodel, 'failed', @onResourceLoadFailed)
|
||||
@warnConnectionError = _.throttle(@warnConnectionError, 3000)
|
||||
|
||||
super options
|
||||
super arguments...
|
||||
|
||||
destroy: ->
|
||||
@stopListening()
|
||||
|
@ -130,6 +130,7 @@ module.exports = class CocoView extends Backbone.View
|
|||
context.moment = moment
|
||||
context.translate = $.i18n.t
|
||||
context.view = @
|
||||
context._ = _
|
||||
context
|
||||
|
||||
afterRender: ->
|
||||
|
|
|
@ -22,7 +22,7 @@ module.exports = class ModalView extends CocoView
|
|||
@className = @className.replace ' fade', '' if options.instant or @instant
|
||||
@closeButton = options.closeButton if options.closeButton?
|
||||
@modalWidthPercent = options.modalWidthPercent if options.modalWidthPercent
|
||||
super options
|
||||
super arguments...
|
||||
|
||||
getRenderData: (context={}) ->
|
||||
context = super(context)
|
||||
|
|
Loading…
Reference in a new issue