=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2013-12-22 23:27:34 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2013-12-23 08:00:34 +0000 @@ -538,7 +538,8 @@ attributes = feature.attributes, map = attributes.nameColumnMap, html = '', - titleStyle = ' style="font-weight:bold; padding-right:10px"'; + titleStyle = ' style="font-weight:bold; padding-right:10px"', + windowPosition; // default properties html += '' + map['ou'] + ''; @@ -555,18 +556,31 @@ html += '
' + attributes['ouname'] + '
'; if (Ext.isObject(eventWindow) && eventWindow.destroy) { + windowPosition = eventWindow.getPosition(); eventWindow.destroy(); + eventWindow = null; } eventWindow = Ext.create('Ext.window.Window', { title: 'Event', resizable: false, bodyStyle: 'background-color:#fff; padding:5px', - html: html + html: html, + autoShow: true, + listeners: { + show: function(w) { + if (windowPosition) { + w.setPosition(windowPosition); + } + else { + gis.util.gui.window.setPositionTopRight(w); + } + }, + destroy: function() { + eventWindow = null; + } + } }); - - eventWindow.show(); - gis.util.gui.window.setPositionTopRight(eventWindow); }; }