Sha256: b8fe09bdf2d7db40c2e155bf9b929ea7d18968d7f2c9c83007c20e0f5f0a05ce

Contents?: true

Size: 938 Bytes

Versions: 4

Compression:

Stored size: 938 Bytes

Contents

#= require ./ChangeListener

class ScreenBase

    abstractClass: true

    constructor: ->
        super

    mixins:[
        Lanes.Screens.ChangeListener
    ]

    reset: Lanes.emptyFn

    templateName: 'layout'

    render: ->
        previouslyRendered = this.rendered
        Lanes.Views.RenderContext.start(this)
        # Here 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

4 entries across 4 versions & 1 rubygems

Version Path
lanes-0.1.8 client/lanes/screens/Base.coffee
lanes-0.1.7 client/lanes/screens/Base.coffee
lanes-0.1.6 client/lanes/screens/Base.coffee
lanes-0.1.5 client/lanes/screens/Base.coffee