|
|
{ 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: '<p align="center"><img src="/style/assets/5_node.png"><br/>%%%DEV_LABEL%%%<br/></p>' },{ xtype:'fieldset', //checkboxToggle:true,
collapsible: true, title: 'Device', autoHeight: true, defaults: { //width: 180
}, collapsed: false, items :[{ xtype: 'hidden', id: 'dev_name', name: 'dev_name', value: '%%%DEV_LABEL%%%' },{ xtype: 'hidden', id: 'dev_ip', name: 'dev_ip', value: '%%%IP_ADDRESS%%%' },{ xtype: 'hidden', id: 'dev_port', name: 'dev_port', value: %%%IP_PORT%%% },{ xtype: 'panel', html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">IPv4: %%%IP_ADDRESS%%%</p>' },{ xtype: 'panel', html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Port: %%%IP_PORT%%%</p>' }] },{ xtype: 'button', text: 'Change Settings', width: '100%', handler: function(){ 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: 'Label', id: 'ued_name' },{ fieldLabel: 'IP Address', id: 'ued_address' },{ fieldLabel: 'Port', value: 2222, readOnly: false, id: 'ued_port' }] }], buttons:[{ text: 'Cancel', handler: function(){ wAddSocket.close(); wAddSocket = null; } },{ text: 'Apply Settings', handler: function(){ var val_addr = Ext.getCmp('ued_address').getValue(); var val_name = Ext.getCmp('ued_name').getValue(); Ext.Ajax.request({ url: '/lib/controller/updateLrfSettings.php', params: { SENSOR: %%%LRF_ID%%%, SNAME: val_name, SIPADDR: val_addr }, 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_ip').getValue()); Ext.getCmp('ued_port').setValue( Ext.getCmp('dev_port').getValue()); } },{ xtype:'fieldset', title: 'Master LRF', collapsible: true, autoHeight: true, defaults: { //width: 168
}, items :[{ xtype: 'panel', html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%M_ORDER%%%</p>' },{ xtype: 'panel', html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%M_OFFSET%%%</p>' },{ xtype: 'panel', html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%M_WIDTH%%%</p>' },{ xtype: 'panel', html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%M_SST%%%</p>' }] },{ xtype:'fieldset', title: 'Slave LRF', collapsible: true, autoHeight: true, defaults: { //width: 168
}, items :[{ xtype: 'panel', html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%S_ORDER%%%</p>' },{ xtype: 'panel', html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%S_OFFSET%%%</p>' },{ xtype: 'panel', html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%S_WIDTH%%%</p>' },{ xtype: 'panel', html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%S_SST%%%</p>' }] }]}
|