{ xtype: 'form', labelWidth: 40, // label settings here cascade unless overridden frame: false, bodyStyle:'padding:5px 5px 0', defaultType: 'textfield', items: [{ xtype: 'panel', height: 100, html: '

%%%DEV_LABEL%%%
Range: %%%MAX_RANGE%%%
' },{ xtype: 'panel', html: 'Dev Address: %%%DEVICE_ID%%%
' }] },{ xtype: 'button', text: 'Change Settings', width: '100%', handler: function(){ return LRF1D2_settings(); var wAddSocket = new Ext.Window({ title: 'Sensor Settings', width: 450, //height: 480, items:[{ xtype: 'form', labelWidth: 120, // label settings here cascade unless overridden frame: false, bodyStyle:'padding:5px 5px 0', defaultType: 'textfield', items:[{ fieldLabel: 'Device Name', id: 'ued_name' },{ fieldLabel: 'Device Address', id: 'ued_address' },{ fieldLabel: 'Maximal Range', id: 'ued_range' }] }], buttons:[{ text: 'Cancel', handler: function(){ wAddSocket.close(); wAddSocket = null; } },{ text: 'Apply Settings', handler: function(){ var val_name = Ext.getCmp('ued_name').getValue(); var val_addr = Ext.getCmp('ued_address').getValue(); var val_range = Ext.getCmp('ued_range').getValue(); Ext.Ajax.request({ url: '/lib/controller/updateLrfSettings.php', params: { SENSOR: %%%LRF_ID%%%, SADDR: val_addr, SNAME: val_name, SRANGE: val_range }, success: function( response, opts ){ wAddSocket.close(); wAddSocket = null; loadNodeProperties( %%%NODEID%%% ); }, failure: function( response, opts ) { } }); } }] }); wAddSocket.show(); Ext.getCmp('ued_name').setValue( Ext.getCmp('dev_name').getValue()); Ext.getCmp('ued_address').setValue( Ext.getCmp('dev_id').getValue()); Ext.getCmp('ued_range').setValue( Ext.getCmp('max_range').getValue()); } },{ xtype:'fieldset', title: 'LRF Settings', collapsible: true, autoHeight: true, defaults: { //width: 168 }, items :[{ xtype: 'panel', html: 'Order: %%%M_ORDER%%%
' },{ xtype: 'panel', html: 'Offset: %%%M_OFFSET%%%
' },{ xtype: 'panel', html: 'Width: %%%M_WIDTH%%%
' },{ xtype: 'panel', html: 'SST: %%%M_SST%%%
' }] }] }