Sha256: c033230eeb9c5763fdd6f4d67c53ef7e35ea7ec5d92621640a3a873d0bb5aa3b
Contents?: true
Size: 1.21 KB
Versions: 1
Compression:
Stored size: 1.21 KB
Contents
#= require ./ChangeListener class ScreenBase constructor: -> super namespace: "Screens" mixins:[ Lanes.Screens.ChangeListener ] initializeChanges:-> @_changeListeners = {} for keypath in ( @usingModels || ['model'] ) @_changeListeners[keypath] = new Lanes.Views.ScreenChangeListener(this, keypath) reset: Lanes.emptyFn template: -> this.namespace.name.toLowerCase() + "/screens/" + this.constructor.name.toLowerCase() + "/layout"; 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.0.5 | client/lanes/screens/Base.coffee |