dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07819
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2306: Minor fix.
------------------------------------------------------------
revno: 2306
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-10-04 19:13:09 +0700
message:
Minor fix.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggMapping.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.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-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggMapping.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggMapping.vm 2010-08-17 07:47:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggMapping.vm 2010-10-04 12:13:09 +0000
@@ -1,5 +1,5 @@
-
<script>
+
var holdFocus;
var intType = '$intType';
var stringType = '$stringType';
@@ -8,13 +8,32 @@
var tableRowCount = 0;
var programstageDEisMul;
var programstageDEdatatype;
- //var last_deleted=-100;
- //noOfRecordsDeleted=0;
- //noOfSmallerRecordsDeleted;
+ var i18n_specify_dataelememt = '$encoder.jsEscape( $i18n.getString( "specify_dataelememt" ) , "'") ';
+ var onsubmit = true;
+ jQuery(document).ready( function(){
+
+ jQuery.metadata.setType( "attr", "data" );
+ getProgramStages();
+
+ validation( 'caseAggFrom', function(form){
+ if(onsubmit){
+ form.submit();
+ }
+ }, function(){
+ if( $('#aggde').val() == null){
+ setHeaderMessage(i18n_specify_dataelememt);
+ $( '#aggde' ).focus();
+ $( '#aggde' ).css( "background-color", "#ffc5c5" );
+ onsubmit = false;
+ }
+ });
+
+ });
+
</script>
<h3>$i18n.getString( "case_aggregation_mapping" )</h3>
-<form id="caseAggFrom" name="caseAggFrom" method="post" action="saveCaseAggMapping.action">
+<form id="caseAggFrom" action="saveCaseAggMapping.action" method="post">
<table>
<tr valign="top">
@@ -22,8 +41,7 @@
<table>
<tr>
- <td>
- $i18n.getString( "dataelement_group_list" )<br>
+ <td> $i18n.getString( "dataelement_group_list" )<br>
<select id="degroup" name="degroup" style="width:325px" onchange="getAggDataElements()">
<option value="0">$encoder.htmlEncode( "Others" )</option>
#foreach( $deGroup in $deGroupList )
@@ -176,13 +194,4 @@
<input type="button" value="Select" onclick="select_click()"/>
</div>
</div>
-<script language="javascript">
-
- window.onload=function()
- {
- jQuery.metadata.setType( "attr", "data" );
- getProgramStages();
- }
-
-</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js 2010-08-17 07:47:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js 2010-10-04 12:13:09 +0000
@@ -23,7 +23,7 @@
clearList( de );
var dataElementList = dataelementElement.getElementsByTagName( 'dataelement' );
-
+
for ( var i = 0; i < dataElementList.length; i++ )
{
var id = dataElementList[ i ].getElementsByTagName("id")[0].firstChild.nodeValue;
@@ -136,6 +136,7 @@
function getCaseAggExpression( )
{
var aggde = document.getElementById( 'aggde' );
+
var aggdeId = aggde.options[ aggde.selectedIndex ].value;
var requestString = 'getCaseAggExpression.action?aggdeId=' + aggdeId;
@@ -151,9 +152,11 @@
{
var expressionTA = document.getElementById( 'expression' );
- var expression = expressionElement.firstChild.nodeValue;
-
- expressionTA.value = expression;
+ if(expressionElement.firstChild != null )
+ {
+ var expression = expressionElement.firstChild.nodeValue;
+ expressionTA.value = expression;
+ }
}
//-----------------------------------------------------------------