/*!
- * 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
- * Ext JS Library 2.2\r
- * Copyright(c) 2006-2008, Ext JS, LLC.\r
- * licensing@extjs.com\r
- *\r
- * http://extjs.com/license\r
- */\r
-\r
-\r
Ext.onReady(function(){\r
\r
// This is a shared function that simulates a load action on a StatusBar.\r
new Ext.Panel({\r
title: 'Basic StatusBar',\r
renderTo: 'basic',\r
- width: 350,\r
+ width: 550,\r
height: 100,\r
bodyStyle: 'padding:10px;',\r
items:[{\r
handler: loadFn.createCallback('basic-button', 'basic-statusbar')\r
}],\r
bbar: new Ext.ux.StatusBar({\r
- defaultText: 'Default status',\r
id: 'basic-statusbar',\r
- items: [{\r
- text: 'A Button'\r
- }, '-', 'Plain Text', ' ', ' ']\r
+\r
+ // defaults to use when the status is cleared:\r
+ defaultText: 'Default status text',\r
+ //defaultIconCls: 'default-icon',\r
+ \r
+ // values to set initially:\r
+ text: 'Ready',\r
+ iconCls: 'x-status-valid',\r
+\r
+ // any standard Toolbar items:\r
+ items: [\r
+ {\r
+ text: 'Show Warning & Clear',\r
+ handler: function (){\r
+ var sb = Ext.getCmp('basic-statusbar');\r
+ sb.setStatus({\r
+ text: 'Oops!',\r
+ iconCls: 'x-status-error',\r
+ clear: true // auto-clear after a set interval\r
+ });\r
+ }\r
+ },\r
+ {\r
+ text: 'Show Busy',\r
+ handler: function (){\r
+ var sb = Ext.getCmp('basic-statusbar');\r
+ // Set the status bar to show that something is processing:\r
+ sb.showBusy();\r
+ }\r
+ },\r
+ {\r
+ text: 'Clear status',\r
+ handler: function (){\r
+ var sb = Ext.getCmp('basic-statusbar');\r
+ // once completed\r
+ sb.clearStatus(); \r
+ }\r
+ },\r
+ '-',\r
+ 'Plain Text'\r
+ ]\r
})\r
});\r
\r
new Ext.Panel({\r
title: 'Right-aligned StatusBar',\r
renderTo: 'right-aligned',\r
- width: 350,\r
+ width: 550,\r
height: 100,\r
bodyStyle: 'padding:10px;',\r
items:[{\r