=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/i18n_app.properties' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/i18n_app.properties 2015-09-10 23:33:22 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/i18n_app.properties 2015-09-18 19:32:32 +0000 @@ -210,3 +210,4 @@ excluded_dimensions=Excluded dimensions completed_only=Completed only include_only_completed_events_only=Include only completed events +space=Space === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2015-09-11 20:35:00 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2015-09-18 19:32:32 +0000 @@ -12,6 +12,9 @@ extendCore, createViewport, dimConf, + styleConf, + finalsStyleConf, + finalsDataTypeConf, ns = { core: {}, @@ -1198,12 +1201,12 @@ this.reset(layout.dataType); - if (layout.dataType === 'aggregated_values') { + if (layout.dataType === finalsDataTypeConf.aggregated_values) { this.statusCmp.setText(response.rows.length + ' values'); return; } - if (layout.dataType === 'individual_cases') { + if (layout.dataType === finalsDataTypeConf.individual_cases) { var maxVal = this.pager.page * this.pager.pageSize, from = maxVal - this.pager.pageSize + 1, to = Ext.Array.min([maxVal, this.pager.total]); @@ -1216,7 +1219,7 @@ } }, reset: function(dataType) { - if (!dataType || dataType === 'aggregated_values') { + if (!dataType || dataType === finalsDataTypeConf.aggregated_values) { this.showHideQueryCmps('hide'); this.pageCmp.setValue(1); this.totalPageCmp.setText(''); @@ -1224,7 +1227,7 @@ return; } - if (dataType === 'individual_cases') { + if (dataType === finalsDataTypeConf.individual_cases) { this.showHideQueryCmps('show'); this.pageCmp.setValue(1); this.totalPageCmp.setText(' of 1'); @@ -1475,7 +1478,7 @@ defaultHeight = 220, maxHeight = (ns.app.viewport.getHeight() - 100) / 2, - dataType = 'aggregated_values', + dataType = finalsDataTypeConf.aggregated_values, defaultValueId = 'default'; getStore = function(applyConfig) { @@ -2096,7 +2099,7 @@ defaultHeight = 158, maxHeight = (ns.app.viewport.getHeight() - 100) / 2, - dataType = 'individual_cases'; + dataType = finalsDataTypeConf.individual_cases; getStore = function(data) { var config = {}; @@ -2505,13 +2508,13 @@ queryMode: 'local', valueField: 'id', editable: false, - value: 'normal', + value: finalsStyleConf.normal, store: Ext.create('Ext.data.Store', { fields: ['id', 'text'], data: [ - {id: 'comfortable', text: NS.i18n.comfortable}, - {id: 'normal', text: NS.i18n.normal}, - {id: 'compact', text: NS.i18n.compact} + {id: finalsStyleConf.compact, text: NS.i18n.compact}, + {id: finalsStyleConf.normal, text: NS.i18n.normal}, + {id: finalsStyleConf.comfortable, text: NS.i18n.comfortable} ] }) }); @@ -2526,13 +2529,13 @@ queryMode: 'local', valueField: 'id', editable: false, - value: 'normal', + value: finalsStyleConf.normal, store: Ext.create('Ext.data.Store', { fields: ['id', 'text'], data: [ - {id: 'large', text: NS.i18n.large}, - {id: 'normal', text: NS.i18n.normal}, - {id: 'small', text: NS.i18n.small_} + {id: finalsStyleConf.large, text: NS.i18n.large}, + {id: finalsStyleConf.normal, text: NS.i18n.normal}, + {id: finalsStyleConf.small, text: NS.i18n.small_} ] }) }); @@ -2547,12 +2550,12 @@ queryMode: 'local', valueField: 'id', editable: false, - value: 'space', + value: finalsStyleConf.space, store: Ext.create('Ext.data.Store', { fields: ['id', 'text'], data: [ - {id: 'comma', text: 'Comma'}, - {id: 'space', text: 'Space'}, + {id: finalsStyleConf.comma, text: NS.i18n.comma}, + {id: finalsStyleConf.space, text: NS.i18n.space}, {id: 'none', text: 'None'} ] }) @@ -2637,9 +2640,9 @@ limit.setValues(layout.sortOrder, layout.topLimit); //aggregationType.setValue(Ext.isString(layout.aggregationType) ? layout.aggregationType : 'default'); showHierarchy.setValue(Ext.isBoolean(layout.showHierarchy) ? layout.showHierarchy : false); - displayDensity.setValue(Ext.isString(layout.displayDensity) ? layout.displayDensity : 'normal'); - fontSize.setValue(Ext.isString(layout.fontSize) ? layout.fontSize : 'normal'); - digitGroupSeparator.setValue(Ext.isString(layout.digitGroupSeparator) ? layout.digitGroupSeparator : 'space'); + displayDensity.setValue(Ext.isString(layout.displayDensity) ? layout.displayDensity : finalsStyleConf.normal); + fontSize.setValue(Ext.isString(layout.fontSize) ? layout.fontSize : finalsStyleConf.normal); + digitGroupSeparator.setValue(Ext.isString(layout.digitGroupSeparator) ? layout.digitGroupSeparator : finalsStyleConf.space); //legendSet.setValue(Ext.isObject(layout.legendSet) && Ext.isString(layout.legendSet.id) ? layout.legendSet.id : 0); //reportingPeriod.setValue(Ext.isBoolean(layout.reportingPeriod) ? layout.reportingPeriod : false); //organisationUnit.setValue(Ext.isBoolean(layout.organisationUnit) ? layout.organisationUnit : false); @@ -2765,13 +2768,13 @@ queryMode: 'local', valueField: 'id', editable: false, - value: 'normal', + value: finalsStyleConf.normal, store: Ext.create('Ext.data.Store', { fields: ['id', 'text'], data: [ - {id: 'comfortable', text: NS.i18n.comfortable}, - {id: 'normal', text: NS.i18n.normal}, - {id: 'compact', text: NS.i18n.compact} + {id: finalsStyleConf.compact, text: NS.i18n.compact}, + {id: finalsStyleConf.normal, text: NS.i18n.normal}, + {id: finalsStyleConf.comfortable, text: NS.i18n.comfortable} ] }) }); @@ -2786,13 +2789,13 @@ queryMode: 'local', valueField: 'id', editable: false, - value: 'normal', + value: finalsStyleConf.normal, store: Ext.create('Ext.data.Store', { fields: ['id', 'text'], data: [ - {id: 'large', text: NS.i18n.large}, - {id: 'normal', text: NS.i18n.normal}, - {id: 'small', text: NS.i18n.small_} + {id: finalsStyleConf.large, text: NS.i18n.large}, + {id: finalsStyleConf.normal, text: NS.i18n.normal}, + {id: finalsStyleConf.small, text: NS.i18n.small_} ] }) }); @@ -2807,13 +2810,13 @@ queryMode: 'local', valueField: 'id', editable: false, - value: 'space', + value: finalsStyleConf.space, store: Ext.create('Ext.data.Store', { fields: ['id', 'text'], data: [ - {id: 'comma', text: 'Comma'}, - {id: 'space', text: 'Space'}, - {id: 'none', text: 'None'} + {id: finalsStyleConf.none, text: NS.i18n.none}, + {id: finalsStyleConf.space, text: NS.i18n.space}, + {id: finalsStyleConf.comma, text: NS.i18n.comma} ] }) }); @@ -2846,15 +2849,17 @@ hideOnBlur: true, getOptions: function() { return { - showColTotals: false, - showRowTotals: false, - showSubTotals: false, + showColTotals: true, + showColSubTotals: true, + showRowTotals: false, + showRowSubTotals: false, + showDimensionLabels: true, + showHierarchy: false, hideEmptyRows: false, hideNaData: false, completedOnly: completedOnly.getValue(), sortOrder: 0, topLimit: 0, - showHierarchy: false, displayDensity: displayDensity.getValue(), fontSize: fontSize.getValue(), digitGroupSeparator: digitGroupSeparator.getValue() @@ -2863,9 +2868,9 @@ }, setOptions: function(layout) { completedOnly.setValue(Ext.isBoolean(layout.completedOnly) ? layout.completedOnly : false); - displayDensity.setValue(Ext.isString(layout.displayDensity) ? layout.displayDensity : 'normal'); - fontSize.setValue(Ext.isString(layout.fontSize) ? layout.fontSize : 'normal'); - digitGroupSeparator.setValue(Ext.isString(layout.digitGroupSeparator) ? layout.digitGroupSeparator : 'space'); + displayDensity.setValue(Ext.isString(layout.displayDensity) ? layout.displayDensity : finalsStyleConf.normal); + fontSize.setValue(Ext.isString(layout.fontSize) ? layout.fontSize : finalsStyleConf.normal); + digitGroupSeparator.setValue(Ext.isString(layout.digitGroupSeparator) ? layout.digitGroupSeparator : finalsStyleConf.space); }, items: [ { @@ -4171,12 +4176,15 @@ isOugc = false, levels = [], groups = [], - - winMap = { - 'aggregated_values': ns.app.aggregateOptionsWindow, - 'individual_cases': ns.app.queryOptionsWindow - }, - optionsWindow = winMap[layout.dataType]; + winMap = {}, + optionsWindow; + + winMap[finalsDataTypeConf.aggregated_values] = ns.app.aggregateOptionsWindow; + winMap[finalsDataTypeConf.individual_cases] = ns.app.queryOptionsWindow; + + optionsWindow = winMap[layout.dataType]; + + // set layout reset(); @@ -4817,7 +4825,7 @@ } // favorite - if (layout && layout.dataType === 'aggregated_values') { + if (layout && layout.dataType === finalsDataTypeConf.aggregated_values) { aggWindow.reset(true, true); @@ -7095,10 +7103,10 @@ }; } - if (layout.dataType === 'aggregated_values') { + if (layout.dataType === finalsDataTypeConf.aggregated_values) { web.report.createReport(layout, response); } - else if (layout.dataType === 'individual_cases') { + else if (layout.dataType === finalsDataTypeConf.individual_cases) { web.report.getData(layout); } }; @@ -7121,7 +7129,7 @@ return; } - if (view.dataType === 'aggregated_values') { + if (view.dataType === finalsDataTypeConf.aggregated_values) { Ext.applyIf(view, ns.app.aggregateOptionsWindow.getOptions()); Ext.applyIf(view, ns.app.aggregateLayoutWindow.getOptions()); @@ -7134,7 +7142,7 @@ } } - if (view.dataType === 'individual_cases') { + if (view.dataType === finalsDataTypeConf.individual_cases) { Ext.applyIf(view, ns.app.queryOptionsWindow.getOptions()); view.paging = { @@ -7303,7 +7311,7 @@ } }; - map['aggregated_values'] = function() { + map[finalsDataTypeConf.aggregated_values] = function() { var xLayout, xResponse, xColAxis, @@ -7400,7 +7408,7 @@ getXResponse(); }; - map['individual_cases'] = function() { + map[finalsDataTypeConf.individual_cases] = function() { var xResponse, getReport; @@ -7533,7 +7541,7 @@ aggregateButton = Ext.create('Ext.button.Button', { width: 223, - param: 'aggregated_values', + param: finalsDataTypeConf.aggregated_values, text: 'Aggregated values
Show aggregated event report', style: 'margin-right:1px', pressed: true, @@ -7547,7 +7555,7 @@ caseButton = Ext.create('Ext.button.Button', { width: 224, - param: 'individual_cases', + param: finalsDataTypeConf.individual_cases, text: 'Events
Show individual event overview', style: 'margin-right:1px', listeners: { @@ -8175,11 +8183,11 @@ getLayoutWindow = function(dataType) { dataType = dataType || typeToolbar.getType(); - if (dataType === 'aggregated_values') { + if (dataType === finalsDataTypeConf.aggregated_values) { return ns.app.aggregateLayoutWindow; } - if (dataType === 'individual_cases') { + if (dataType === finalsDataTypeConf.individual_cases) { return ns.app.queryLayoutWindow; } @@ -8189,11 +8197,11 @@ getOptionsWindow = function(dataType) { dataType = dataType || typeToolbar.getType(); - if (dataType === 'aggregated_values') { + if (dataType === finalsDataTypeConf.aggregated_values) { return ns.app.aggregateOptionsWindow; } - if (dataType === 'individual_cases') { + if (dataType === finalsDataTypeConf.individual_cases) { return ns.app.queryOptionsWindow; } @@ -8304,6 +8312,10 @@ extendCore(ns.core); dimConf = ns.core.conf.finals.dimension; + finalsStyleConf = ns.core.conf.finals.style; + styleConf = ns.core.conf.style; + finalsDataTypeConf = ns.core.conf.finals.dataType; + ns.app.viewport = createViewport(); ns.core.app.getViewportWidth = function() { return ns.app.viewport.getWidth(); }; === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js 2015-09-11 20:48:21 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js 2015-09-18 19:32:32 +0000 @@ -115,7 +115,26 @@ }, root: { id: 'root' - } + }, + style: { + 'normal': 'NORMAL', + 'compact': 'COMPACT', + 'xcompact': 'XCOMPACT', + 'comfortable': 'COMFORTABLE', + 'xcomfortable': 'XCOMFORTABLE', + 'small': 'SMALL', + 'xsmall': 'XSMALL', + 'large': 'LARGE', + 'xlarge': 'XLARGE', + 'space': 'SPACE', + 'comma': 'COMMA', + 'none': 'NONE', + 'default_': 'DEFAULT' + }, + dataType: { + 'aggregated_values': 'AGGREGATED_VALUES', + 'individual_cases': 'EVENTS' + } }; dimConf = conf.finals.dimension; @@ -174,6 +193,14 @@ ] }; + conf.valueType = { + numericTypes: ['NUMBER','UNIT_INTERVAL','PERCENTAGE','INTEGER','INTEGER_POSITIVE','INTEGER_NEGATIVE','INTEGER_ZERO_OR_POSITIVE'], + textTypes: ['TEXT','LONG_TEXT','LETTER','PHONE_NUMBER','EMAIL'], + booleanTypes: ['BOOLEAN','TRUE_ONLY'], + dateTypes: ['DATE','DATETIME'], + aggregateTypes: ['NUMBER','UNIT_INTERVAL','PERCENTAGE','INTEGER','INTEGER_POSITIVE','INTEGER_NEGATIVE','INTEGER_ZERO_OR_POSITIVE','BOOLEAN','TRUE_ONLY'] + }; + // aggregation type conf.aggregationType = { data: [ @@ -237,23 +264,34 @@ multiselect_fill_reportingrates: 315 }; - // report - conf.report = { - digitGroupSeparator: { - 'comma': ',', - 'space': ' ' - }, - displayDensity: { - 'compact': '3px', - 'normal': '5px', - 'comfortable': '10px', - }, - fontSize: { - 'small': '10px', - 'normal': '11px', - 'large': '13px' - } - }; + conf.style = { + displayDensity: {}, + fontSize: {}, + digitGroupSeparator: {} + }; + + (function() { + var map = conf.finals.style, + displayDensity = conf.style.displayDensity, + fontSize = conf.style.fontSize, + digitGroupSeparator = conf.style.digitGroupSeparator; + + displayDensity[map.xcompact] = '2px'; + displayDensity[map.compact] = '4px'; + displayDensity[map.normal] = '6px'; + displayDensity[map.comfortable] = '8px'; + displayDensity[map.xcomfortable] = '10px'; + + fontSize[map.xsmall] = '9px'; + fontSize[map.small] = '10px'; + fontSize[map.normal] = '11px'; + fontSize[map.large] = '12px'; + fontSize[map.xlarge] = '14px'; + + digitGroupSeparator[map.space] = ' '; + digitGroupSeparator[map.comma] = ','; + digitGroupSeparator[map.none] = ''; + })(); // url conf.url = { @@ -397,11 +435,11 @@ // showHierarchy: boolean (false) - // displayDensity: string ('normal') - 'compact', 'normal', 'comfortable' - - // fontSize: string ('normal') - 'small', 'normal', 'large' - - // digitGroupSeparator: string ('space') - 'none', 'comma', 'space' + // displayDensity: string ('NORMAL') - 'COMPACT', 'NORMAL', 'COMFORTABLE' + + // fontSize: string ('NORMAL') - 'SMALL', 'NORMAL', 'LARGE' + + // digitGroupSeparator: string ('SPACE') - 'NONE', 'COMMA', 'SPACE' // legendSet: object @@ -553,7 +591,7 @@ layout.rows = config.rows; layout.filters = config.filters; - layout.dataType = Ext.isString(config.dataType) ? config.dataType : 'aggregated_values'; + layout.dataType = Ext.isString(config.dataType) ? config.dataType : conf.finals.dataType.aggregated_values; layout.program = config.program; layout.programStage = config.programStage; @@ -578,9 +616,9 @@ layout.completedOnly = Ext.isBoolean(config.completedOnly) ? config.completedOnly : false; layout.showHierarchy = Ext.isBoolean(config.showHierarchy) ? config.showHierarchy : false; - layout.displayDensity = Ext.isString(config.displayDensity) && !Ext.isEmpty(config.displayDensity) ? config.displayDensity : 'normal'; - layout.fontSize = Ext.isString(config.fontSize) && !Ext.isEmpty(config.fontSize) ? config.fontSize : 'normal'; - layout.digitGroupSeparator = Ext.isString(config.digitGroupSeparator) && !Ext.isEmpty(config.digitGroupSeparator) ? config.digitGroupSeparator : 'space'; + layout.displayDensity = Ext.isString(config.displayDensity) && !Ext.isEmpty(config.displayDensity) ? config.displayDensity : conf.finals.style.normal; + layout.fontSize = Ext.isString(config.fontSize) && !Ext.isEmpty(config.fontSize) ? config.fontSize : conf.finals.style.normal; + layout.digitGroupSeparator = Ext.isString(config.digitGroupSeparator) && !Ext.isEmpty(config.digitGroupSeparator) ? config.digitGroupSeparator : conf.finals.style.space; layout.legendSet = Ext.isObject(config.legendSet) && Ext.isString(config.legendSet.id) ? config.legendSet : null; // value @@ -977,13 +1015,13 @@ }; support.prototype.number.prettyPrint = function(number, separator) { - separator = separator || 'space'; + separator = separator || conf.finals.style.space; - if (separator === 'none') { + if (separator === conf.finals.style.none) { return number; } - return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, conf.report.digitGroupSeparator[separator]); + return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, conf.style.digitGroupSeparator[separator]); }; // date @@ -1935,15 +1973,15 @@ delete layout.showHierarchy; } - if (layout.displayDensity === 'normal') { + if (layout.displayDensity === conf.finals.style.normal) { delete layout.displayDensity; } - if (layout.fontSize === 'normal') { + if (layout.fontSize === conf.finals.style.normal) { delete layout.fontSize; } - if (layout.digitGroupSeparator === 'space') { + if (layout.digitGroupSeparator === conf.finals.style.space) { delete layout.digitGroupSeparator; } @@ -2323,7 +2361,7 @@ web.window = web.window || {}; web.window.setAnchorPosition = function(w, target) { - var vpw = ns.app.viewport.getWidth(), + var vpw = app.getViewportWidth(), targetx = target ? target.getPosition()[0] : 4, winw = w.getWidth(), y = target ? target.getPosition()[1] + target.getHeight() + 4 : 33; @@ -2410,7 +2448,7 @@ config.html += obj.message + (obj.message.substr(obj.message.length - 1) === '.' ? '' : '.'); // bodyStyle - config.bodyStyle = 'padding: 12px; background: #fff; max-width: 600px; max-height: ' + ns.app.centerRegion.getHeight() / 2 + 'px'; + config.bodyStyle = 'padding: 12px; background: #fff; max-width: 600px; max-height: ' + app.getCenterRegionHeight() / 2 + 'px'; // destroy handler config.modal = true; @@ -2439,12 +2477,12 @@ var paramString, dimensions = Ext.Array.clean([].concat(view.columns || [], view.rows || [])), ignoreKeys = ['dy', 'longitude', 'latitude'], - dataTypeMap = { - 'aggregated_values': 'aggregate', - 'individual_cases': 'query' - }, + dataTypeMap = {}, nameItemsMap; + dataTypeMap[conf.finals.dataType.aggregated_values] = 'aggregate'; + dataTypeMap[conf.finals.dataType.individual_cases] = 'query'; + format = format || 'json'; paramString = '/api/analytics/events/' + dataTypeMap[view.dataType] + '/' + view.program.id + '.' + format + '?'; @@ -2457,7 +2495,7 @@ for (var i = 0, dim; i < dimensions.length; i++) { dim = dimensions[i]; - if (Ext.Array.contains(ignoreKeys, dim.dimension) || (dim.dimension === 'pe' && !dim.items && !dim.filter)) { + if (Ext.Array.contains(ignoreKeys, dim.dimension) || (dim.dimension === 'pe' && (!(dim.items && dim.items.length) && !dim.filter))) { continue; } @@ -2535,12 +2573,12 @@ paramString += view.showHierarchy ? '&hierarchyMeta=true' : ''; // limit - if (view.dataType === 'aggregated_values' && (view.sortOrder && view.topLimit)) { + if (view.dataType === conf.finals.dataType.aggregated_values && (view.sortOrder && view.topLimit)) { paramString += '&limit=' + view.topLimit + '&sortOrder=' + (view.sortOrder < 0 ? 'ASC' : 'DESC'); } // output type - if (view.dataType === 'aggregated_values' && view.outputType) { + if (view.dataType === conf.finals.dataType.aggregated_values && view.outputType) { paramString += '&outputType=' + view.outputType; } @@ -2550,14 +2588,14 @@ } // sorting - if (view.dataType === 'individual_cases' && view.sorting) { + if (view.dataType === conf.finals.dataType.individual_cases && view.sorting) { if (view.sorting.id && view.sorting.direction) { paramString += '&' + view.sorting.direction.toLowerCase() + '=' + view.sorting.id; } } // paging - if (view.dataType === 'individual_cases' && view.paging && !skipPaging) { + if (view.dataType === conf.finals.dataType.individual_cases && view.paging && !skipPaging) { paramString += view.paging.pageSize ? '&pageSize=' + view.paging.pageSize : ''; paramString += view.paging.page ? '&page=' + view.paging.page : ''; } @@ -3439,8 +3477,8 @@ var cls = 'pivot', table; - cls += xLayout.displayDensity && xLayout.displayDensity !== 'normal' ? ' displaydensity-' + xLayout.displayDensity : ''; - cls += xLayout.fontSize && xLayout.fontSize !== 'normal' ? ' fontsize-' + xLayout.fontSize : ''; + cls += xLayout.displayDensity && xLayout.displayDensity !== conf.finals.style.normal ? ' displaydensity-' + xLayout.displayDensity : ''; + cls += xLayout.fontSize && xLayout.fontSize !== conf.finals.style.normal ? ' fontsize-' + xLayout.fontSize : ''; table = ''; @@ -3509,8 +3547,8 @@ xResponse.sortableIdObjects = []; - cls += layout.displayDensity && layout.displayDensity !== 'normal' ? ' displaydensity-' + layout.displayDensity : ''; - cls += layout.fontSize && layout.fontSize !== 'normal' ? ' fontsize-' + layout.fontSize : ''; + cls += layout.displayDensity && layout.displayDensity !== conf.finals.style.none ? ' displaydensity-' + layout.displayDensity : ''; + cls += layout.fontSize && layout.fontSize !== conf.finals.style.normal ? ' fontsize-' + layout.fontSize : ''; html += '
'; html += ''; === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/eventreport.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/eventreport.js 2015-09-11 20:48:21 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/eventreport.js 2015-09-18 19:32:32 +0000 @@ -2470,12 +2470,15 @@ var paramString, dimensions = Ext.Array.clean([].concat(view.columns || [], view.rows || [])), ignoreKeys = ['dy', 'longitude', 'latitude'], - dataTypeMap = { + dataTypeMap = {}, 'aggregated_values': 'aggregate', 'individual_cases': 'query' }, nameItemsMap; + dataTypeMap[conf.finals.dataType.aggregated_values] = 'aggregate'; + dataTypeMap[conf.finals.dataType.individual_cases] = 'query'; + format = format || 'json'; paramString = '/api/analytics/events/' + dataTypeMap[view.dataType] + '/' + view.program.id + '.' + format + '?'; @@ -4099,6 +4102,7 @@ config.failure = failure; ns.ajax(config, ns); + }; web.report.getData = function(layout, isUpdateGui) {
' + '#' + '