X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..6b044c28b5f26fb99c86c237ffad19741c0f7f3d:/examples/statusbar/statusbar-advanced.js?ds=sidebyside diff --git a/examples/statusbar/statusbar-advanced.js b/examples/statusbar/statusbar-advanced.js index f8df86b8..9b79a4e9 100644 --- a/examples/statusbar/statusbar-advanced.js +++ b/examples/statusbar/statusbar-advanced.js @@ -1,71 +1,71 @@ /*! - * Ext JS Library 3.0.3 - * Copyright(c) 2006-2009 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ -Ext.QuickTips.init(); - -Ext.onReady(function(){ - - var fp = new Ext.FormPanel({ - id: 'status-form', - renderTo: Ext.getBody(), - labelWidth: 75, - width: 350, - buttonAlign: 'right', - border: false, - bodyStyle: 'padding:10px 10px 0;', - defaults: { - anchor: '95%', - allowBlank: false, - selectOnFocus: true, - msgTarget: 'side' - }, - items:[{ - xtype: 'textfield', - fieldLabel: 'Name', - blankText: 'Name is required' - },{ - xtype: 'datefield', - fieldLabel: 'Birthdate', - blankText: 'Birthdate is required' - }], - buttons: [{ - text: 'Save', - handler: function(){ - if(fp.getForm().isValid()){ - var sb = Ext.getCmp('form-statusbar'); - sb.showBusy('Saving form...'); - fp.getEl().mask(); - fp.getForm().submit({ - url: 'fake.php', - success: function(){ - sb.setStatus({ - text:'Form saved!', - iconCls:'', - clear: true - }); - fp.getEl().unmask(); - } - }); - } - } - }] - }); - - new Ext.Panel({ - title: 'StatusBar with Integrated Form Validation', - renderTo: Ext.getBody(), - width: 350, - autoHeight: true, - layout: 'fit', - items: fp, - bbar: new Ext.ux.StatusBar({ - id: 'form-statusbar', - defaultText: 'Ready', - plugins: new Ext.ux.ValidationStatus({form:'status-form'}) - }) - }); - +Ext.QuickTips.init(); + +Ext.onReady(function(){ + + var fp = new Ext.FormPanel({ + id: 'status-form', + renderTo: Ext.getBody(), + labelWidth: 75, + width: 350, + buttonAlign: 'right', + border: false, + bodyStyle: 'padding:10px 10px 0;', + defaults: { + anchor: '95%', + allowBlank: false, + selectOnFocus: true, + msgTarget: 'side' + }, + items:[{ + xtype: 'textfield', + fieldLabel: 'Name', + blankText: 'Name is required' + },{ + xtype: 'datefield', + fieldLabel: 'Birthdate', + blankText: 'Birthdate is required' + }], + buttons: [{ + text: 'Save', + handler: function(){ + if(fp.getForm().isValid()){ + var sb = Ext.getCmp('form-statusbar'); + sb.showBusy('Saving form...'); + fp.getEl().mask(); + fp.getForm().submit({ + url: 'fake.php', + success: function(){ + sb.setStatus({ + text:'Form saved!', + iconCls:'', + clear: true + }); + fp.getEl().unmask(); + } + }); + } + } + }] + }); + + new Ext.Panel({ + title: 'StatusBar with Integrated Form Validation', + renderTo: Ext.getBody(), + width: 350, + autoHeight: true, + layout: 'fit', + items: fp, + bbar: new Ext.ux.StatusBar({ + id: 'form-statusbar', + defaultText: 'Ready', + plugins: new Ext.ux.ValidationStatus({form:'status-form'}) + }) + }); + }); \ No newline at end of file