dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20733
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9619: Add ad-hoc aggregated reports in Tabular reports (WIP).
------------------------------------------------------------
revno: 9619
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-01-27 20:20:53 +0700
message:
Add ad-hoc aggregated reports in Tabular reports (WIP).
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-01-26 07:07:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-01-27 13:20:53 +0000
@@ -1007,6 +1007,7 @@
Ext.getCmp('programCombobox').setValue( f.programId );
Ext.getCmp('programStageCombobox').setValue( f.programStageId );
+ Ext.getCmp('programStageCombobox').setRawValue( f.programStageName );
Ext.getCmp('startDate').setValue( f.startDate );
Ext.getCmp('endDate').setValue( f.endDate );
Ext.getCmp('facilityLBCombobox').setValue( f.facilityLB );
@@ -1135,6 +1136,7 @@
Ext.getCmp('programCombobox').setValue( f.programId );
Ext.getCmp('programStageCombobox').setValue( f.programStageId );
+ Ext.getCmp('programStageCombobox').setRawValue( f.programStageName );
Ext.getCmp('userOrgunit').setValue( f.userOrganisationUnit );
Ext.getCmp('userOrgunitChildren').setValue( f.userOrganisationUnitChildren );
@@ -2150,6 +2152,7 @@
}
}
+ var isValid = true;
TR.cmp.params.dataelement.selected.store.each( function(r) {
var deId = r.data.id;
var length = Ext.getCmp('p_' + deId).items.length/4;
@@ -2157,12 +2160,15 @@
{
var id = deId + '_' + idx;
var filterValue = Ext.getCmp('filter_' + id).getValue();
- if( filterValue == null ){
- TR.util.notification.error(TR.i18n.fill_filter_values_for_all_selected_data_elements, TR.i18n.fill_filter_values_for_all_selected_data_elements);
- return false;
+ if( filterValue == null || filterValue == '' ){
+ isValid = false;
}
}
});
+ if( !isValid){
+ TR.util.notification.error(TR.i18n.fill_filter_values_for_all_selected_data_elements, TR.i18n.fill_filter_values_for_all_selected_data_elements);
+ return false;
+ }
var periodInt = 0;
if( TR.cmp.settings.startDate.rawValue!=""
@@ -2726,6 +2732,7 @@
boxLabel: TR.i18n.case_based_report,
name: 'reportType',
inputValue: 'true',
+ checked: true,
listeners: {
change: function (cb, nv, ov) {
if(nv)
@@ -2755,7 +2762,6 @@
boxLabel: TR.i18n.aggregated_report,
name: 'reportType',
inputValue: 'false',
- checked: true,
listeners: {
change: function (cb, nv, ov) {
if(nv)
@@ -5465,6 +5471,25 @@
listeners: {
afterrender: function(vp) {
TR.init.initialize(vp);
+ Ext.getCmp('reportTypeGroup').setValue(true);
+ Ext.getCmp('limitOption').setVisible(false);
+ dataElementTabTitle.innerHTML = TR.i18n.data_elements;
+ Ext.getCmp('limitOption').setVisible(false);
+ Ext.getCmp('dataElementGroupByCbx').setVisible(false);
+ Ext.getCmp('aggregateType').setVisible(false);
+ Ext.getCmp('downloadPdfIcon').setVisible(false);
+ Ext.getCmp('downloadCvsIcon').setVisible(false);
+ Ext.getCmp('positionField').setVisible(false);
+ Ext.getCmp('completedEventsOpt').setVisible(false);
+ Ext.getCmp('aggregateFavoriteBtn').setVisible(false);
+ Ext.getCmp('datePeriodRangeDiv').setVisible(false);
+ Ext.getCmp('caseBasedFavoriteBtn').setVisible(true);
+ Ext.getCmp('levelCombobox').setVisible(true);
+
+ Ext.getCmp('dateRangeDiv').setVisible(true);
+ Ext.getCmp('relativePeriodsDiv').setVisible(false);
+ Ext.getCmp('fixedPeriodsDiv').setVisible(false);
+ Ext.getCmp('dateRangeDiv').expand();
},
resize: function(vp) {
TR.cmp.region.west.setWidth(TR.conf.layout.west_width);
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm 2013-01-23 10:27:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm 2013-01-27 13:20:53 +0000
@@ -11,7 +11,7 @@
#end
"type": "${programStage.program.type}",
"programStageId": "${programStage.id}",
- "programStageName": "${programStage.displayName}",
+ "programStageName": "$!encoder.jsonEncode( ${programStage.displayName} )",
"startDate": "$!format.formatDate( $tabularReport.startDate )",
"endDate": "$!format.formatDate( ${tabularReport.endDate} )",
"level": "${tabularReport.level}",