=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2014-01-30 11:32:36 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2014-01-30 11:59:43 +0000 @@ -3801,7 +3801,7 @@ cls: 'gis-textarea', height: 130, fieldStyle: 'padding-left: 4px; padding-top: 3px', - emptyText: GIS.i18n.write_your_interpretation + emptyText: GIS.i18n.write_your_interpretation + '..' }); panel = Ext.create('Ext.panel.Panel', { @@ -8033,16 +8033,32 @@ handler: function() { var textArea, window, - text = ''; + text = '', + el = 'table1', + layout = gis.util.map.map2plugin(gis.util.layout.getPluginConfig()); + + layout.el = el; + + if (layout.mapViews) { + for (var i = 0, view; i < layout.mapViews.length; i++) { + view = layout.mapViews[i]; + + if (view.legendSet) { + delete view.legendSet.bounds; + delete view.legendSet.colors; + delete view.legendSet.names; + } + } + } text += '\n\n'; text += '\n'; text += '\n'; text += '\n'; text += '\n\n\n'; - text += '
\n\n'; + text += '
\n\n'; text += '\n\n'; text += '\n'; @@ -8079,57 +8095,11 @@ window.show(); } - - - - //var textArea, - //window, - //text = 'DHIS.getMap(' + JSON.stringify(gis.util.map.map2plugin(gis.util.layout.getPluginConfig())) + ');'; - - //textArea = Ext.create('Ext.form.field.TextArea', { - //width: 400, - //height: 200, - //readOnly: true, - //cls: 'gis-textarea monospaced', - //value: text - //}); - - //window = Ext.create('Ext.window.Window', { - //title: 'Plugin configuration', - //layout: 'fit', - //modal: true, - //resizable: false, - //items: textArea, - //destroyOnBlur: true, - //bbar: [ - //'->', - //{ - //text: 'Format', - //handler: function() { - //textArea.setValue('DHIS.getMap(' + JSON.stringify(gis.util.map.map2plugin(gis.util.layout.getPluginConfig()), null, 2) + ');'); - - //} - //}, - //{ - //text: 'Select', - //handler: function() { - //textArea.selectText(); - //} - //} - //], - //listeners: { - //show: function(w) { - //this.setPosition(215, 33); - //} - //} - //}); - - //window.show(); - //} }); shareButton = Ext.create('Ext.button.Button', { text: GIS.i18n.share, + disabled: true, xableItems: function() { interpretationItem.xable(); pluginItem.xable(); === 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 2014-01-30 11:32:36 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2014-01-30 11:59:43 +0000 @@ -1358,6 +1358,10 @@ } else { gis.map = null; + + if (gis.viewport.shareButton) { + gis.viewport.shareButton.enable(); + } } }; @@ -1545,6 +1549,10 @@ } else { gis.map = null; + + if (gis.viewport.shareButton) { + gis.viewport.shareButton.enable(); + } } }; @@ -2017,6 +2025,7 @@ else { gis.map = null; if (gis.viewport.shareButton) { + gis.viewport.shareButton.enable(); } }