← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2923: Some view history improvements. Restricted to show last 20 views.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2923 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-02-25 20:10:26 +0100
message:
  Some view history improvements. Restricted to show last 20 views.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js


--
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/resources/org/hisp/dhis/mapping/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties	2010-12-21 12:12:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties	2011-02-25 19:04:17 +0000
@@ -237,4 +237,5 @@
 image_resolution					= Resolution
 max									= max
 characters							= characters
-geojson_file						= GeoJSON file
\ No newline at end of file
+geojson_file						= GeoJSON file
+history								= History
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm	2011-01-19 10:23:43 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm	2011-02-25 19:04:17 +0000
@@ -239,5 +239,6 @@
 
     max: '$encoder.jsEscape($i18n.getString( 'max' ) , "'")',
     characters: '$encoder.jsEscape($i18n.getString( 'characters' ) , "'")',
-    geojson_file: '$encoder.jsEscape($i18n.getString( 'geojson_file' ) , "'")'
+    geojson_file: '$encoder.jsEscape($i18n.getString( 'geojson_file' ) , "'")',
+    history: '$encoder.jsEscape($i18n.getString( 'history' ) , "'")'
 };
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css	2011-02-25 15:16:39 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css	2011-02-25 19:04:17 +0000
@@ -105,7 +105,7 @@
 
 /* Ext Menu */
 a.x-menu-item-custom {
-    padding: 2px 17px 3px 12px;
+    padding: 2px 16px 3px 11px;
 }
 #viewhistory_m .x-menu-list {
     background-color:#f1f1f1;

=== 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	2011-02-25 15:55:39 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2011-02-25 19:04:17 +0000
@@ -2305,6 +2305,7 @@
     var viewHistoryButton = new Ext.Button({
         id: 'viewhistory_b',
 		iconCls: 'icon-history',
+		tooltip: G.i18n.history,
         addMenu: function() {
             this.menu = new Ext.menu.Menu({
                 id: 'viewhistory_m',
@@ -2318,6 +2319,10 @@
                         var keys = menu.items.keys;
                         items.unshift(items.pop());
                         keys.unshift(keys.pop());
+						
+						if (items.length > 3) {
+							items[items.length-1].destroy();
+						}
                     },
                     'click': function(menu, item, e) {
                         var mapView = item.mapView;
@@ -2361,8 +2366,7 @@
             this.menu.addMenuItem({
                 html: mapView.label,
                 mapView: mapView
-            });
-console.log(this.menu.items);            
+            });           
         }            
     });
 
@@ -2384,6 +2388,7 @@
 			zoomInButton,
 			zoomOutButton, ' ',
 			zoomToVisibleExtentButton,
+			viewHistoryButton,
 			'-',
 			favoritesButton,
             predefinedMapLegendSetButton,
@@ -2391,8 +2396,6 @@
 			'-',
             adminButton,
 			helpButton,
-            '-',
-            viewHistoryButton,
 			'->',
 			exitButton,' ',' '
 		]