Sha256: a6df3b69b3270b60762a3c634b744e8f96fe7bf27e4fb31e2f3f1af20b8b8e74

Contents?: true

Size: 899 Bytes

Versions: 6

Compression:

Stored size: 899 Bytes

Contents

class Lanes.Components.Grid.RowEditor extends Lanes.Components.Grid.Editor

    template: 'grid/row-editor'

    move: (row)->
        super
        pos = this.row.position()
        this.$el.css({
            left: pos.left, top: pos.top, width: this.row.width()
        })
        this.$('form').css({
            height: this.row.height()
        })
        inputs = this.form.children()
        for input, index in inputs
            column = Lanes.$(this.row[0].cells[index])
            definition = this.grid.columnDefinitions[index]
            Lanes.$(input)
                .width(column.width())
                .css("left", column.position().left)
                .val(this.model.get(definition.field))
        this.form.find('.edit').first().focus()



    render: ->
        super
        for cell in this.row[0].cells
            this.form.append('<input class="edit">')
        this

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lanes-0.1.9 client/lanes/components/grid/RowEditor.coffee
lanes-0.1.8 client/lanes/components/grid/RowEditor.coffee
lanes-0.1.7 client/lanes/components/grid/RowEditor.coffee
lanes-0.1.6 client/lanes/components/grid/RowEditor.coffee
lanes-0.1.5 client/lanes/components/grid/RowEditor.coffee
lanes-0.1.2 client/lanes/components/grid/RowEditor.coffee