Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // vim: sw=4:ts=4:nu:nospell:fdc=4
- /*global Ext */
- /**
- * Form Fields Anchoring Example
- *
- * @author Ing. Jozef Sakáloš
- * @copyright (c) 2008, by Ing. Jozef Sakáloš
- * @date 12. April 2008
- * @version $Id: formanchor.js 111 2009-01-30 01:10:43Z jozo $
- *
- * @license formanchor.js is licensed under the terms of the Open Source
- * LGPL 3.0 license. Commercial use is permitted to the extent that the
- * code/component(s) do NOT become part of another Open Source or Commercially
- * licensed development library or toolkit without explicit permission.
- *
- * License details: http://www.gnu.org/licenses/lgpl.html
- */
- Ext.BLANK_IMAGE_URL = 'ext/resources/images/default/s.gif';
- // application main entry point
- Ext.onReady(function() {
- Ext.QuickTips.init();
- // create form panel with anchored fields
- var formPanel = new Ext.form.FormPanel({
- id:'formanchor-form'
- ,labelWidth:70
- ,bodyStyle:'padding:15px'
- ,border:false
- ,frame:true
- ,items:[{
- xtype:'textfield'
- ,fieldLabel:'To'
- ,name:'f_to'
- ,value:'foo@bar.com'
- ,anchor:'-15'
- },{
- xtype:'textarea'
- ,fieldLabel:'Message'
- ,name:'f_message'
- ,anchor:'-15 40%'
- },{
- xtype:'textarea'
- ,fieldLabel:'Message 2'
- ,name:'f_message2'
- ,value:'some text'
- ,anchor:'-15 40%'
- }]
- ,buttons:[{
- text:'Send'
- },{
- text:'Cancel'
- }]
- });
- // create and show window
- var win = new Ext.Window({
- id:'formanchor-win'
- ,width:560
- ,height:400
- ,minWidth:300
- ,minHeight:200
- ,plain:true
- ,title:Ext.fly('page-title').dom.innerHTML
- ,layout:'fit'
- ,border:false
- ,closable:false
- ,items:formPanel
- });
- win.show();
- }); // eo function onReady
- // eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement