Roo/Toolbar.js
authorEdward <edward@roojs.com>
Tue, 19 May 2015 10:38:52 +0000 (18:38 +0800)
committerEdward <edward@roojs.com>
Tue, 19 May 2015 10:38:52 +0000 (18:38 +0800)
roojs-ui.js
roojs-ui-debug.js
roojs-debug.js
roojs-all.js

Roo/Toolbar.js
roojs-all.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index bd30d11..b6ecbd6 100644 (file)
@@ -529,7 +529,9 @@ Roo.Toolbar.TextItem = function(cfg){
     var  text = cfg || "";
     if (typeof(cfg) == 'object') {
         text = cfg.text || "";
-    }  
+    }  else {
+        cfg = null;
+    }
     var s = document.createElement("span");
     s.className = "ytb-text";
     s.innerHTML = text;
index fa54b79..4294992 100644 (file)
@@ -586,7 +586,7 @@ this.el.update('<div class="x-toolbar x-small-editor"><table cellspacing="0"><tr
 Roo.Element.uncache(this.el,this.tr);}};Roo.Toolbar.Item=function(el){var A={};if(typeof(el.xtype)!='undefined'){A=el;el=A.el;}
 this.el=Roo.getDom(el);this.id=Roo.id(this.el);this.hidden=false;this.addEvents({'render':true});Roo.Toolbar.Item.superclass.constructor.call(this,A);};Roo.extend(Roo.Toolbar.Item,Roo.util.Observable,{getEl:function(){return this.el;},render:function(td){this.td=td;td.appendChild(this.el);this.fireEvent('render',this);},destroy:function(){this.td.parentNode.removeChild(this.td);},show:function(){this.hidden=false;this.td.style.display="";},hide:function(){this.hidden=true;this.td.style.display="none";},setVisible:function(A){if(A){this.show();}else {this.hide();}},focus:function(){Roo.fly(this.el).focus();},disable:function(){Roo.fly(this.td).addClass("x-item-disabled");this.disabled=true;this.el.disabled=true;},enable:function(){Roo.fly(this.td).removeClass("x-item-disabled");this.disabled=false;this.el.disabled=false;}});Roo.Toolbar.Separator=function(A){var s=document.createElement("span");s.className="ytb-sep";if(A){A.el=s;}
 Roo.Toolbar.Separator.superclass.constructor.call(this,A||s);};Roo.extend(Roo.Toolbar.Separator,Roo.Toolbar.Item,{enable:Roo.emptyFn,disable:Roo.emptyFn,focus:Roo.emptyFn});Roo.Toolbar.Spacer=function(A){var s=document.createElement("div");s.className="ytb-spacer";if(A){A.el=s;}
-Roo.Toolbar.Spacer.superclass.constructor.call(this,A||s);};Roo.extend(Roo.Toolbar.Spacer,Roo.Toolbar.Item,{enable:Roo.emptyFn,disable:Roo.emptyFn,focus:Roo.emptyFn});Roo.Toolbar.Fill=Roo.extend(Roo.Toolbar.Spacer,{render:function(td){td.style.width='100%';Roo.Toolbar.Fill.superclass.render.call(this,td);}});Roo.Toolbar.TextItem=function(A){var B=A||"";if(typeof(A)=='object'){B=A.text||"";}var s=document.createElement("span");s.className="ytb-text";s.innerHTML=B;if(A){A.el=s;}
+Roo.Toolbar.Spacer.superclass.constructor.call(this,A||s);};Roo.extend(Roo.Toolbar.Spacer,Roo.Toolbar.Item,{enable:Roo.emptyFn,disable:Roo.emptyFn,focus:Roo.emptyFn});Roo.Toolbar.Fill=Roo.extend(Roo.Toolbar.Spacer,{render:function(td){td.style.width='100%';Roo.Toolbar.Fill.superclass.render.call(this,td);}});Roo.Toolbar.TextItem=function(A){var B=A||"";if(typeof(A)=='object'){B=A.text||"";}else {A=null;}var s=document.createElement("span");s.className="ytb-text";s.innerHTML=B;if(A){A.el=s;}
 Roo.Toolbar.TextItem.superclass.constructor.call(this,A||s);};Roo.extend(Roo.Toolbar.TextItem,Roo.Toolbar.Item,{enable:Roo.emptyFn,disable:Roo.emptyFn,focus:Roo.emptyFn});Roo.Toolbar.Button=function(A){Roo.Toolbar.Button.superclass.constructor.call(this,null,A);};Roo.extend(Roo.Toolbar.Button,Roo.Button,{render:function(td){this.td=td;Roo.Toolbar.Button.superclass.render.call(this,td);},destroy:function(){Roo.Toolbar.Button.superclass.destroy.call(this);this.td.parentNode.removeChild(this.td);},show:function(){this.hidden=false;this.td.style.display="";},hide:function(){this.hidden=true;this.td.style.display="none";},disable:function(){Roo.fly(this.td).addClass("x-item-disabled");this.disabled=true;},enable:function(){Roo.fly(this.td).removeClass("x-item-disabled");this.disabled=false;}});Roo.ToolbarButton=Roo.Toolbar.Button;Roo.Toolbar.SplitButton=function(A){Roo.Toolbar.SplitButton.superclass.constructor.call(this,null,A);};Roo.extend(Roo.Toolbar.SplitButton,Roo.SplitButton,{render:function(td){this.td=td;Roo.Toolbar.SplitButton.superclass.render.call(this,td);},destroy:function(){Roo.Toolbar.SplitButton.superclass.destroy.call(this);this.td.parentNode.removeChild(this.td);},show:function(){this.hidden=false;this.td.style.display="";},hide:function(){this.hidden=true;this.td.style.display="none";}});Roo.Toolbar.MenuButton=Roo.Toolbar.SplitButton;
 //Roo/PagingToolbar.js
 Roo.PagingToolbar=function(el,ds,A){if(typeof(el)=='object'&&el.xtype){A=el;ds=el.dataSource;el=A.container;}var B=[];if(A.items){B=A.items;A.items=[];}
index dce4e90..a232b1a 100644 (file)
@@ -28691,7 +28691,9 @@ Roo.Toolbar.TextItem = function(cfg){
     var  text = cfg || "";
     if (typeof(cfg) == 'object') {
         text = cfg.text || "";
-    }  
+    }  else {
+        cfg = null;
+    }
     var s = document.createElement("span");
     s.className = "ytb-text";
     s.innerHTML = text;
index 89f3556..208c00c 100644 (file)
@@ -12261,7 +12261,9 @@ Roo.Toolbar.TextItem = function(cfg){
     var  text = cfg || "";
     if (typeof(cfg) == 'object') {
         text = cfg.text || "";
-    }  
+    }  else {
+        cfg = null;
+    }
     var s = document.createElement("span");
     s.className = "ytb-text";
     s.innerHTML = text;
index e067fd8..15417c3 100644 (file)
@@ -251,7 +251,7 @@ this.el.update('<div class="x-toolbar x-small-editor"><table cellspacing="0"><tr
 Roo.Element.uncache(this.el,this.tr);}};Roo.Toolbar.Item=function(el){var A={};if(typeof(el.xtype)!='undefined'){A=el;el=A.el;}
 this.el=Roo.getDom(el);this.id=Roo.id(this.el);this.hidden=false;this.addEvents({'render':true});Roo.Toolbar.Item.superclass.constructor.call(this,A);};Roo.extend(Roo.Toolbar.Item,Roo.util.Observable,{getEl:function(){return this.el;},render:function(td){this.td=td;td.appendChild(this.el);this.fireEvent('render',this);},destroy:function(){this.td.parentNode.removeChild(this.td);},show:function(){this.hidden=false;this.td.style.display="";},hide:function(){this.hidden=true;this.td.style.display="none";},setVisible:function(A){if(A){this.show();}else {this.hide();}},focus:function(){Roo.fly(this.el).focus();},disable:function(){Roo.fly(this.td).addClass("x-item-disabled");this.disabled=true;this.el.disabled=true;},enable:function(){Roo.fly(this.td).removeClass("x-item-disabled");this.disabled=false;this.el.disabled=false;}});Roo.Toolbar.Separator=function(A){var s=document.createElement("span");s.className="ytb-sep";if(A){A.el=s;}
 Roo.Toolbar.Separator.superclass.constructor.call(this,A||s);};Roo.extend(Roo.Toolbar.Separator,Roo.Toolbar.Item,{enable:Roo.emptyFn,disable:Roo.emptyFn,focus:Roo.emptyFn});Roo.Toolbar.Spacer=function(A){var s=document.createElement("div");s.className="ytb-spacer";if(A){A.el=s;}
-Roo.Toolbar.Spacer.superclass.constructor.call(this,A||s);};Roo.extend(Roo.Toolbar.Spacer,Roo.Toolbar.Item,{enable:Roo.emptyFn,disable:Roo.emptyFn,focus:Roo.emptyFn});Roo.Toolbar.Fill=Roo.extend(Roo.Toolbar.Spacer,{render:function(td){td.style.width='100%';Roo.Toolbar.Fill.superclass.render.call(this,td);}});Roo.Toolbar.TextItem=function(A){var B=A||"";if(typeof(A)=='object'){B=A.text||"";}var s=document.createElement("span");s.className="ytb-text";s.innerHTML=B;if(A){A.el=s;}
+Roo.Toolbar.Spacer.superclass.constructor.call(this,A||s);};Roo.extend(Roo.Toolbar.Spacer,Roo.Toolbar.Item,{enable:Roo.emptyFn,disable:Roo.emptyFn,focus:Roo.emptyFn});Roo.Toolbar.Fill=Roo.extend(Roo.Toolbar.Spacer,{render:function(td){td.style.width='100%';Roo.Toolbar.Fill.superclass.render.call(this,td);}});Roo.Toolbar.TextItem=function(A){var B=A||"";if(typeof(A)=='object'){B=A.text||"";}else {A=null;}var s=document.createElement("span");s.className="ytb-text";s.innerHTML=B;if(A){A.el=s;}
 Roo.Toolbar.TextItem.superclass.constructor.call(this,A||s);};Roo.extend(Roo.Toolbar.TextItem,Roo.Toolbar.Item,{enable:Roo.emptyFn,disable:Roo.emptyFn,focus:Roo.emptyFn});Roo.Toolbar.Button=function(A){Roo.Toolbar.Button.superclass.constructor.call(this,null,A);};Roo.extend(Roo.Toolbar.Button,Roo.Button,{render:function(td){this.td=td;Roo.Toolbar.Button.superclass.render.call(this,td);},destroy:function(){Roo.Toolbar.Button.superclass.destroy.call(this);this.td.parentNode.removeChild(this.td);},show:function(){this.hidden=false;this.td.style.display="";},hide:function(){this.hidden=true;this.td.style.display="none";},disable:function(){Roo.fly(this.td).addClass("x-item-disabled");this.disabled=true;},enable:function(){Roo.fly(this.td).removeClass("x-item-disabled");this.disabled=false;}});Roo.ToolbarButton=Roo.Toolbar.Button;Roo.Toolbar.SplitButton=function(A){Roo.Toolbar.SplitButton.superclass.constructor.call(this,null,A);};Roo.extend(Roo.Toolbar.SplitButton,Roo.SplitButton,{render:function(td){this.td=td;Roo.Toolbar.SplitButton.superclass.render.call(this,td);},destroy:function(){Roo.Toolbar.SplitButton.superclass.destroy.call(this);this.td.parentNode.removeChild(this.td);},show:function(){this.hidden=false;this.td.style.display="";},hide:function(){this.hidden=true;this.td.style.display="none";}});Roo.Toolbar.MenuButton=Roo.Toolbar.SplitButton;
 //Roo/PagingToolbar.js
 Roo.PagingToolbar=function(el,ds,A){if(typeof(el)=='object'&&el.xtype){A=el;ds=el.dataSource;el=A.container;}var B=[];if(A.items){B=A.items;A.items=[];}