Fullstack Portal Created by the HCMR for the Marine Strategy Framework Directive Program in order to cover demands and aspects considering extendability and maintainability
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.

124 lines
3.0 KiB

2 years ago
var choosegoto_translations={
el_gr:{
choosegoto:'Μετάβαση σε...',
choosegoto_xy:"Σε συντεταγμένες",
choosegoto_googleqsearch:"Διεύθυνση (Google)",
choosegoto_qsearch:"Οικοδομικό Τετράγωνο",
choosegoto_qsearch_poleodomiki_enotita:"Πολεοδομική Ενότητα - Ο.Τ."
},
en_us:{
choosegoto:'Go To...',
choosegoto_xy:"Coordintates",
choosegoto_googleqsearch:"Address (Google)",
choosegoto_qsearch:"O.T.",
choosegoto_qsearch_poleodomiki_enotita:"Urban Section - Ο.Τ."
}
}
var choosegoto_combo=[{
xtype:'combo',
loadMask:true,
store: new Ext.data.SimpleStore({
fields: ['value','label'],
data: [
["choosegoto_xy",choosegoto_translations[language].choosegoto_xy],
["choosegoto_googleqsearch",choosegoto_translations[language].choosegoto_googleqsearch],
["choosegoto_qsearch",choosegoto_translations[language].choosegoto_qsearch],
// ["choosegoto_qsearch_poleodomiki_enotita",choosegoto_translations[language].choosegoto_qsearch_poleodomiki_enotita]
]
}),
displayField: 'label',
valueField: 'value',
forceSelection: true,
triggerAction: 'all',
width:200,
selectOnFocus: false,
queryMode: 'local',
emptyText:choosegoto_translations[language].choosegoto,
editable: false,
listeners:{
select:function(combo,record)
{
var record=record[0];
Ext.getCmp("choosegoto_panel").removeAll();
switch(record.data.value)
{
case "choosegoto_xy":
Ext.getCmp("choosegoto_panel").add(choosegoto_xy());
break;
case "choosegoto_googleqsearch":
Ext.getCmp("choosegoto_panel").add(choosegoto_googleqsearch());
break;
case "choosegoto_qsearch":
Ext.getCmp("choosegoto_panel").add(choosegoto_qsearch());
break;
// case "choosegoto_qsearch_poleodomiki_enotita":
// Ext.getCmp("choosegoto_panel").add(choosegoto_qsearch_poleodomiki_enotita());
// break;
}
}
}
},{
xtype:'container',
layout:'hbox',
id:'choosegoto_panel'
}];
function choosegoto_xy()
{
var _p = [{
xtype:'textfield',
id:'choosegoto_xy_x',
emptyText:_maptab_bbar_general_zoom_to_x,
width:80
},{
xtype:'textfield',
id:'choosegoto_xy_y',
emptyText:_maptab_bbar_general_zoom_to_y,
width:80
},{
xtype:'button',
text:_maptab_bbar_general_zoom_to_go,
handler:function()
{
var lon=Ext.getCmp("choosegoto_xy_x").getValue();
var lat=Ext.getCmp("choosegoto_xy_y").getValue();
if(Ext.isNumeric(lon) && Ext.isNumeric(lat))
{
maptab_toolbar_general_setCoordinates(lon,lat,"EPSG:2100");
}
}
}];
return _p;
}
function choosegoto_googleqsearch()
{
return googleqsearch_geocoding_btn;
}
function choosegoto_qsearch()
{
return quicksearch_field;
}
function choosegoto_qsearch_poleodomiki_enotita()
{
return quicksearchUrban_field;
}
init_onload_fn.push(init_choosegoto);
function init_choosegoto()
{
Ext.getCmp("maptab_toolbar_navigation_tab").add(choosegoto_combo);
}