Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[webui] make CheckColumn obey readonly status
  • Loading branch information
Jalle19 authored and perexg committed Aug 6, 2014
1 parent 0956101 commit 3ab17d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/webui/static/checkcolumn/CheckColumn.js
Expand Up @@ -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]);
Expand All @@ -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}">&#160;</div>', v ? '-on' : '');
var cssClass = 'x-grid3-check-col{0}' + (!this.editable ? ' x-item-disabled' : '');
return String.format('<div class="' + cssClass + '">&#160;</div>', v ? '-on' : '');
},

// Deprecate use as a plugin. Remove in 4.0
Expand Down

0 comments on commit 3ab17d4

Please sign in to comment.