← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8479: Small changes in anonymous data entry form.

 

------------------------------------------------------------
revno: 8479
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-10-11 16:44:47 +0700
message:
  Small changes in anonymous data entry form.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.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-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm	2012-10-07 05:32:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm	2012-10-11 09:44:47 +0000
@@ -42,14 +42,11 @@
 					</select>
 					<input type='hidden' class='stage-object-selected hidden'>
 				</td>
-				<td>	
+				<td>
 					<input type="button" class='large-button' id='listBtn' value="$i18n.getString( 'list_all_events' )" onclick='validateSearchEvents( true );'>
-				
 					<input type="button" class='large-button' id='addBtn' value='$i18n.getString( "add_new" )' onclick="setFieldValue('isShowEventList', true);showAddEventForm();">
-				
-					<input type="button" class='large-button' id='removeBtn' value='$i18n.getString( "remove_empty_events" )' onclick="removeEmptyEvents();">
-				
 					<input type="button" class='large-button' id='advancedBtn' value='$i18n.getString( "search" )' onclick="jQuery('#advanced-search').toggle();">
+					<input type="button" id='removeBtn' value='$i18n.getString( "remove_empty_events" )' onclick="removeEmptyEvents();">
 				</td>
 			</tr>
 		</table>
@@ -65,8 +62,8 @@
 					<input type="text" id='startDate' name='startDate' style='width:105px'>
 					<input type="text" id='endDate' name='endDate' style='width:105px'>
 				</td>
-				<td><input type="button" id='searchBtn' value='$i18n.getString( "search" )' onclick='setFieldValue("isShowEventList", false);validateSearchEvents( false )'></td>
 			</tr>
+			<tr><td colspan='2'><hr></td></td>
 			
 			<tbody id='advancedSearchTB'>
 				<tr id='advSearchBox0'>	
@@ -74,8 +71,13 @@
 						<select id="searchObjectId" name="searchObjectId" onchange='dataElementOnChange(this);'></select>
 					</td>		
 					<td>
-						<input type="text" id="searchText" name="searchText" value="$!searchText">
-						<input type="button" id='addSearchOptionBtn' name='addSearchOptionBtn' class='small-button' value='+' onclick='addAttributeOption()'>
+						<input type="text" id="searchText" name="searchText" value="$!searchText" style='margin-right:25px;'>
+					</td>
+					<td>
+						<input type="button" class='tiny-button' id='addSearchOptionBtn' name='addSearchOptionBtn' value='+' onclick='addAttributeOption()'>
+					</td>
+					<td>
+						<input type="button" class='large-button' id='searchBtn' value='$i18n.getString( "search" )' onclick='setFieldValue("isShowEventList", false);validateSearchEvents( false )'>
 					</td>
 				</tr>
 			</tbody>
@@ -87,23 +89,21 @@
 
 <div id='dataEntryInfor' class='hidden'>
 	<h3>
-		<a href="javascript:backEventList();">$i18n.getString( "anonymous_events" )</a>
+		<a href="javascript:backEventList();">$i18n.getString( "anonymous_events" ) </a>
 		&raquo; <span id='programName' name='programName'></span>
 	</h3>
-	<table>
+	<table style="width:480px;">
 		<tr>
-		    <th><span id="reportDateDescriptionField2">$i18n.getString( "report_date" ) </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
-            <th><input type="text" id="executionDate" name="executionDate" onchange="addNewEvent();"></th>
-                <script type="text/javascript">
-                   datePickerValid( 'executionDate', false );
-                </script>  
-			<th><label for="dueDate">$i18n.getString( "due_date" ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></th>
-            <th><input type="text" id="dueDate" name="dueDate" value="$!format.formatDate( $programStageInstance.dueDate )" disabled="disabled">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
-        </tr>
+			<th><span id="reportDateDescriptionField2">$i18n.getString( "report_date" )</span> </th>
+			<th><input type="text" id="executionDate" name="executionDate" onchange="addNewEvent();"></th>
+				<script type="text/javascript">
+				   datePickerValid( 'executionDate', false );
+				</script> 
+		</tr>
 	</table>
 	<div id='dataEntryFormDiv'></div>
 	
-	<div class="page inputCriteria" style="width:490px;height:29px;">	
+	<div id='actionDiv' class="page inputCriteria" style="width:455px;height:29px;">	
 		<input type="button" onclick="doComplete()" value="$i18n.getString('complete')" id="completeBtn">
 		<input type="button" onclick="doUnComplete()" value="$i18n.getString('incomplete')" id="uncompleteBtn" >
 		<input type="button" onclick="completedAndAddNewEvent()" value="$i18n.getString('complete_and_add_new_event')" id="completeAndAddNewBtn">

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2012-10-07 05:32:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2012-10-11 09:44:47 +0000
@@ -309,6 +309,7 @@
 		{
 			jQuery('#inputCriteriaDiv').remove();
 			hideById('mainLinkLbl');
+			showById('actionDiv');
 			var programName = jQuery('#programId option:selected').text();
 			var programStageId = jQuery('#programId option:selected').attr('psid');
 			jQuery('.stage-object-selected').attr('psid',programStageId);
@@ -343,7 +344,10 @@
 	hideById('selectDiv');
 	hideById('searchDiv');
 	hideById('listDiv');
+	hideById('mainLinkLbl');
+	hideById('actionDiv');
 	showById('dataEntryInfor');
+	setInnerHTML('programName', jQuery('#programId option:selected').text());
 }
 
 function addNewEvent()
@@ -358,7 +362,7 @@
 			if(json.response=='success')
 			{
 				setFieldValue('programStageInstanceId',json.message);
-				showUpdateEvent( json.message )
+				showUpdateEvent( json.message );
 			}
 			else
 			{