dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20878
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9732: Data entry, fixed bug with saving of comments
------------------------------------------------------------
revno: 9732
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-02-05 15:30:47 +0200
message:
Data entry, fixed bug with saving of comments
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/HistoryAction.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveCommentAction.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/history.vm
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.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-dataentry/src/main/java/org/hisp/dhis/de/action/HistoryAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/HistoryAction.java 2013-02-05 12:34:09 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/HistoryAction.java 2013-02-05 13:30:47 +0000
@@ -115,6 +115,11 @@
private String dataElementId;
+ public String getDataElementId()
+ {
+ return dataElementId;
+ }
+
public void setDataElementId( String dataElementId )
{
this.dataElementId = dataElementId;
@@ -122,6 +127,11 @@
private String optionComboId;
+ public String getOptionComboId()
+ {
+ return optionComboId;
+ }
+
public void setOptionComboId( String optionComboId )
{
this.optionComboId = optionComboId;
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveCommentAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveCommentAction.java 2012-02-16 19:58:55 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveCommentAction.java 2013-02-05 13:30:47 +0000
@@ -105,16 +105,18 @@
this.commentValue = commentValue;
}
- private int dataElementId;
+ private String dataElementId;
- public void setDataElementId( int dataElementId )
+ public void setDataElementId( String dataElementId )
{
this.dataElementId = dataElementId;
}
- public int getDataElementId()
+ private String optionComboId;
+
+ public void setOptionComboId( String optionComboId )
{
- return dataElementId;
+ this.optionComboId = optionComboId;
}
private int organisationUnitId;
@@ -124,13 +126,6 @@
this.organisationUnitId = organisationUnitId;
}
- private Integer optionComboId;
-
- public void setOptionComboId( Integer optionComboId )
- {
- this.optionComboId = optionComboId;
- }
-
private int statusCode;
public int getStatusCode()
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm 2013-02-05 12:34:09 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm 2013-02-05 13:30:47 +0000
@@ -41,7 +41,7 @@
#set( $dataEntryId = "${dataElement.uid}-${optionCombo.uid}-val" )
#set( $commentId = "${dataElement.uid}-${optionCombo.uid}-comment" )
#if( $dataElement.type == "bool" )
- <td><select name="entryselect" id="$dataEntryId"#if( !$hasAccess ) disabled="disabled"#end tabindex="$tabIndex">
+ <td><select name="entryselect" id="${dataEntryId}"#if( !$hasAccess ) disabled="disabled"#end tabindex="${tabIndex}">
<option value="">[$i18n.getString( "no_value" )]</option>
<option value="true">$i18n.getString( "yes" )</option>
<option value="false">$i18n.getString( "no" )</option>
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/history.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/history.vm 2012-11-14 12:20:31 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/history.vm 2013-02-05 13:30:47 +0000
@@ -1,8 +1,6 @@
<script type="text/javascript">
-#if( $dataElementHistory )
-var currentDataElementId = $!{dataElementHistory.dataElement.id};
-var currentOptionComboId = $!{dataElementHistory.optionCombo.id};
-#end
+var currentDataElementId = '$!{dataElementId}';
+var currentOptionComboId = '$!{optionComboId}';
</script>
#set( $width = 40 * $dataElementHistory.historyLength )
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2013-02-05 12:34:09 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2013-02-05 13:30:47 +0000
@@ -59,7 +59,7 @@
#set( $dataEntryId = "${dataElement.uid}-${optionCombo.uid}-val" )
#set( $commentId = "${dataElement.uid}-${optionCombo.uid}-comment" )
#set( $greyedField = false )
- #set( $greyedField = $greyedFields.get( "$dataElement.uid:$optionCombo.uid" ) )
+ #set( $greyedField = $greyedFields.get( "${dataElement.uid}:${optionCombo.uid}" ) )
#if( $dataElement.type == "bool" )
<td><select name="entryselect" id="$dataEntryId" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end>
<option value="">[$i18n.getString( "no_value" )]</option>
@@ -67,7 +67,7 @@
<option value="false">$i18n.getString( "no" )</option>
</select><img name="commentlink" id="${commentId}"></td>
#else
- <td><input name="entryfield" id="${dataEntryId}" type="text" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end></td>
+ <td><input name="entryfield" id="${dataEntryId}" type="text" tabindex="${tabIndex}"#if( $greyedField || !$hasAccess ) disabled="disabled"#end></td>
#end
</td>
#set( $tabIndex = $tabIndex + 1 )