dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24788
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12207: Data entry, fixed bug with indicator fields
------------------------------------------------------------
revno: 12207
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-23 11:50:17 +0200
message:
Data entry, fixed bug with indicator fields
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java
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-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2013-09-23 09:50:17 +0000
@@ -267,6 +267,7 @@
String inputHtml = inputMatcher.group();
Matcher identifierMatcher = IDENTIFIER_PATTERN.matcher( inputHtml );
+ Matcher indicatorMatcher = INDICATOR_PATTERN.matcher( inputHtml );
if ( identifierMatcher.find() && identifierMatcher.groupCount() > 0 )
{
@@ -326,6 +327,10 @@
inputHtml += "<span id=\"" + dataElement.getUid() + "-dataelement\" style=\"display:none\">" + dataElement.getFormNameFallback() + "</span>";
inputHtml += "<span id=\"" + categoryOptionCombo.getUid() + "-optioncombo\" style=\"display:none\">" + categoryOptionCombo.getName() + "</span>";
}
+ else if ( indicatorMatcher.find() && indicatorMatcher.groupCount() > 0 )
+ {
+ inputHtml = inputHtml.replace( TAG_CLOSE, " class=\"indicator\"" + TAG_CLOSE );
+ }
inputMatcher.appendReplacement( sb, inputHtml );
}
=== 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 2013-09-18 09:45:24 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2013-09-23 09:50:17 +0000
@@ -1054,6 +1054,7 @@
$( '.entryfield' ).css( 'background-color', COLOR_WHITE ).css( 'border', '1px solid ' + COLOR_BORDER );
$( '.entryselect' ).css( 'background-color', COLOR_WHITE ).css( 'border', '1px solid ' + COLOR_BORDER );
+ $( '.indicator' ).css( 'background-color', COLOR_WHITE ).css( 'border', '1px solid ' + COLOR_BORDER );
$( '.entrytrueonly' ).css( 'background-color', COLOR_WHITE );
$( '.entryoptionset' ).css( 'background-color', COLOR_WHITE );
@@ -1095,6 +1096,8 @@
$( '#completenessDiv' ).show();
}
+ $( '.indicator' ).attr( 'readonly', 'readonly' );
+
// Set data values, works for selects too as data value=select value
$.safeEach( json.dataValues, function( i, value )