var fctr = this.wrapEl.appendChild(document.createElement("div"));
- this.footer.dataSource = this.store
+ this.footer.dataSource = this.store;
this.footer.container = fctr;
this.footer = Roo.factory(this.footer, Roo);
fctr.insertFirst(this.el);
* Refreshes the view. - called by datachanged on the store. - do not call directly.
*/
refresh : function(){
- Roo.log('refresh');
+ //Roo.log('refresh');
var t = this.tpl;
// if we are using something like 'domtemplate', then
},
onUpdate : function(ds, record){
- Roo.log('on update');
+ // Roo.log('on update');
this.clearSelections();
var index = this.store.indexOf(record);
var n = this.nodes[index];
// --------- FIXME
onAdd : function(ds, records, index)
{
- Roo.log(['on Add', ds, records, index] );
+ //Roo.log(['on Add', ds, records, index] );
this.clearSelections();
if(this.nodes.length == 0){
this.refresh();
},
onRemove : function(ds, record, index){
- Roo.log('onRemove');
+ // Roo.log('onRemove');
this.clearSelections();
var el = this.dataName ?
this.el.child('.roo-tpl-' + this.dataName) :
*/
onBeforeLoad : function(store,opts)
{
- Roo.log('onBeforeLoad');
+ //Roo.log('onBeforeLoad');
if (!opts.add) {
this.el.update("");
}
}
if (this.toggleSelect) {
var m = this.isSelected(item) ? 'unselect' : 'select';
- Roo.log(m);
+ //Roo.log(m);
var _t = this;
_t[m](item, true, false);
return true;
* @param {Boolean} suppressEvent (optional) true to skip firing of the selectionchange vent
*/
select : function(nodeInfo, keepExisting, suppressEvent){
- Roo.log('running here!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
- Roo.log(nodeInfo);
- Roo.log(keepExisting);
- Roo.log(suppressEvent);
if(nodeInfo instanceof Array){
if(!keepExisting){
this.clearSelections(true);
if(!keepExisting){
this.clearSelections(true);
}
+
if(this.fireEvent("beforeselect", this, node, this.selections) !== false){
Roo.fly(node).addClass(this.selectedClass);
this.selections.push(node);
}
var node = this.getNode(nodeInfo);
if(!node || !this.isSelected(node)){
- Roo.log("not selected");
+ //Roo.log("not selected");
return; // not selected.
}
// fireevent???