X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fform%2FComboCheck.js;h=f04b58f22018bf61e1038b1bf0dcef4815434139;hb=e2c4b93ed251c1ff8bf23df51438023aa87cfb56;hp=a6b8aebfe61160ecc7669a3840067a1c81e5fde0;hpb=08ca0b8ddfca5e9db6638769b58c1a6fcc42f91f;p=roojs1 diff --git a/Roo/form/ComboCheck.js b/Roo/form/ComboCheck.js index a6b8aebfe6..f04b58f220 100644 --- a/Roo/form/ComboCheck.js +++ b/Roo/form/ComboCheck.js @@ -66,11 +66,16 @@ Roo.extend(Roo.form.ComboCheck, Roo.form.ComboBox, { 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(); } }); @@ -108,7 +113,17 @@ Roo.extend(Roo.form.ComboCheck, Roo.form.ComboBox, { 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");