Index: dojo-release-1.3.2-src/dojox/grid/_Selector.js
===================================================================
--- dojo-release-1.3.2-src.orig/dojox/grid/_Selector.js 2010-03-22 06:58:50.000000000 -0700
+++ dojo-release-1.3.2-src/dojox/grid/_Selector.js 2010-03-22 06:59:03.000000000 -0700
@@ -23,10 +23,16 @@
var checked = (selectedCount && selectedCount == this.view.grid.rowCount) ? ' dijitCheckBoxChecked dijitChecked' : '';
return '
';
+ 'role="presentation">'+(
+ this._hasCheckBox() ?
+ '' :
+ ' '
+ )+' |
';
},
doclick: function(e){
+ if(!this._hasCheckBox()){
+ return;
+ }
var selectedCount = this.view.grid.selection.getSelectedCount();
this.view._selectionChanging = true;
@@ -38,6 +44,16 @@
this.view._selectionChanging = false;
this.view.onSelectionChanged();
return true;
+ },
+ _hasCheckBox: function(){
+ //console.debug("noselectAll: ", this.view.noselectAll);
+ if(this.view.noselectAll === true){
+ return false;
+ }
+ if(dojo.indexOf(["single", "none"], this.view.grid.selection.mode) !== -1){
+ return false;
+ }
+ return true;
}
});
@@ -103,6 +119,7 @@
// Custom grid view. If used in a grid structure, provides a small selectable region for grid rows.
defaultWidth: "2em",
noscroll: true,
+ noselectAll: false,
padBorderWidth: 2,
_contentBuilderClass: dojox.grid._SelectorContentBuilder,
@@ -131,6 +148,9 @@
if(s.defaultWidth){
this.defaultWidth = s.defaultWidth;
}
+ if(s.noselectAll){
+ this.noselectAll = s.noselectAll;
+ }
},
adaptWidth: function(){
// Only calculate this here - rather than every call to buildRowContent