You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
2.0 KiB
97 lines
2.0 KiB
var attsearchvalues_translations={ |
|
el_gr:{ |
|
|
|
}, |
|
en_us:{ |
|
|
|
} |
|
} |
|
|
|
init_onload_fn.push(attsearchvalues_init); |
|
|
|
function attsearchvalues_init() |
|
{ |
|
Ext.getCmp('maptab_east_search_panel_criteria_panel').on('add', function(container, component, index){ |
|
|
|
var innerItems = container.items; |
|
|
|
for(var i=0;i<innerItems.length;i++) |
|
{ |
|
var _item = innerItems.items[i]; |
|
|
|
attsearchvalues_attrComboListener(_item.panelCount); |
|
} |
|
|
|
}); |
|
} |
|
|
|
function attsearchvalues_attrComboListener(_itemId) |
|
{ |
|
Ext.getCmp("attributes_search_combobox_id_"+_itemId).on('select',function(){ |
|
|
|
attsearchvalues_createControl(_itemId); |
|
|
|
}); |
|
} |
|
|
|
function attsearchvalues_createControl(_itemId) |
|
{ |
|
|
|
var _layerId = Ext.getCmp('maptab_east_search_panel_choose_LayerCombo').getValue(); |
|
|
|
var _layer = mapFindLayerById(_layerId); |
|
|
|
var _serviceUrl = _layer._serviceObject._serviceUrl; |
|
|
|
var _attribute = Ext.getCmp("attributes_search_combobox_id_"+_itemId).getValue(); |
|
|
|
if (_serviceUrl=="http://www.rae.gr/geoserver/wms") |
|
{ |
|
var _oldId = "value_search_combobox_id_"+_itemId; |
|
|
|
var _parentId = Ext.getCmp(_oldId).findParentByType('panel').id; |
|
|
|
Ext.getCmp(_parentId).remove(_oldId); |
|
|
|
switch (_attribute) |
|
{ |
|
|
|
case "ID1": |
|
var states = Ext.create('Ext.data.Store', { |
|
fields: ['abbr', 'name'], |
|
data : [ |
|
{"abbr":"AL", "name":"Alabama"}, |
|
{"abbr":"AK", "name":"Alaska"}, |
|
{"abbr":"AZ", "name":"Arizona"} |
|
] |
|
}); |
|
|
|
var cmb = Ext.create('Ext.form.ComboBox', { |
|
store: states, |
|
id:_oldId, |
|
queryMode: 'local', |
|
displayField: 'name', |
|
valueField: 'abbr', |
|
region:'center' |
|
}); |
|
|
|
Ext.getCmp(_parentId).add(cmb); |
|
break; |
|
|
|
default: |
|
|
|
var textField = Ext.create('Ext.form.TextField',{ |
|
xtype:'textfield', |
|
id:_oldId, |
|
width:200, |
|
emptyText:_maptab_east_search_value_empty_text, |
|
region:'center' |
|
}); |
|
Ext.getCmp(_parentId).add(textField); |
|
|
|
break; |
|
|
|
} |
|
} |
|
|
|
} |