X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsrc%2FRoo_Toolbar.js.html;fp=docs%2Fsymbols%2Fsrc%2FRoo_Toolbar.js.html;h=f40333c85929fdb7bb3eab33bfa38df3906fe16d;hb=c1c0168c0e693c4262f3f744a82419f9d9b1807f;hp=c5777087b9fd25a79086af7c14362bb46128e509;hpb=b282409b66344f6d0ff1999b55639cfd80097128;p=roojs1 diff --git a/docs/symbols/src/Roo_Toolbar.js.html b/docs/src/Roo_Toolbar.js.html similarity index 99% rename from docs/symbols/src/Roo_Toolbar.js.html rename to docs/src/Roo_Toolbar.js.html index c5777087b9..f40333c859 100644 --- a/docs/symbols/src/Roo_Toolbar.js.html +++ b/docs/src/Roo_Toolbar.js.html @@ -1,4 +1,4 @@ -
/*
+/home/alan/gitlive/roojs1/Roo/Toolbar.js /*
* Based on:
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
@@ -15,7 +15,7 @@
* @constructor
* Creates a new Toolbar
* @param {Object} container The config object
- */
+ */
Roo.Toolbar = function(container, buttons, config)
{
/// old consturctor format still supported..
@@ -36,7 +36,7 @@
}
Roo.apply(this, config);
this.buttons = buttons;
-
+
if(container){
this.render(container);
}
@@ -44,7 +44,7 @@
Roo.each(xitems, function(b) {
this.add(b);
}, this);
-
+
};
Roo.Toolbar.prototype = {
@@ -52,7 +52,7 @@
* @cfg {Array} items
* array of button configs or elements to add (will be converted to a MixedCollection)
*/
-
+
/**
* @cfg {String/HTMLElement/Element} container
* The id or element that will contain the toolbar
@@ -103,14 +103,14 @@
},
// private..
_add : function(el) {
-
+
if (el.xtype) {
el = Roo.factory(el, typeof(Roo.Toolbar[el.xtype]) == 'undefined' ? Roo.form : Roo.Toolbar);
}
-
+
if (el.applyTo){ // some kind of form field
return this.addField(el);
- }
+ }
if (el.render){ // some kind of Toolbar.Item
return this.addItem(el);
}
@@ -125,7 +125,7 @@
return this.addFill();
}
return this.addText(el);
-
+
}
if(el.tagName){ // element
return this.addElement(el);
@@ -135,26 +135,26 @@
}
// and now what?!?!
return false;
-
+
},
-
+
/**
* Add an Xtype element
* @param {Object} xtype Xtype Object
* @return {Object} created Object
*/
addxtype : function(e){
- return this.add(e);
+ return this.add(e);
},
-
+
/**
* Returns the Element for this toolbar.
* @return {Roo.Element}
*/
getEl : function(){
- return this.el;
+ return this.el;
},
-
+
/**
* Adds a separator
* @return {Roo.Toolbar.Item} The separator item
@@ -192,7 +192,7 @@
* @type Roo.util.MixedCollection
*/
items : false,
-
+
/**
* Adds any Toolbar.Item or subclass
* @param {Roo.Toolbar.Item} item
@@ -204,7 +204,7 @@
this.items.add(item);
return item;
},
-
+
/**
* Adds a button (or buttons). See {@link Roo.Toolbar.Button} for more info on the config.
* @param {Object/Array} config A button config or array of configs
@@ -229,7 +229,7 @@
this.items.add(b);
return b;
},
-
+
/**
* Adds text to the toolbar
* @param {String} text The text to add
@@ -238,7 +238,7 @@
addText : function(text){
return this.addItem(new Roo.Toolbar.TextItem(text));
},
-
+
/**
* Inserts any {@link Roo.Toolbar.Item}/{@link Roo.Toolbar.Button} at the specified index.
* @param {Number} index The index where the item is to be inserted
@@ -262,7 +262,7 @@
this.items.insert(index, item);
return item;
},
-
+
/**
* Adds a new element to the toolbar from the passed {@link Roo.DomHelper} config.
* @param {Object} config
@@ -282,7 +282,7 @@
* @type Roo.util.MixedCollection
*/
fields : false,
-
+
/**
* Adds a dynamically rendered Roo.form field (TextField, ComboBox, etc).
* Note: the field should not have been rendered yet. For a field that has already been
@@ -290,8 +290,8 @@
* @param {Roo.form.Field} field
* @return {Roo.ToolbarItem}
*/
-
-
+
+
addField : function(field) {
if (!this.fields) {
var autoId = 0;
@@ -300,7 +300,7 @@
});
}
-
+
var td = this.nextBlock();
field.render(td);
var ti = new Roo.Toolbar.Item(td.firstChild);
@@ -313,8 +313,8 @@
* Hide the toolbar
* @method hide
*/
-
-
+
+
hide : function()
{
this.el.child('div').setVisibilityMode(Roo.Element.DISPLAY);
@@ -328,7 +328,7 @@
{
this.el.child('div').show();
},
-
+
// private
nextBlock : function(){
var td = document.createElement("td");
@@ -361,11 +361,11 @@
cfg = el;
el = cfg.el;
}
-
+
this.el = Roo.getDom(el);
this.id = Roo.id(this.el);
this.hidden = false;
-
+
this.addEvents({
/**
* @event render
@@ -378,31 +378,31 @@
};
Roo.extend(Roo.Toolbar.Item, Roo.util.Observable, {
//Roo.Toolbar.Item.prototype = {
-
+
/**
* Get this item's HTML Element
* @return {HTMLElement}
*/
getEl : function(){
- return this.el;
+ return this.el;
},
// private
render : function(td){
-
+
this.td = td;
td.appendChild(this.el);
-
+
this.fireEvent('render', this);
},
-
+
/**
* Removes and destroys this item.
*/
destroy : function(){
this.td.parentNode.removeChild(this.td);
},
-
+
/**
* Shows this item.
*/
@@ -410,7 +410,7 @@
this.hidden = false;
this.td.style.display = "";
},
-
+
/**
* Hides this item.
*/
@@ -418,7 +418,7 @@
this.hidden = true;
this.td.style.display = "none";
},
-
+
/**
* Convenience function for boolean show/hide.
* @param {Boolean} visible true to show/false to hide
@@ -430,14 +430,14 @@
this.hide();
}
},
-
+
/**
* Try to focus this item.
*/
focus : function(){
Roo.fly(this.el).focus();
},
-
+
/**
* Disables this item.
*/
@@ -446,7 +446,7 @@
this.disabled = true;
this.el.disabled = true;
},
-
+
/**
* Enables this item.
*/
@@ -466,13 +466,13 @@
* Creates a new Separator
*/
Roo.Toolbar.Separator = function(cfg){
-
+
var s = document.createElement("span");
s.className = "ytb-sep";
if (cfg) {
cfg.el = s;
}
-
+
Roo.Toolbar.Separator.superclass.constructor.call(this, cfg || s);
};
Roo.extend(Roo.Toolbar.Separator, Roo.Toolbar.Item, {
@@ -538,12 +538,12 @@
if (cfg) {
cfg.el = s;
}
-
+
Roo.Toolbar.TextItem.superclass.constructor.call(this, cfg || s);
};
Roo.extend(Roo.Toolbar.TextItem, Roo.Toolbar.Item, {
-
-
+
+
enable:Roo.emptyFn,
disable:Roo.emptyFn,
focus:Roo.emptyFn
@@ -565,7 +565,7 @@
this.td = td;
Roo.Toolbar.Button.superclass.render.call(this, td);
},
-
+
/**
* Removes and destroys this button
*/
@@ -573,7 +573,7 @@
Roo.Toolbar.Button.superclass.destroy.call(this);
this.td.parentNode.removeChild(this.td);
},
-
+
/**
* Shows this button
*/
@@ -581,7 +581,7 @@
this.hidden = false;
this.td.style.display = "";
},
-
+
/**
* Hides this button
*/
@@ -625,7 +625,7 @@
this.td = td;
Roo.Toolbar.SplitButton.superclass.render.call(this, td);
},
-
+
/**
* Removes and destroys this button
*/
@@ -633,7 +633,7 @@
Roo.Toolbar.SplitButton.superclass.destroy.call(this);
this.td.parentNode.removeChild(this.td);
},
-
+
/**
* Shows this button
*/
@@ -641,7 +641,7 @@
this.hidden = false;
this.td.style.display = "";
},
-
+
/**
* Hides this button
*/