=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties 2012-01-19 14:21:19 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties 2012-01-20 12:02:17 +0000 @@ -40,7 +40,7 @@ organisation_units=Organisation units select_all_children=Select all children chart_options=Chart options -png_only=NB! These fields are for the PNG version only +png_only=For the PNG version only trend_line=Trend line hide_subtitle=Hide subtitle hide_legend=Hide legend === modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-01-19 14:21:19 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-01-20 12:16:04 +0000 @@ -991,6 +991,7 @@ dataelementIds: [], relativePeriods: {}, organisationunitIds: [], + hideSubtitle: false, hideLegend: false, domainAxisLabel: null, rangeAxisLabel: null, @@ -1027,11 +1028,15 @@ this.relativePeriods = DV.util.dimension.period.getRelativePeriodObject(); this.organisationunitIds = DV.util.dimension.organisationunit.getIds(); + this.hideSubtitle = DV.cmp.favorite.hidesubtitle.getValue(); this.hideLegend = DV.cmp.favorite.hidelegend.getValue(); this.domainAxisLabel = DV.cmp.favorite.domainaxislabel.getValue(); this.rangeAxisLabel = DV.cmp.favorite.rangeaxislabel.getValue(); - this.isRendered = true; + if (!this.isRendered) { + DV.cmp.toolbar.datatable.enable(); + this.isRendered = true; + } if (exe) { DV.value.getValues(true); @@ -1064,6 +1069,7 @@ } var f = Ext.JSON.decode(r.responseText), indiment = []; + f.type = f.type.toLowerCase(); f.series = f.series.toLowerCase(); f.category = f.category.toLowerCase(); @@ -1133,6 +1139,7 @@ this.filter.names = f.names[this.filter.dimension]; DV.cmp.favorite.trendline.setValue(f.regression); + this.hideSubtitle = f.hideSubtitle; DV.cmp.favorite.hidesubtitle.setValue(f.hideSubtitle); this.hideLegend = f.hideLegend; DV.cmp.favorite.hidelegend.setValue(f.hideLegend); @@ -1266,7 +1273,7 @@ animate: true, store: DV.store.chart, insetPadding: DV.conf.chart.style.inset, - items: DV.util.chart.getTitle(), + items: DV.state.hideSubtitle ? false : DV.util.chart.getTitle(), legend: DV.state.hideLegend ? false : DV.util.chart.getLegend(), axes: [ { @@ -1311,7 +1318,7 @@ animate: true, store: DV.store.chart, insetPadding: DV.conf.chart.style.inset, - items: DV.util.chart.getTitle(), + items: DV.state.hideSubtitle ? false : DV.util.chart.getTitle(), legend: DV.state.hideLegend ? false : DV.util.chart.getLegend(DV.store.chart.bottom.length), axes: [ { @@ -1356,7 +1363,7 @@ animate: true, store: DV.store.chart, insetPadding: DV.conf.chart.style.inset, - items: DV.util.chart.getTitle(), + items: DV.state.hideSubtitle ? false : DV.util.chart.getTitle(), legend: DV.state.hideLegend ? false : DV.util.chart.getLegend(), axes: [ { @@ -1387,7 +1394,7 @@ animate: true, store: DV.store.chart, insetPadding: DV.conf.chart.style.inset, - items: DV.util.chart.getTitle(), + items: DV.state.hideSubtitle ? false : DV.util.chart.getTitle(), legend: DV.state.hideLegend ? false : DV.util.chart.getLegend(), axes: [ { @@ -1427,7 +1434,7 @@ shadow: true, store: DV.store.chart, insetPadding: 60, - items: DV.util.chart.pie.getTitle(), + items: DV.state.hideSubtitle ? false : DV.util.chart.getTitle(), legend: DV.state.hideLegend ? false : DV.util.chart.getLegend(DV.state.category.names.length), series: [{ type: 'pie', @@ -2314,7 +2321,7 @@ collapsible: true, items: [ { - html: DV.i18n.png_only, + html: '* ' + DV.i18n.png_only, bodyStyle: 'border:0 none; color:#555; font-style:italic; padding-bottom:10px' }, { @@ -2325,19 +2332,7 @@ { xtype: 'checkbox', cls: 'dv-checkbox-alt1', - style: 'margin-right:25px', - boxLabel: DV.i18n.trend_line, - labelWidth: DV.conf.layout.form_label_width, - listeners: { - added: function() { - DV.cmp.favorite.trendline = this; - } - } - }, - { - xtype: 'checkbox', - cls: 'dv-checkbox-alt1', - style: 'margin-right:24px', + style: 'margin-right:21px', boxLabel: DV.i18n.hide_subtitle, labelWidth: DV.conf.layout.form_label_width, listeners: { @@ -2349,7 +2344,7 @@ { xtype: 'checkbox', cls: 'dv-checkbox-alt1', - style: 'margin-right:25px', + style: 'margin-right:21px', boxLabel: DV.i18n.hide_legend, labelWidth: DV.conf.layout.form_label_width, listeners: { @@ -2361,7 +2356,19 @@ { xtype: 'checkbox', cls: 'dv-checkbox-alt1', - boxLabel: DV.i18n.user_orgunit, + style: 'margin-right:21px', + boxLabel: '* ' + DV.i18n.trend_line + '', + labelWidth: DV.conf.layout.form_label_width, + listeners: { + added: function() { + DV.cmp.favorite.trendline = this; + } + } + }, + { + xtype: 'checkbox', + cls: 'dv-checkbox-alt1', + boxLabel: '* ' + DV.i18n.user_orgunit + '', labelWidth: DV.conf.layout.form_label_width, listeners: { added: function() { @@ -2421,7 +2428,8 @@ cls: 'dv-textfield-alt1', style: 'margin-right:4px', hideTrigger: true, - fieldLabel: DV.i18n.target_line_value, + fieldLabel: '* ' + DV.i18n.target_line_value, + labelStyle: 'color:#555', labelAlign: 'top', labelSeparator: '', maxLength: 100, @@ -2439,7 +2447,7 @@ { xtype: 'textfield', cls: 'dv-textfield-alt1', - fieldLabel: DV.i18n.target_line_label, + fieldLabel: '* ' + DV.i18n.target_line_label, labelAlign: 'top', labelSeparator: '', maxLength: 100, @@ -3131,6 +3139,7 @@ xtype: 'button', cls: 'dv-toolbar-btn-2', text: DV.i18n.data_table, + disabled: true, handler: function() { var p = DV.cmp.region.east; if (p.collapsed && p.items.length) { @@ -3142,6 +3151,11 @@ p.collapse(); DV.cmp.toolbar.resizeeast.hide(); } + }, + listeners: { + added: function() { + DV.cmp.toolbar.datatable = this; + } } }, '->',