dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21082
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9885: (Tabular report) Add validation for data element. At least one data element selected for case-bas...
------------------------------------------------------------
revno: 9885
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-02-25 10:05:26 +0700
message:
(Tabular report) Add validation for data element. At least one data element selected for case-based report.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
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/cacheManifest.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js
--
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/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-02-22 14:58:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-02-25 03:05:26 +0000
@@ -299,6 +299,7 @@
et_no_dataelement = Please select at least one data element
em_no_orgunits = Please select an organisation unit
em_no_program_stage = Please select a program stage
+em_no_data_element = Please select a data element
reset = Reset
no = No
options = Options
=== 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-02-25 02:46:26 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-02-25 03:05:26 +0000
@@ -1017,6 +1017,10 @@
}
// Data element
+
+ Ext.getCmp('filterPanel').removeAll();
+ Ext.getCmp('filterPanel').doLayout();
+
TR.cmp.params.dataelement.objects = [];
TR.store.dataelement.selected.removeAll();
if (f.dataElements) {
@@ -1789,6 +1793,11 @@
return false;
}
+ if(TR.cmp.params.dataelement.selected.store.data.items.length == 0 )
+ {
+ TR.util.notification.error(TR.i18n.em_no_data_element, TR.i18n.em_no_data_element);
+ return false;
+ }
return true;
},
response: function(r) {
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm 2013-02-22 04:49:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm 2013-02-25 03:05:26 +0000
@@ -26,7 +26,6 @@
../dhis-web-commons/javascripts/dhis2/dhis2.comparator.js
../dhis-web-commons/javascripts/dhis2/dhis2.availability.js
../dhis-web-commons/javascripts/dhis2/dhis2.storage.js
-../dhis-web-commons/javascripts/dhis2/dhis2.storage.dom-ss.js
../dhis-web-commons/javascripts/dhis2/dhis2.storage.dom.js
../dhis-web-commons/javascripts/dhis2/dhis2.storage.idb.js
../dhis-web-commons/javascripts/jQuery/jquery.cookie.js
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm 2013-02-19 04:31:40 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm 2013-02-25 03:05:26 +0000
@@ -7,6 +7,7 @@
start_date:'$encoder.jsEscape($i18n.getString( 'start_date' ) , "'")',
end_date:'$encoder.jsEscape($i18n.getString( 'end_date' ) , "'")',
et_no_program:'$encoder.jsEscape($i18n.getString( 'et_no_program' ) , "'")',
+em_no_data_element:'$encoder.jsEscape($i18n.getString( 'em_no_data_element' ) , "'")',
data_elements:'$encoder.jsEscape($i18n.getString( 'data_elements' ) , "'")',
program_stage:'$encoder.jsEscape($i18n.getString( 'program_stage' ) , "'")',
please_select:'[' + '$encoder.jsEscape($i18n.getString( 'please_select' ) , "'")' + ']',
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-02-22 04:49:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-02-25 03:05:26 +0000
@@ -7,25 +7,25 @@
} );
// initialize the stores, and then try and add the data
- DAO.programs = new dhis2.storage.Store( {name: 'programs', adapter: 'dom-ss' }, function ( store ) {
- DAO.programAssociations = new dhis2.storage.Store( {name: 'programAssociations', adapter: 'dom-ss' }, function ( store ) {
- jQuery.getJSON( "getProgramMetaData.action", {},function ( data ) {
- var keys = _.keys( data.metaData.programs );
- var objs = _.values( data.metaData.programs );
-
- DAO.programs.addAll( keys, objs, function ( store ) {
- var keys = _.keys( data.metaData.programAssociations );
- var objs = _.values( data.metaData.programAssociations );
-
- DAO.programAssociations.addAll( keys, objs, function ( store ) {
- selection.setListenerFunction( organisationUnitSelected );
+ DAO.programs = new dhis2.storage.Store( {name: 'programs'}, function ( store ) {
+ DAO.programAssociations = new dhis2.storage.Store( {name: 'programAssociations'}, function ( store ) {
+ jQuery.getJSON( "getProgramMetaData.action", {}, function ( data ) {
+ var keys = _.keys( data.metaData.programs );
+ var objs = _.values( data.metaData.programs );
+
+ DAO.programs.addAll( keys, objs, function ( store ) {
+ var keys = _.keys( data.metaData.programAssociations );
+ var objs = _.values( data.metaData.programAssociations );
+
+ DAO.programAssociations.addAll( keys, objs, function ( store ) {
+ selection.setListenerFunction( organisationUnitSelected );
+ } );
} );
- } );
- } ).fail( function () {
+ } ).fail(function() {
selection.setListenerFunction( organisationUnitSelected );
- } );
- } );
- } );
+ });
+ });
+ });
} );
function organisationUnitSelected( orgUnits, orgUnitNames )