=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2010-02-09 15:55:32 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2010-02-10 22:20:26 +0000 @@ -539,7 +539,14 @@ } ] } - ] + ], + listeners: { + 'hide': { + fn: function() { + alert("closed"); + } + } + } }); /* LEGEND SET PANEL */ @@ -2748,12 +2755,28 @@ anchor: '100%', bodyStyle: 'padding-left: 4px;' }, + { + xtype: 'panel', + title: 'Feature data', + height: 65, + anchor: '100%', + bodyStyle: 'padding-left: 4px;', + items: + [ + new Ext.form.Label({ + id: 'featureinfo_l', + text: 'No feature selected.', + style: 'color:#666' + }) + ] + }, { title: 'Map legend', minHeight: 65, autoHeight: true, contentEl: 'legend', - anchor: '100%' + anchor: '100%', + bodyStyle: 'padding-left: 4px;' } ] }, @@ -2854,7 +2877,8 @@ if (MAPDATA != null) { if (ACTIVEPANEL == 'choropleth') { - popup_feature = new Ext.Window({ +/* + popup_feature = new Ext.Window({ title: 'Organisation unit', width: 190, height: 90,// + 60, @@ -2864,18 +2888,15 @@ x: x, y: y }); - - var html = '

' + feature.attributes[MAPDATA.nameColumn] + '

'; - html += '

Value:  ' + feature.attributes.value + '

'; - // html += style + bs + 'Factor' + be + space + feature.attributes.factor.toFixed(1) + pe; - // html += style + bs + 'Numerator' + be + space + feature.attributes.numeratorValue.toFixed(1) + pe; - // html += style + bs + 'Denominator' + be + space + feature.attributes.denominatorValue.toFixed(1) + pe; popup_feature.html = html; popup_feature.show(); +*/ + + Ext.getCmp('featureinfo_l').setText('' + feature.attributes[MAPDATA.nameColumn] + '
' + feature.attributes.value + '', false); } else if (ACTIVEPANEL == 'mapping') { - popup_feature = new Ext.Window({ +/* popup_feature = new Ext.Window({ title: 'Organisation unit', width: 190, height: 71, @@ -2886,18 +2907,18 @@ y: y }); - var html = '

' + feature.attributes[MAPDATA.nameColumn] + '

'; + var html = '

' + feature.attributes[MAPDATA.nameColumn] + '

'; popup_feature.html = html; popup_feature.show(); +*/ + Ext.getCmp('featureinfo_l').setText('' + feature.attributes[MAPDATA.nameColumn] + '', false); } } } function onHoverUnselectChoropleth(feature) { - if (MAPDATA != null) { - popup_feature.hide(); - } + Ext.getCmp('featureinfo_l').setText('No feature selected.', false); } function onClickSelectChoropleth(feature) {