← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5024: (GIS) WMS layers can now be reloaded with a different period.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 5024 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-10-24 17:25:10 +0200
message:
  (GIS) WMS layers can now be reloaded with a different period.
added:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/calendar2.png
modified:
  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/javascript/global.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.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
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/calendar2.png'
Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/calendar2.png	1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/calendar2.png	2011-10-24 15:22:51 +0000 differ
=== 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-10-20 20:54:17 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css	2011-10-24 15:22:51 +0000
@@ -157,6 +157,9 @@
 .menu-layeroptions-legend {
     background-image:url('../../../images/legendset.png');
 }
+.menu-layeroptions-period {
+    background-image:url('../../../images/calendar2.png');
+}
 .menu-featureoptions-info {
     background-image:url('../../../images/information2.png');
 }
@@ -425,6 +428,12 @@
 	font:bold 11px arial;
 	color:#111;
 }
+#window-period-title {
+	padding:0 0 3px 21px;
+	background:url('../../../images/calendar2.png') no-repeat 0 0 transparent;
+	font:bold 11px arial;
+	color:#111;
+}
 #window-labels-title {
 	padding:0 0 3px 21px;
 	background:url('../../../images/labels.png') no-repeat 0 0 transparent;

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js	2011-10-21 17:27:13 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js	2011-10-24 15:22:51 +0000
@@ -50,7 +50,7 @@
     feature_data_style_value: 'color:#444',
     feature_data_style_empty: 'color:#555',
     
-    emptytext: '',
+    emptyText: '',
 	labelseparator: '',
 	
 //	DHIS variables

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js	2011-10-21 17:27:13 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js	2011-10-24 15:22:51 +0000
@@ -478,7 +478,7 @@
                     {
                         xtype: 'textfield',
                         id: 'favoritename_tf',
-                        emptytext: G.conf.emptytext,
+                        emptyText: G.conf.emptytext,
                         labelSeparator: G.conf.labelseparator,
                         fieldLabel: G.i18n.display_name,
                         width: G.conf.combo_width_fieldset,
@@ -1668,7 +1668,7 @@
                     {
                         xtype: 'textfield',
                         id: 'baselayername_tf',
-                        emptytext: G.conf.emptytext,
+                        emptyText: G.conf.emptytext,
                         labelSeparator: G.conf.labelseparator,
                         fieldLabel: G.i18n.display_name,
                         width: G.conf.combo_width_fieldset,
@@ -1677,7 +1677,7 @@
                     {
                         xtype: 'textfield',
                         id: 'baselayerurl_tf',
-                        emptytext: G.conf.emptytext,
+                        emptyText: G.conf.emptytext,
                         labelSeparator: G.conf.labelseparator,
                         fieldLabel: G.i18n.url,
                         width: G.conf.combo_width_fieldset
@@ -1685,7 +1685,7 @@
                     {
                         xtype: 'textfield',
                         id: 'baselayerlayer_tf',
-                        emptytext: G.conf.emptytext,
+                        emptyText: G.conf.emptytext,
                         labelSeparator: G.conf.labelseparator,
                         fieldLabel: G.i18n.layer,
                         width: G.conf.combo_width_fieldset
@@ -1693,7 +1693,7 @@
                     {
                         xtype: 'textfield',
                         id: 'baselayertime_tf',
-                        emptytext: 'Optional',
+                        emptyText: 'Optional',
                         labelSeparator: G.conf.labelseparator,
                         fieldLabel: 'Time',
                         width: G.conf.combo_width_fieldset
@@ -1709,7 +1709,7 @@
                         mode: 'remote',
                         forceSelection: true,
                         triggerAction: 'all',
-                        emptytext: G.conf.emptytext,
+                        emptyText: G.conf.emptytext,
                         labelSeparator: G.conf.labelseparator,
                         fieldLabel: G.i18n.overlay_,
                         width: G.conf.combo_width_fieldset,                
@@ -1819,7 +1819,7 @@
                     {
                         xtype: 'textfield',
                         id: 'maplayername_tf',
-                        emptytext: G.conf.emptytext,
+                        emptyText: G.conf.emptytext,
                         labelSeparator: G.conf.labelseparator,
                         fieldLabel: G.i18n.display_name,
                         width: G.conf.combo_width_fieldset,
@@ -1833,7 +1833,7 @@
                         valueField: 'name',
                         triggerAction: 'all',
                         mode: 'remote',
-                        emptytext: G.conf.emptytext,
+                        emptyText: G.conf.emptytext,
                         labelSeparator: G.conf.labelseparator,
                         fieldLabel: G.i18n.geojson_file,
                         width: G.conf.combo_width_fieldset,
@@ -1908,7 +1908,7 @@
                         mode: 'remote',
                         forceSelection: true,
                         triggerAction: 'all',
-                        emptytext: G.conf.emptytext,
+                        emptyText: G.conf.emptytext,
                         labelSeparator: G.conf.labelseparator,
                         fieldLabel: G.i18n.overlay_,
                         width: G.conf.combo_width_fieldset,                
@@ -2161,6 +2161,45 @@
                     }
                 },
                 {
+                    text: 'Change period',
+                    iconCls: 'menu-layeroptions-period',
+                    handler: function(item) {
+                        var layer = item.parentMenu.contextNode.layer;
+                        
+                        var textfield = new Ext.form.TextField({
+                            width: G.conf.combo_width
+                        });
+                        
+                        var button = {
+                            text: 'Update',
+                            iconCls: 'icon-assign',
+                            handler: function() {
+                                var params = {};
+                                if (textfield.getValue()) {
+                                    params.time = textfield.getValue();
+                                }
+                                layer.mergeNewParams(params);
+                                window.destroy();
+                            }
+                        };
+                        
+                        var window = new Ext.Window({
+                            title: '<span id="window-period-title">Change period</span>',
+                            layout: 'fit',
+                            bodyStyle: 'padding:8px; background:#fff',
+                            width: G.conf.combo_width + 26,
+                            items: [ textfield ],
+                            bbar: [
+                                '->',
+                                button
+                            ]
+                        });
+                        
+                        window.setPagePosition(Ext.getCmp('east').x - (window.width + 15), Ext.getCmp('center').y + 41);
+                        window.show();
+                    }
+                },
+                {
                     text: 'Opacity',
                     iconCls: 'menu-layeroptions-opacity',
                     menu: { 

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js	2011-10-24 13:35:32 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js	2011-10-24 15:22:51 +0000
@@ -1522,7 +1522,7 @@
                 }
                 else {
                     this.classify(false, true);
-                }                   
+                }
 			}
 		});
 	},