dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33102
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16860: Data entry, js namespace
------------------------------------------------------------
revno: 16860
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-09-29 19:50:45 +0200
message:
Data entry, js namespace
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js
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/entry.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2014-09-19 17:13:55 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2014-09-29 17:50:45 +0000
@@ -323,7 +323,7 @@
*/
function ValueSaver( de, pe, co, value, fieldId, resultColor )
{
- var ou = getCurrentOrganisationUnit();
+ var ou = dhis2.de.getCurrentOrganisationUnit();
var dataValue = {
'de' : de,
=== 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-26 06:56:04 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2014-09-29 17:50:45 +0000
@@ -126,7 +126,7 @@
var DAO = DAO || {};
-function getCurrentOrganisationUnit()
+dhis2.de.getCurrentOrganisationUnit = function()
{
if ( $.isArray( dhis2.de.currentOrganisationUnitId ) )
{
@@ -172,7 +172,7 @@
$( '#orgUnitTree' ).one( 'ouwtLoaded', function()
{
console.log( 'Ouwt loaded' );
- loadMetaData();
+ dhis2.de.loadMetaData();
} );
$( document ).bind( 'dhis2.online', function( event, loggedIn )
@@ -211,7 +211,7 @@
].join('');
setHeaderMessage( form );
- ajax_login();
+ dhis2.de.ajaxLogin();
}
} );
@@ -228,7 +228,7 @@
dhis2.availability.startAvailabilityCheck();
} );
-function ajax_login()
+dhis2.de.ajaxLogin = function()
{
$( '#login_button' ).bind( 'click', function()
{
@@ -250,7 +250,7 @@
} );
}
-function loadMetaData()
+dhis2.de.loadMetaData = function()
{
var KEY_METADATA = 'metadata';
@@ -627,7 +627,7 @@
$( '#contentDiv' ).load( 'loadForm.action',
{
dataSetId : dataSetId,
- multiOrganisationUnit: dhis2.de.multiOrganisationUnit ? getCurrentOrganisationUnit() : ''
+ multiOrganisationUnit: dhis2.de.multiOrganisationUnit ? dhis2.de.getCurrentOrganisationUnit() : ''
},
function()
{
@@ -744,7 +744,7 @@
}
else
{
- split.organisationUnitId = getCurrentOrganisationUnit();
+ split.organisationUnitId = dhis2.de.getCurrentOrganisationUnit();
split.dataElementId = id.split( '-' )[0];
split.optionComboId = id.split( '-' )[1];
}
@@ -889,7 +889,7 @@
*/
function getSortedDataSetList( orgUnit )
{
- var associationSet = orgUnit !== undefined ? dhis2.de.organisationUnitAssociationSetMap[orgUnit] : dhis2.de.organisationUnitAssociationSetMap[getCurrentOrganisationUnit()];
+ var associationSet = orgUnit !== undefined ? dhis2.de.organisationUnitAssociationSetMap[orgUnit] : dhis2.de.organisationUnitAssociationSetMap[dhis2.de.getCurrentOrganisationUnit()];
var orgUnitDataSets = dhis2.de.dataSetAssociationSets[associationSet];
var dataSetList = [];
@@ -1355,7 +1355,7 @@
var params = {
periodId : periodId,
dataSetId : dataSetId,
- organisationUnitId : getCurrentOrganisationUnit(),
+ organisationUnitId : dhis2.de.getCurrentOrganisationUnit(),
multiOrganisationUnit: dhis2.de.multiOrganisationUnit
};
@@ -1562,7 +1562,7 @@
var dataElementName = getDataElementName( dataElementId );
var optionComboName = getOptionComboName( optionComboId );
- var organisationUnitName = organisationUnits[getCurrentOrganisationUnit()].n;
+ var organisationUnitName = organisationUnits[dhis2.de.getCurrentOrganisationUnit()].n;
$( '#currentOrganisationUnit' ).html( organisationUnitName );
$( '#currentDataElement' ).html( dataElementName + ' ' + optionComboName );
@@ -1953,7 +1953,7 @@
dataElementId : dataElementId,
optionComboId : optionComboId,
periodId : periodId,
- organisationUnitId : getCurrentOrganisationUnit()
+ organisationUnitId : dhis2.de.getCurrentOrganisationUnit()
};
var cc = dhis2.de.getCurrentCategoryCombo();
@@ -2475,7 +2475,7 @@
var params = {
'ds': $( '#selectedDataSetId' ).val(),
'pe': $( '#selectedPeriodId').val(),
- 'ou': getCurrentOrganisationUnit(),
+ 'ou': dhis2.de.getCurrentOrganisationUnit(),
'multiOu': dhis2.de.multiOrganisationUnit
};