dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32587
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16620: Data entry, fixed issue, period selection was not populated when switching between org units whic...
------------------------------------------------------------
revno: 16620
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-09-02 16:33:43 -0400
message:
Data entry, fixed issue, period selection was not populated when switching between org units which have org units and org units which do not have org units
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.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-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2014-09-02 20:08:51 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2014-09-02 20:33:43 +0000
@@ -112,7 +112,7 @@
*/
dhis2.de.on = function( event, fn )
{
- $( document ).off( event ).on( event, fn );
+ $( document ).off( event ).on( event, fn );
}
var EVENT_FORM_LOADED = "dhis-web-dataentry-form-loaded"; // Deprecated
@@ -828,14 +828,14 @@
multiDataSetValid = true;
}
- $( '<option />' ).attr( 'data-multiorg', true ).attr( 'value', item.id).html(item.name).appendTo( '#selectedDataSetId' );
+ $( '<option />' ).attr( 'data-multiorg', true ).attr( 'value', item.id).html( item.name ).appendTo( '#selectedDataSetId' );
} );
$( '#selectDataSetId' ).append( '</optgroup>' );
}
}
- if ( !dhis2.de.multiOrganisationUnit && dataSetValid && dataSetId != null ) {
+ if ( !dhis2.de.multiOrganisationUnit && dataSetValid && dataSetId ) {
$( '#selectedDataSetId' ).val( dataSetId ); // Restore selected data set
if ( dhis2.de.inputSelected() && dhis2.de.dataEntryFormIsLoaded ) {
@@ -844,12 +844,13 @@
loadDataValues();
}
}
- else if ( dhis2.de.multiOrganisationUnit && multiDataSetValid && dataSetId != null ) {
+ else if ( dhis2.de.multiOrganisationUnit && multiDataSetValid && dataSetId ) {
$( '#selectedDataSetId' ).val( dataSetId ); // Restore selected data set
dataSetSelected();
}
else {
dhis2.de.multiOrganisationUnit = false;
+ dhis2.de.currentDataSetId = null;
clearSectionFilters();
clearPeriod();