=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties 2015-09-10 14:47:36 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties 2015-09-10 20:26:24 +0000 @@ -201,4 +201,4 @@ select_program=Select program completed_only=Completed only events=Events -include_completed_events_only=Include completed events only +include_only_completed_events_only=Include only completed events === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js 2015-09-10 14:47:36 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js 2015-09-10 20:26:24 +0000 @@ -516,6 +516,7 @@ aggregationType, dataApprovalLevel, showHierarchy, + completedOnly, digitGroupSeparator, displayDensity, fontSize, @@ -524,6 +525,8 @@ parentOrganisationUnit, data, + organisationUnits, + events, style, parameters, @@ -630,7 +633,7 @@ }); completedOnly = Ext.create('Ext.form.field.Checkbox', { - boxLabel: NS.i18n.include_completed_events_only, + boxLabel: NS.i18n.include_only_completed_events_only, style: 'margin-bottom:' + checkboxBottomMargin + 'px', }); @@ -1007,6 +1010,7 @@ w.aggregationType = aggregationType; w.dataApprovalLevel = dataApprovalLevel; w.showHierarchy = showHierarchy; + w.completedOnly = completedOnly; w.displayDensity = displayDensity; w.fontSize = fontSize; w.digitGroupSeparator = digitGroupSeparator; === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/i18n_app.properties' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/i18n_app.properties 2015-07-15 15:49:44 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/i18n_app.properties 2015-09-10 20:26:24 +0000 @@ -281,3 +281,6 @@ program_indicators=Program indicators program=Program select_program=Select program +completed_only=Completed only +events=Events +include_only_completed_events_only=Include only completed events === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-09-07 12:21:50 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-09-10 20:26:24 +0000 @@ -628,9 +628,12 @@ hideTitle, title, + completedOnly, + data, axes, general, + events, window, comboBottomMargin = 1, @@ -782,6 +785,26 @@ minValue: 0 }); + rangeAxisTitle = Ext.create('Ext.form.field.Text', { + width: cmpWidth, + fieldLabel: NS.i18n.range_axis_label, + labelStyle: 'color:#333', + labelWidth: 125, + maxLength: 100, + enforceMaxLength: true, + style: 'margin-bottom:1px' + }); + + domainAxisTitle = Ext.create('Ext.form.field.Text', { + width: cmpWidth, + fieldLabel: NS.i18n.domain_axis_label, + labelStyle: 'color:#333', + labelWidth: 125, + maxLength: 100, + enforceMaxLength: true, + style: 'margin-bottom:1px' + }); + // general hideLegend = Ext.create('Ext.form.field.Checkbox', { boxLabel: NS.i18n.hide_legend, @@ -811,24 +834,10 @@ } }); - rangeAxisTitle = Ext.create('Ext.form.field.Text', { - width: cmpWidth, - fieldLabel: NS.i18n.range_axis_label, - labelStyle: 'color:#333', - labelWidth: 125, - maxLength: 100, - enforceMaxLength: true, - style: 'margin-bottom:1px' - }); - - domainAxisTitle = Ext.create('Ext.form.field.Text', { - width: cmpWidth, - fieldLabel: NS.i18n.domain_axis_label, - labelStyle: 'color:#333', - labelWidth: 125, - maxLength: 100, - enforceMaxLength: true, - style: 'margin-bottom:1px' + // events + completedOnly = Ext.create('Ext.form.field.Checkbox', { + boxLabel: NS.i18n.include_only_completed_events_only, + style: 'margin-bottom:' + checkboxBottomMargin + 'px', }); data = { @@ -907,6 +916,14 @@ ] }; + events = { + bodyStyle: 'border:0 none', + style: 'margin-left:14px', + items: [ + completedOnly + ] + }; + window = Ext.create('Ext.window.Window', { title: NS.i18n.chart_options, bodyStyle: 'background-color:#fff; padding:3px', @@ -920,6 +937,7 @@ showValues: showValues.getValue(), hideEmptyRows: hideEmptyRows.getValue(), showTrendLine: showTrendLine.getValue(), + completedOnly: completedOnly.getValue(), targetLineValue: targetLineValue.getValue(), targetLineTitle: targetLineTitle.getValue(), baseLineValue: baseLineValue.getValue(), @@ -942,6 +960,8 @@ hideEmptyRows.setValue(Ext.isBoolean(layout.hideEmptyRows) ? layout.hideEmptyRows : false); showTrendLine.setValue(Ext.isBoolean(layout.showTrendLine) ? layout.showTrendLine : false); + completedOnly.setValue(Ext.isBoolean(layout.completedOnly) ? layout.completedOnly : false); + // target line if (Ext.isNumber(layout.targetLineValue)) { targetLineValue.setValue(layout.targetLineValue); @@ -1047,6 +1067,15 @@ { bodyStyle: 'border:0 none; color:#222; font-size:12px; font-weight:bold', style: 'margin-bottom:6px; margin-left:2px', + html: NS.i18n.events + }, + events, + { + bodyStyle: 'border:0 none; padding:5px' + }, + { + bodyStyle: 'border:0 none; color:#222; font-size:12px; font-weight:bold', + style: 'margin-bottom:6px; margin-left:2px', html: NS.i18n.axes }, axes, @@ -1091,20 +1120,19 @@ w.showValues = showValues; w.hideEmptyRows = hideEmptyRows; w.showTrendLine = showTrendLine; + w.completedOnly = completedOnly; w.targetLineValue = targetLineValue; w.targetLineTitle = targetLineTitle; w.baseLineValue = baseLineValue; w.baseLineTitle = baseLineTitle; w.sortOrder = sortOrder; w.aggregationType = aggregationType; - w.rangeAxisMaxValue = rangeAxisMaxValue; w.rangeAxisMinValue = rangeAxisMinValue; w.rangeAxisSteps = rangeAxisSteps; w.rangeAxisDecimals = rangeAxisDecimals; w.rangeAxisTitle = rangeAxisTitle; w.domainAxisTitle = domainAxisTitle; - w.hideLegend = hideLegend; w.hideTitle = hideTitle; w.title = title; === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js 2015-09-07 12:21:50 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js 2015-09-10 20:26:24 +0000 @@ -875,6 +875,8 @@ // showTrendLine: boolean (false) + // completedOnly: boolean (false) + // targetLineValue: number // targetLineTitle: string @@ -1136,6 +1138,9 @@ layout.showValues = Ext.isBoolean(config.showData) ? config.showData : (Ext.isBoolean(config.showValues) ? config.showValues : true); layout.hideEmptyRows = Ext.isBoolean(config.hideEmptyRows) ? config.hideEmptyRows : (Ext.isBoolean(config.hideEmptyRows) ? config.hideEmptyRows : true); layout.showTrendLine = Ext.isBoolean(config.regression) ? config.regression : (Ext.isBoolean(config.showTrendLine) ? config.showTrendLine : false); + + layout.completedOnly = Ext.isBoolean(config.completedOnly) ? config.completedOnly : false; + layout.targetLineValue = Ext.isNumber(config.targetLineValue) ? config.targetLineValue : null; layout.targetLineTitle = Ext.isString(config.targetLineLabel) && !Ext.isEmpty(config.targetLineLabel) ? config.targetLineLabel : (Ext.isString(config.targetLineTitle) && !Ext.isEmpty(config.targetLineTitle) ? config.targetLineTitle : null); @@ -1928,6 +1933,10 @@ delete layout.showTrendLine; } + if (!layout.completedOnly) { + delete layout.completedOnly; + } + if (!layout.targetLineValue) { delete layout.targetLineValue; } @@ -2376,6 +2385,10 @@ } } + if (xLayout.completedOnly) { + paramString += '&completedOnly=true'; + } + // aggregation type if (Ext.Array.contains(aggTypes, xLayout.aggregationType)) { paramString += '&aggregationType=' + xLayout.aggregationType;