Sha256: c98faefc5e9251d236a08bd479d9497ecf540d239e7b4cab404bbf29c303888d
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 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 template: -> this.FILE.extension.toLowerCase() + "/screens/" + _.underscore( this.FILE.file ) + "/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.1.0 | client/lanes/screens/Base.coffee |