← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13502: GIS, event layer info window fixes

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 13502 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-12-30 22:40:15 +0100
message:
  GIS, event layer info window fixes
modified:
  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/styles/style.css


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== 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-27 18:43:30 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js	2013-12-30 21:38:10 +0000
@@ -577,15 +577,16 @@
                 var ignoreKeys = ['label', 'value', 'nameColumnMap', 'psi', 'ps', 'longitude', 'latitude', 'eventdate', 'ou', 'oucode', 'ouname'],
                     attributes = feature.attributes,
                     map = attributes.nameColumnMap,
-                    html = '<table>',
-                    titleStyle = ' style="font-weight:bold; padding-right:10px"',
+                    html = '<table class="padding1">',
+                    titleStyle = ' style="font-weight:bold; padding-right:10px; vertical-align:top"',
+                    valueStyle = ' style="max-width:170px"',
                     windowPosition;
 
                 // default properties
-                html += '<tr><td' + titleStyle + '>' + map['ou'] + '</td><td>' + attributes['ouname'] + '</td></tr>';
-                html += '<tr><td' + titleStyle + '>' + map['eventdate'] + '</td><td>' + attributes['eventdate'] + '</td></tr>';
-                html += '<tr><td' + titleStyle + '>' + map['longitude'] + '</td><td>' + attributes['longitude'] + '</td></tr>';
-                html += '<tr><td' + titleStyle + '>' + map['latitude'] + '</td><td>' + attributes['latitude'] + '</td></tr>';
+                html += '<tr><td' + titleStyle + '>' + map['ou'] + '</td><td' + valueStyle + '>' + attributes['ouname'] + '</td></tr>';
+                html += '<tr><td' + titleStyle + '>' + map['eventdate'] + '</td><td' + valueStyle + '>' + attributes['eventdate'] + '</td></tr>';
+                html += '<tr><td' + titleStyle + '>' + map['longitude'] + '</td><td' + valueStyle + '>' + attributes['longitude'] + '</td></tr>';
+                html += '<tr><td' + titleStyle + '>' + map['latitude'] + '</td><td' + valueStyle + '>' + attributes['latitude'] + '</td></tr>';
 
                 for (var key in attributes) {
                     if (attributes.hasOwnProperty(key) && !Ext.Array.contains(ignoreKeys, key)) {
@@ -603,6 +604,7 @@
 
                 eventWindow = Ext.create('Ext.window.Window', {
                     title: 'Event',
+                    layout: 'fit',
                     resizable: false,
                     bodyStyle: 'background-color:#fff; padding:5px',
                     html: html,

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/styles/style.css'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/styles/style.css	2013-12-18 12:48:13 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/styles/style.css	2013-12-30 21:38:10 +0000
@@ -91,6 +91,10 @@
 	cursor: default !important;
 }
 
+table.padding1 td {
+	padding: 1px;
+}
+
 .el-opacity-1 {
 	opacity: 1 !important;
 }