From 00e59f77853782765d982ad3082f0712e1bc2b9b Mon Sep 17 00:00:00 2001 From: Edward Date: Fri, 19 Jun 2015 13:54:09 +0800 Subject: [PATCH] roojs-core.js roojs-core-debug.js roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js --- roojs-all.js | 10 +++++----- roojs-debug.js | 14 +++++++------- roojs-ui-debug.js | 14 +++++++------- roojs-ui.js | 10 +++++----- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/roojs-all.js b/roojs-all.js index 36a61b5d4e..90accd64a6 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -509,14 +509,14 @@ Roo.View=function(A,B,C){this.parent=false;if(typeof(B)=='undefined'){Roo.apply( this.wrapEl=this.el.wrap().wrap();if(typeof(this.tpl)=="string"){this.tpl=new Roo.Template(this.tpl);}else {this.tpl=new Roo.factory(this.tpl,Roo);} this.tpl.compile();this.addEvents({"beforeclick":true,"click":true,"dblclick":true,"contextmenu":true,"selectionchange":true,"beforeselect":true,"preparedata":true});this.el.on({"click":this.onClick,"dblclick":this.onDblClick,"contextmenu":this.onContextMenu,scope:this});this.selections=[];this.nodes=[];this.cmp=new Roo.CompositeElementLite([]);if(this.store){this.store=Roo.factory(this.store,Roo.data);this.setStore(this.store,true);}if(this.footer&&this.footer.xtype){var D=this.wrapEl.appendChild(document.createElement("div"));this.footer.dataSource=this.store this.footer.container=D;this.footer=Roo.factory(this.footer,Roo);D.insertFirst(this.el);} -Roo.View.superclass.constructor.call(this);};Roo.extend(Roo.View,Roo.util.Observable,{store:false,el:'',tpl:false,dataName:false,selectedClass:"x-view-selected",emptyText:"",mask:false,multiSelect:false,singleSelect:false,toggleSelect:false,tickable:false,getEl:function(){return this.wrapEl;},refresh:function(){Roo.log('refresh');var t=this.tpl;this.clearSelections();this.el.update("");var A=[];var B=this.store.getRange();if(B.length<1){this.el.update(this.emptyText);return;}var el=this.el;if(this.dataName){this.el.update(t.apply(this.store.meta));el=this.el.child('.roo-tpl-'+this.dataName);}for(var i=0,C=B.length;i0){this.cmp.elements=this.selections;this.cmp.removeClass(this.selectedClass);this.selections=[];if(!A){this.fireEvent("selectionchange",this,this.selections);}}},isSelected:function(A){var s=this.selections;if(s.length<1){return false;} -A=this.getNode(A);return s.indexOf(A)!==-1;},select:function(A,B,C){if(A instanceof Array){if(!B){this.clearSelections(true);}for(var i=0,D=A.length;i0){this.cmp.elements=this.selections;this.cmp.removeClass(this.selectedClass);this.selections=[];if(!A){this.fireEvent("selectionchange",this,this.selections);}}},isSelected:function(A){var s=this.selections;if(s.length<1){return false;} +A=this.getNode(A);return s.indexOf(A)!==-1;},select:function(A,B,C){if(A instanceof Array){if(!B){this.clearSelections(true);}for(var i=0,D=A.length;i=B;i--){C.push(ns[i]);}}return C;},indexOf:function(A){A=this.getNode(A);if(typeof A.nodeIndex=="number"){return A.nodeIndex;}var ns=this.nodes;for(var i=0,B=ns.length;i0){for(var i=0,B=o.length;i0){this.cmp.elements=this.selections;this.cmp.removeClass(this.selectedClass);this.selections=[];if(!A){this.fireEvent("selectionchange",this,this.selections);}}},isSelected:function(A){var s=this.selections;if(s.length<1){return false;} -A=this.getNode(A);return s.indexOf(A)!==-1;},select:function(A,B,C){if(A instanceof Array){if(!B){this.clearSelections(true);}for(var i=0,D=A.length;i0){this.cmp.elements=this.selections;this.cmp.removeClass(this.selectedClass);this.selections=[];if(!A){this.fireEvent("selectionchange",this,this.selections);}}},isSelected:function(A){var s=this.selections;if(s.length<1){return false;} +A=this.getNode(A);return s.indexOf(A)!==-1;},select:function(A,B,C){if(A instanceof Array){if(!B){this.clearSelections(true);}for(var i=0,D=A.length;i=B;i--){C.push(ns[i]);}}return C;},indexOf:function(A){A=this.getNode(A);if(typeof A.nodeIndex=="number"){return A.nodeIndex;}var ns=this.nodes;for(var i=0,B=ns.length;i0){for(var i=0,B=o.length;i