Sha256: 3b35105f3b20b008c5d2d1edaa3162f5a6d2c3c574e74ab857768c23689bb19f
Contents?: true
Size: 1.13 KB
Versions: 1
Compression:
Stored size: 1.13 KB
Contents
#= require ./ChangeListener class ScreenBase constructor: -> super mixins:[ Lanes.Screens.ChangeListener ] initializeChanges:-> @_changeListeners = {} for keypath in ( @usingModels || ['model'] ) @_changeListeners[keypath] = new Lanes.Views.ScreenChangeListener(this, keypath) reset: Lanes.emptyFn templatePrefix: -> this.FILE.extensionName.toLowerCase() + "/screens/" render: -> previouslyRendered = this.rendered Lanes.Views.RenderContext.start(this) # Lanes.re we cheat and skip ViewBase so it doesn't push to context this.reset() this.renderContextFree() #Lanes.Views.Base.__super__.render.apply(this, arguments) this.renderAllSubviews() if previouslyRendered Lanes.Views.RenderContext.reset() this addButton: (config, align='left')-> this.$(".toolbar ." + align).append( Lanes.Views.Helpers.button(config) ) # By doing extending in this fashion, the class will appear as ScreenBase # during debugging, allowing it to be easily identified Lanes.Screens.Base = Lanes.Views.Base.extend( ScreenBase )
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lanes-0.1.2 | client/lanes/screens/Base.coffee |