* @cfg {Array} items
* array of button configs or elements to add (will be converted to a MixedCollection)
*/
-
+ items: false,
/**
* @cfg {String/HTMLElement/Element} container
* The id or element that will contain the toolbar
* A simple class that renders text directly into a toolbar.
* @constructor
* Creates a new TextItem
- * @param {String} text
+ * @cfg {string} text
*/
Roo.Toolbar.TextItem = function(cfg){
- var text ="";
+ var text = cfg || "";
if (typeof(cfg) == 'object') {
text = cfg.text || "";
- } else {
- text = cfg;
+ } else {
+ cfg = null;
}
-
var s = document.createElement("span");
s.className = "ytb-text";
s.innerHTML = text;