=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/labels.png' Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/labels.png 2010-09-14 14:08:09 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/labels.png 2011-04-06 11:44:07 +0000 differ === added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/search2.png' Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/search2.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/search2.png 2011-04-06 11:44:07 +0000 differ === added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/transparency2.png' Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/transparency2.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/transparency2.png 2011-04-06 11:44:07 +0000 differ === 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 2011-03-07 20:53:01 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties 2011-04-06 11:44:07 +0000 @@ -18,6 +18,9 @@ cancelled = cancelled apply = Apply applied = applied +show = Show +hide = Hide +toggle = Toggle boundary = Boundary level = Level === 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-03-07 20:53:01 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm 2011-04-06 11:44:07 +0000 @@ -21,6 +21,9 @@ cancelled: '$encoder.jsEscape($i18n.getString( 'cancelled' ) , "'")', apply: '$encoder.jsEscape($i18n.getString( 'apply' ) , "'")', applied: '$encoder.jsEscape($i18n.getString( 'applied' ) , "'")', + show: '$encoder.jsEscape($i18n.getString( 'show' ) , "'")', + hide: '$encoder.jsEscape($i18n.getString( 'hide' ) , "'")', + toggle: '$encoder.jsEscape($i18n.getString( 'toggle' ) , "'")', boundary: '$encoder.jsEscape($i18n.getString( 'boundary' ) , "'")', level: '$encoder.jsEscape($i18n.getString( 'level' ) , "'")', === 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-03-30 12:12:38 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css 2011-04-06 11:44:07 +0000 @@ -112,10 +112,10 @@ font:10px lucida sans unicode,ubuntu,arial; } .menu-layeroptions-locate { - background-image:url('../../../images/magnifier.png'); + background:url('../../../images/search2.png') center bottom; } .menu-layeroptions-opacity { - background-image:url('../../../images/transparency.png'); + background-image:url('../../../images/transparency2.png'); } .menu-layeroptions-labels { background-image:url('../../../images/labels.png'); @@ -126,53 +126,58 @@ .no-icon-menu .x-menu-item-icon { display: none; } +.x-menu-item-icon { + width:14px; + height:14px; + top:4px; +} .menu-layeroptions-opacity-10 { - background-image:url('../../../images/transparency.png'); + background-image:url('../../../images/transparency2.png'); opacity:0.1; filter:alpha(opacity=10); } .menu-layeroptions-opacity-20 { - background-image:url('../../../images/transparency.png'); + background-image:url('../../../images/transparency2.png'); opacity:0.2; filter:alpha(opacity=20); } .menu-layeroptions-opacity-30 { - background-image:url('../../../images/transparency.png'); + background-image:url('../../../images/transparency2.png'); opacity:0.3; filter:alpha(opacity=30); } .menu-layeroptions-opacity-40 { - background-image:url('../../../images/transparency.png'); + background-image:url('../../../images/transparency2.png'); opacity:0.4; filter:alpha(opacity=40); } .menu-layeroptions-opacity-50 { - background-image:url('../../../images/transparency.png'); + background-image:url('../../../images/transparency2.png'); opacity:0.5; filter:alpha(opacity=50); } .menu-layeroptions-opacity-60 { - background-image:url('../../../images/transparency.png'); + background-image:url('../../../images/transparency2.png'); opacity:0.6; filter:alpha(opacity=60); } .menu-layeroptions-opacity-70 { - background-image:url('../../../images/transparency.png'); + background-image:url('../../../images/transparency2.png'); opacity:0.7; filter:alpha(opacity=70); } .menu-layeroptions-opacity-80 { - background-image:url('../../../images/transparency.png'); + background-image:url('../../../images/transparency2.png'); opacity:0.8; filter:alpha(opacity=80); } .menu-layeroptions-opacity-90 { - background-image:url('../../../images/transparency.png'); + background-image:url('../../../images/transparency2.png'); opacity:0.9; filter:alpha(opacity=90); } .menu-layeroptions-opacity-100 { - background-image:url('../../../images/transparency.png'); + background-image:url('../../../images/transparency2.png'); opacity:1.0; filter:alpha(opacity=100); } @@ -230,8 +235,8 @@ .x-btn .icon-assign { background-image:url('../../../images/accept.png'); } -.x-btn .icon-export { - background-image:url('../../../images/export2.png'); +.x-btn .icon-labels { + background-image:url('../../../images/labels.png'); } .aa_med button { color:#333; @@ -341,6 +346,18 @@ font:bold 11px arial; color:#111; } +#window-labels-title { + padding:0 0 3px 21px; + background:url('../../../images/labels.png') no-repeat 0 0 transparent; + font:bold 11px arial; + color:#111; +} +#window-locate-title { + padding:0 0 3px 21px; + background:url('../../../images/search2.png') no-repeat 0 0 transparent; + font:bold 11px arial; + color:#111; +} /* Ext Panel */ .panel-title { === 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-03-29 09:15:25 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js 2011-04-06 11:44:07 +0000 @@ -160,7 +160,7 @@ }, labels: { - getActivatedOpenLayersStyleMap: function() { + getActivatedOpenLayersStyleMap: function(fsize, fweight, fstyle) { return new OpenLayers.StyleMap({ 'default' : new OpenLayers.Style( OpenLayers.Util.applyDefaults({ @@ -169,8 +169,9 @@ 'strokeWidth': 1, 'label': '${labelString}', 'fontFamily': 'arial,lucida sans unicode', - 'fontWeight': 'normal', - 'fontSize': 13 + 'fontSize': fsize ? fsize : 13, + 'fontWeight': fweight ? 'bold' : 'normal', + 'fontStyle': fstyle ? 'italic' : 'normal' }, OpenLayers.Feature.Vector.style['default']) ), @@ -198,9 +199,9 @@ }) }); }, - toggleFeatureLabels: function(widget) { + toggleFeatureLabels: function(widget, fsize, fweight, fstyle) { function activateLabels() { - widget.layer.styleMap = this.getActivatedOpenLayersStyleMap(); + widget.layer.styleMap = this.getActivatedOpenLayersStyleMap(fsize, fweight, fstyle); widget.labels = true; } function deactivateLabels(scope) { === 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-03-30 12:12:38 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js 2011-04-06 12:01:31 +0000 @@ -488,7 +488,7 @@ if (params.featureType == G.conf.map_feature_type_multipolygon) { G.stores.polygonMapView.load(); } - else if (params.featureType == G.conf.map_feature_type_multipolygon) { + else if (params.featureType == G.conf.map_feature_type_point) { G.stores.pointMapView.load(); } Ext.getCmp('favoritename_tf').reset(); @@ -2021,7 +2021,7 @@ var locateFeatureWindow = new Ext.Window({ id: 'locatefeature_w', - title: 'Locate features', + title: 'Locate features', layout: 'fit', width: G.conf.window_width, height: G.util.getMultiSelectHeight() + 140, @@ -2122,31 +2122,123 @@ Ext.message.msg(false, '' + layer.name + ': No features rendered'); } }, + + showLabelWindow: function(item) { + if (item.labelWindow) { + item.labelWindow.show(); + } + else { + var labelWindow = new Ext.Window({ + title: 'Labels', + layout: 'fit', + closeAction: 'hide', + width: G.conf.window_width, + height: 170, + items: [ + { + xtype: 'form', + bodyStyle: 'padding:8px', + labelWidth: G.conf.label_width, + items: [ + {html: '