=== 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-02-16 17:59:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/labels.png 2010-09-14 14:08:09 +0000 differ === added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/magnifier.png' Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/magnifier.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/magnifier.png 2010-09-14 14:08:09 +0000 differ === added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/transparency.png' Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/transparency.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/transparency.png 2010-09-14 14:08:09 +0000 differ === added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/wmslegend.png' Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/wmslegend.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/wmslegend.png 2010-09-14 14:08:09 +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 2010-09-13 14:13:44 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css 2010-09-14 14:08:09 +0000 @@ -104,6 +104,74 @@ color:#777; } +/* Ext Menu */ +.menu-layeroptions-locate { + background-image:url(../../../images/magnifier.png); +} +.menu-layeroptions-opacity { + background-image:url(../../../images/transparency.png); +} +.menu-layeroptions-labels { + background-image:url(../../../images/labels3.png); +} +.menu-layeroptions-wmslegend { + background-image:url(../../../images/wmslegend.png); +} + +.no-icon-menu .x-menu-item-icon { + display: none; +} +.menu-layeroptions-opacity-10 { + background-image:url(../../../images/transparency.png); + opacity:0.1; + filter:alpha(opacity=10); +} +.menu-layeroptions-opacity-20 { + background-image:url(../../../images/transparency.png); + opacity:0.2; + filter:alpha(opacity=20); +} +.menu-layeroptions-opacity-30 { + background-image:url(../../../images/transparency.png); + opacity:0.3; + filter:alpha(opacity=30); +} +.menu-layeroptions-opacity-40 { + background-image:url(../../../images/transparency.png); + opacity:0.4; + filter:alpha(opacity=40); +} +.menu-layeroptions-opacity-50 { + background-image:url(../../../images/transparency.png); + opacity:0.5; + filter:alpha(opacity=50); +} +.menu-layeroptions-opacity-60 { + background-image:url(../../../images/transparency.png); + opacity:0.6; + filter:alpha(opacity=60); +} +.menu-layeroptions-opacity-70 { + background-image:url(../../../images/transparency.png); + opacity:0.7; + filter:alpha(opacity=70); +} +.menu-layeroptions-opacity-80 { + background-image:url(../../../images/transparency.png); + opacity:0.8; + filter:alpha(opacity=80); +} +.menu-layeroptions-opacity-90 { + background-image:url(../../../images/transparency.png); + opacity:0.9; + filter:alpha(opacity=90); +} +.menu-layeroptions-opacity-100 { + background-image:url(../../../images/transparency.png); + opacity:1.0; + filter:alpha(opacity=100); +} + /* Ext Grid */ .row-assigned { background-color:#90ee90; === 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 2010-09-13 15:19:48 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2010-09-14 14:18:16 +0000 @@ -2989,6 +2989,7 @@ var baseLayerOptionsWindow = new Ext.Window({ id: 'baselayeroptions_w', title: 'Options: ' + layer.name + '', + width: 180, items: [ { xtype: 'menu', @@ -2996,8 +2997,8 @@ floating: false, items: [ { - html: 'Show WMS legend', - iconCls: 'no-icon', + text: 'Show WMS legend', + iconCls: 'menu-layeroptions-wmslegend', listeners: { 'click': { fn: function() { @@ -3030,47 +3031,59 @@ } }, { - html: 'Opacity', - menu: { + text: 'Opacity', + iconCls: 'menu-layeroptions-opacity', + menu: { + iconCls: 'no-icon-menu', items: [ { - html: '0.1', + text: '0.1', + iconCls: 'menu-layeroptions-opacity-10', listeners: { 'click': { fn: function() { layer.setOpacity(0.1); } } } }, { - html: '0.2', + text: '0.2', + iconCls: 'menu-layeroptions-opacity-20', listeners: { 'click': { fn: function() { layer.setOpacity(0.2); } } } }, { - html: '0.3', + text: '0.3', + iconCls: 'menu-layeroptions-opacity-30', listeners: { 'click': { fn: function() { layer.setOpacity(0.3); } } } }, { - html: '0.4', + text: '0.4', + iconCls: 'menu-layeroptions-opacity-40', listeners: { 'click': { fn: function() { layer.setOpacity(0.4); } } } }, { - html: '0.5', + text: '0.5', + iconCls: 'menu-layeroptions-opacity-50', listeners: { 'click': { fn: function() { layer.setOpacity(0.5); } } } }, { - html: '0.6', + text: '0.6', + iconCls: 'menu-layeroptions-opacity-60', listeners: { 'click': { fn: function() { layer.setOpacity(0.6); } } } }, { - html: '0.7', + text: '0.7', + iconCls: 'menu-layeroptions-opacity-70', listeners: { 'click': { fn: function() { layer.setOpacity(0.7); } } } }, { - html: '0.8', + text: '0.8', + iconCls: 'menu-layeroptions-opacity-80', listeners: { 'click': { fn: function() { layer.setOpacity(0.8); } } } }, { - html: '0.9', + text: '0.9', + iconCls: 'menu-layeroptions-opacity-90', listeners: { 'click': { fn: function() { layer.setOpacity(0.9); } } } }, { - html: '1.0', + text: '1.0', + iconCls: 'menu-layeroptions-opacity-100', listeners: { 'click': { fn: function() { layer.setOpacity(1.0); } } } } ] @@ -3080,7 +3093,7 @@ } ] }); - baseLayerOptionsWindow.setPagePosition(Ext.getCmp('east').x - 190, Ext.getCmp('center').y + 50); + baseLayerOptionsWindow.setPagePosition(Ext.getCmp('east').x - 206, Ext.getCmp('center').y + 50); baseLayerOptionsWindow.show(); } @@ -3194,6 +3207,7 @@ var vectorLayerOptionsWindow = new Ext.Window({ id: 'vectorlayeroptions_w', title: 'Options: ' + layer.name + '', + width: 180, items: [ { xtype: 'menu', @@ -3201,74 +3215,93 @@ floating: false, items: [ { - html: 'Opacity', - menu: { + text: 'Opacity', + iconCls: 'menu-layeroptions-opacity', + menu: { + iconCls: 'no-icon-menu', items: [ { - html: '0.1', + text: '0.1', + iconCls: 'menu-layeroptions-opacity-10', listeners: { 'click': { fn: function() { layer.setOpacity(0.1); } } } }, { - html: '0.2', + text: '0.2', + iconCls: 'menu-layeroptions-opacity-20', listeners: { 'click': { fn: function() { layer.setOpacity(0.2); } } } }, { - html: '0.3', + text: '0.3', + iconCls: 'menu-layeroptions-opacity-30', listeners: { 'click': { fn: function() { layer.setOpacity(0.3); } } } }, { - html: '0.4', + text: '0.4', + iconCls: 'menu-layeroptions-opacity-40', listeners: { 'click': { fn: function() { layer.setOpacity(0.4); } } } }, { - html: '0.5', + text: '0.5', + iconCls: 'menu-layeroptions-opacity-50', listeners: { 'click': { fn: function() { layer.setOpacity(0.5); } } } }, { - html: '0.6', + text: '0.6', + iconCls: 'menu-layeroptions-opacity-60', listeners: { 'click': { fn: function() { layer.setOpacity(0.6); } } } }, { - html: '0.7', + text: '0.7', + iconCls: 'menu-layeroptions-opacity-70', listeners: { 'click': { fn: function() { layer.setOpacity(0.7); } } } }, { - html: '0.8', + text: '0.8', + iconCls: 'menu-layeroptions-opacity-80', listeners: { 'click': { fn: function() { layer.setOpacity(0.8); } } } }, { - html: '0.9', + text: '0.9', + iconCls: 'menu-layeroptions-opacity-90', listeners: { 'click': { fn: function() { layer.setOpacity(0.9); } } } }, { - html: '1.0', + text: '1.0', + iconCls: 'menu-layeroptions-opacity-100', listeners: { 'click': { fn: function() { layer.setOpacity(1.0); } } } } ] } }, { - html: 'Show/hide labels', + text: 'Show/hide labels', + iconCls: 'menu-layeroptions-labels', listeners: { 'click': { fn: function() { - if (layer.name == 'Polygon layer') { - if (ACTIVEPANEL == thematicMap) { - toggleFeatureLabelsPolygons(layer); + if (layer.features.length > 0) { + if (layer.name == 'Polygon layer') { + if (ACTIVEPANEL == thematicMap) { + toggleFeatureLabelsPolygons(layer); + } + else { + toggleFeatureLabelsAssignment(true, layer); + } } - else { - toggleFeatureLabelsAssignment(true, layer); + else if (layer.name == 'Point layer') { + toggleFeatureLabelsPoints(layer); } } - else if (layer.name == 'Point layer') { - toggleFeatureLabelsPoints(layer); + else { + Ext.message.msg(false, '' + layer.name + ' ' + i18n_has_no_orgunits); } } } } }, { - html: 'Locate feature', + text: 'Locate feature', + iconCls: 'menu-layeroptions-locate', listeners: { 'click': { fn: function() { @@ -3278,7 +3311,7 @@ vectorLayerOptionsWindow.hide(); } else { - Ext.message.msg(false, '' + layer.name + '' + i18n_has_no_orgunits); + Ext.message.msg(false, '' + layer.name + ' ' + i18n_has_no_orgunits); } } } @@ -3288,7 +3321,7 @@ } ] }); - vectorLayerOptionsWindow.setPagePosition(Ext.getCmp('east').x - 173, Ext.getCmp('center').y + 50); + vectorLayerOptionsWindow.setPagePosition(Ext.getCmp('east').x - 206, Ext.getCmp('center').y + 50); vectorLayerOptionsWindow.show(); }