Sha256: 6b30061efdf80235b8bf943b466ac8ce958dbc56027fd80185d14e25edf6cba4

Contents?: true

Size: 829 Bytes

Versions: 3

Compression:

Stored size: 829 Bytes

Contents

class Lanes.Component.Grid.PopOverEditor extends Lanes.Component.Grid.Editor

    templateName: 'grid/popover-editor'
    templateData: ->
        { columns: this.grid.column_definitions }

    session:
        view: 'object'
        title: 'string'

    move: (row,ev)->
        super
        if @popover
            @popover.destroy()
        @popover = new Lanes.Component.PopOver({
                parent: this
                className: 'grid-popover-editor'
                target: Lanes.$(ev.target)
                title: this.title || this.calculated_title()
                content: this.el
                autoShow: true
            })

    calculated_title: ->
        (if this.model.isNew() then "Create: " else "Edit: ") + this.model.constructor.name

    cancelEditing: ->
        @popover.destroy()
        super

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lanes-0.0.3 client/javascripts/component/grid/PopOverEditor.coffee
lanes-0.0.2 client/javascripts/component/grid/PopOverEditor.coffee
lanes-0.0.1 client/javascripts/component/grid/PopOverEditor.coffee