Sha256: 6f8bc082e43e5fa9e5d09f28176eaf94755aaadbddf9d8c2272e9c3990b9b436

Contents?: true

Size: 1.01 KB

Versions: 14

Compression:

Stored size: 1.01 KB

Contents

// CheckColumn
Ext.grid.CheckColumn = function(config){
    Ext.apply(this, config);
    if(!this.id){
        this.id = Ext.id();
    }
    this.renderer = this.renderer.createDelegate(this);
};

Ext.grid.CheckColumn.prototype ={
    init : function(grid){
        this.grid = grid;
		if (this.disabled) {return;} // SK
        this.grid.on('render', function(){
            var view = this.grid.getView();
            view.mainBody.on('mousedown', this.onMouseDown, this);
        }, this);
    },

    onMouseDown : function(e, t){
        if(t.className && t.className.indexOf('x-grid3-cc-'+this.id) != -1){
            e.stopEvent();
            var index = this.grid.getView().findRowIndex(t);
            var record = this.grid.store.getAt(index);
            record.set(this.dataIndex, !record.data[this.dataIndex]);
        }
    },

    renderer : function(v, p, record){
        p.css += ' x-grid3-check-col-td'; 
        return '<div class="x-grid3-check-col'+(v?'-on':'')+' x-grid3-cc-'+this.id+'">&#160;</div>';
    }
};

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
skozlov-netzke-basepack-0.5.0 lib/netzke/grid_panel_extras/javascripts/check-column.js
skozlov-netzke-basepack-0.5.1 lib/netzke/grid_panel_extras/javascripts/check-column.js
skozlov-netzke-basepack-0.5.2 lib/netzke/grid_panel_extras/javascripts/check-column.js
netzke-basepack-0.5.1 lib/netzke/grid_panel_extras/javascripts/check-column.js
netzke-basepack-0.5.2 lib/netzke/grid_panel_extras/javascripts/check-column.js
netzke-basepack-0.3.10 lib/netzke/grid_panel_extras/javascripts/check-column.js
netzke-basepack-0.3.6 lib/netzke/grid_panel_extras/javascripts/check-column.js
netzke-basepack-0.4.1 lib/netzke/grid_panel_extras/javascripts/check-column.js
netzke-basepack-0.4.2 lib/netzke/grid_panel_extras/javascripts/check-column.js
netzke-basepack-0.4.0 lib/netzke/grid_panel_extras/javascripts/check-column.js
netzke-basepack-0.3.9.1 lib/netzke/grid_panel_extras/javascripts/check-column.js
netzke-basepack-0.3.9 lib/netzke/grid_panel_extras/javascripts/check-column.js
netzke-basepack-0.3.8 lib/netzke/grid_panel_extras/javascripts/check-column.js
netzke-basepack-0.3.7 lib/netzke/grid_panel_extras/javascripts/check-column.js