dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15399
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5575: Reverted r 5569. This will not work off-line
------------------------------------------------------------
revno: 5575
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-12-23 11:52:08 +0100
message:
Reverted r 5569. This will not work off-line
modified:
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/select.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java
--
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 2011-12-23 07:49:09 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-12-23 10:52:08 +0000
@@ -495,7 +495,6 @@
if ( periodId && periodId != -1 && dataEntryFormIsLoaded )
{
- disableFields( false );
showLoader();
loadDataValues();
}
@@ -628,26 +627,6 @@
displayEntryFormCompleted();
}
-function disableFields( disabled )
-{
- if( disabled )
- {
- jQuery("#contentDiv :input").each(function()
- {
- jQuery(this).attr('disabled', 'disabled');
- jQuery(this).css( 'background-color', COLOR_GREY );
- });
- }
- else
- {
- jQuery("#contentDiv :input").each(function()
- {
- jQuery(this).removeAttr('disabled');
- jQuery(this).css( 'background-color', COLOR_WHITE );
- });
- }
-}
-
function insertDataValues()
{
var dataValueMap = [];
@@ -667,7 +646,7 @@
$( '[name="min"]' ).html( '' );
$( '[name="max"]' ).html( '' );
- //$( '[name="entryfield"]' ).filter( ':disabled' ).css( 'background-color', COLOR_GREY );
+ $( '[name="entryfield"]' ).filter( ':disabled' ).css( 'background-color', COLOR_GREY );
$.ajax( {
url: 'getDataValues.action',
@@ -734,14 +713,6 @@
$( '#completedBy' ).html( json.storedBy );
$( '#completedDate' ).html( json.date );
}
- if( getFieldValue('dataEntryFormCompleted') =='true' )
- {
- disableFields ( true )
- }
- else
- {
- disableFields( false );
- }
}
else
{
@@ -887,18 +858,9 @@
{
storageManager.clearCompleteDataSet( params );
- if( json.response == 'success' && getFieldValue('dataEntryFormCompleted') =='true' )
- {
- disableFields( true );
- }
- else if ( json.response == 'input' )
+ if ( json.response == 'input' )
{
- if( getFieldValue('dataEntryFormCompleted') =='true' )
- {
- disableFields( true );
- }
-
- validate( false );
+ validate();
}
}
} );
@@ -920,12 +882,10 @@
success: function()
{
storageManager.clearCompleteDataSet( params );
- disableFields( false );
},
error: function()
{
storageManager.clearCompleteDataSet( params );
- disableFields( false );
}
} );
}
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm 2011-12-23 07:49:09 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm 2011-12-23 10:52:08 +0000
@@ -34,7 +34,6 @@
</script>
<h3>$i18n.getString( "data_entry" ) #openHelp( "dataEntry" )</h3>
-<input type='hidden' id='dataEntryFormCompleted' name='dataEntryFormCompleted' value='$dataEntryFormCompleted'>
<div id="currentSelection">
<span style="float:left;cursor:pointer;margin-right:5px;"><img src="../images/hide.png" title="$i18n.getString( 'close' )" onclick="closeCurrentSelection()"></span>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java 2011-12-23 07:49:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java 2011-12-23 10:52:08 +0000
@@ -239,6 +239,7 @@
{
description = null;
}
+
if ( formName != null && formName.trim().length() == 0 )
{
formName = null;
@@ -298,7 +299,7 @@
dataElementService.updateDataElementGroup( newGroup );
}
}
-
+
if ( jsonAttributeValues != null )
{
AttributeUtils.updateAttributeValuesFromJson( dataElement.getAttributeValues(), jsonAttributeValues,
@@ -306,7 +307,7 @@
}
dataElementService.updateDataElement( dataElement );
-
+
return SUCCESS;
}
}