this.view.singleSelect = false;
this.view.multiSelect = true;
this.view.toggleSelect = true;
- this.pageTb.add(new Roo.Toolbar.Fill(), {
+ this.pageTb.add(new Roo.Toolbar.Fill(),{
+ text: 'Select All',
+ handler: function() {
+ _t.selectAll();
+ }
+ },
+ {
text: 'Done',
- handler: function()
- {
+ handler: function() {
_t.collapse();
}
});
},
+ cleanLeadingSpace : function(e)
+ {
+ // this is disabled, as it retriggers setvalue on blur
+ return;
+ },
+ doForce : function() {
+ // no idea what this did, but it blanks out our values.
+ return;
+ },
onViewOver : function(e, t){
// do nothing...
return;
return false;
},
-
+ selectAll : function()
+ {
+ var sels = [];
+ this.store.each(function(r,i) {
+ sels.push(i);
+ });
+ this.view.select(sels);
+ this.collapse();
+ return false;
+
+ },
onSelect : function(record, index){
// Roo.log("onselect Called");
this.setValue('[]');
if (this.value != this.valueBefore) {
this.fireEvent('change', this, this.value, this.valueBefore);
+ this.valueBefore = this.value;
}
},
getValueArray : function()
var ar = [] ;
try {
- Roo.log(this.value);
+ //Roo.log(this.value);
+ if (typeof(this.value) == 'undefined') {
+ return [];
+ }
var ar = Roo.decode(this.value);
return ar instanceof Array ? ar : []; //?? valid?
},
expand : function ()
{
+
Roo.form.ComboCheck.superclass.expand.call(this);
- this.valueBefore = this.value;
+ this.valueBefore = typeof(this.value) == 'undefined' ? '' : this.value;
+ //this.valueBefore = typeof(this.valueBefore) == 'undefined' ? '' : this.valueBefore;
},
if (this.value != this.valueBefore) {
this.fireEvent('change', this, this.value, this.valueBefore);
+ this.valueBefore = this.value;
}
},