+++ /dev/null
-<html>\r
-<head>\r
- <title>The source code</title>\r
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body onload="prettyPrint();">\r
- <pre class="prettyprint lang-js">/*\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.QuickTips.init();\r
-\r
-Ext.onReady(function(){\r
-\r
- var fp = new Ext.FormPanel({\r
- id: 'status-form',\r
- renderTo: Ext.getBody(),\r
- labelWidth: 75,\r
- width: 350,\r
- buttonAlign: 'right',\r
- border: false,\r
- bodyStyle: 'padding:10px 10px 0;',\r
- defaults: {\r
- anchor: '95%',\r
- allowBlank: false,\r
- selectOnFocus: true,\r
- msgTarget: 'side'\r
- },\r
- items:[{\r
- xtype: 'textfield',\r
- fieldLabel: 'Name',\r
- blankText: 'Name is required'\r
- },{\r
- xtype: 'datefield',\r
- fieldLabel: 'Birthdate',\r
- blankText: 'Birthdate is required'\r
- }],\r
- buttons: [{\r
- text: 'Save',\r
- handler: function(){\r
- if(fp.getForm().isValid()){\r
- var sb = Ext.getCmp('form-statusbar');\r
- sb.showBusy('Saving form...');\r
- fp.getEl().mask();\r
- fp.getForm().submit({\r
- url: 'fake.php',\r
- success: function(){\r
- sb.setStatus({\r
- text:'Form saved!',\r
- iconCls:'',\r
- clear: true\r
- });\r
- fp.getEl().unmask();\r
- }\r
- });\r
- }\r
- }\r
- }]\r
- });\r
-\r
- new Ext.Panel({\r
- title: 'StatusBar with Integrated Form Validation',\r
- renderTo: Ext.getBody(),\r
- width: 350,\r
- autoHeight: true,\r
- layout: 'fit',\r
- items: fp,\r
- bbar: new Ext.ux.StatusBar({\r
- id: 'form-statusbar',\r
- defaultText: 'Ready',\r
- plugins: new Ext.ux.ValidationStatus({form:'status-form'})\r
- })\r
- });\r
-\r
-});</pre> \r
-</body>\r
-</html>
\ No newline at end of file