/*!
- * Ext JS Library 3.0.0
- * Copyright(c) 2006-2009 Ext JS, LLC
+ * Ext JS Library 3.1.1
+ * Copyright(c) 2006-2010 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
\r
getFocusItems: function(){\r
return this.items &&\r
- this.items.filterBy(function(o){\r
- return o.isFocusable;\r
- }) ||\r
- null;\r
+ this.items.filterBy(function(o){\r
+ return o.isFocusable;\r
+ }) ||\r
+ null;\r
},\r
\r
getEnterItem: function(){\r
if (length === 1) {\r
return ci.first().getEnterItem && ci.first().getEnterItem() || ci.first();\r
}\r
- else \r
- if (length > 1) {\r
- return ci.first();\r
- }\r
+ else if (length > 1) {\r
+ return ci.first();\r
+ }\r
},\r
\r
getNextFocus: function(current){\r
getFocusItems: function(){\r
// items gets all the items inside the body\r
var items = Ext.Panel.superclass.getFocusItems.call(this), bodyFocus = null;\r
- \r
+\r
if (!items) {\r
items = new Ext.util.MixedCollection();\r
this.bodyFocus = this.bodyFocus || new Ext.a11y.FocusItem(this.body, this.enableTabbing);\r
});\r
},\r
\r
- addItem: function(item){\r
- Ext.Toolbar.superclass.add.apply(this, arguments);\r
+ add: function(){\r
+ var item = Ext.Toolbar.superclass.add.apply(this, arguments);\r
+ if(!item || !item.events) {\r
+ return item;\r
+ }\r
if (item.rendered && item.fi !== undefined) {\r
item.fi.setRelayTo(this.el);\r
this.relayEvents(item.fi, ['focus']);\r