[webui] make CheckColumn obey readonly status
This commit is contained in:
parent
0956101299
commit
3ab17d4919
1 changed files with 4 additions and 1 deletions
|
@ -43,6 +43,8 @@ Ext.ux.grid.CheckColumn = Ext.extend(Ext.grid.Column, {
|
|||
* Process and refire events routed from the GridView's processEvent method.
|
||||
*/
|
||||
processEvent : function(name, e, grid, rowIndex, colIndex){
|
||||
if (!this.editable)
|
||||
return false;
|
||||
if (name == 'mousedown') {
|
||||
var record = grid.store.getAt(rowIndex);
|
||||
record.set(this.dataIndex, !record.data[this.dataIndex]);
|
||||
|
@ -54,7 +56,8 @@ Ext.ux.grid.CheckColumn = Ext.extend(Ext.grid.Column, {
|
|||
|
||||
renderer : function(v, p, record){
|
||||
p.css += ' x-grid3-check-col-td';
|
||||
return String.format('<div class="x-grid3-check-col{0}"> </div>', v ? '-on' : '');
|
||||
var cssClass = 'x-grid3-check-col{0}' + (!this.editable ? ' x-item-disabled' : '');
|
||||
return String.format('<div class="' + cssClass + '"> </div>', v ? '-on' : '');
|
||||
},
|
||||
|
||||
// Deprecate use as a plugin. Remove in 4.0
|
||||
|
|
Loading…
Add table
Reference in a new issue