dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12772
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3994: Fix bug: Searching patient should be acted when click Enter button.
------------------------------------------------------------
revno: 3994
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-06-23 10:10:28 +0700
message:
Fix bug: Searching patient should be acted when click Enter button.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.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-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js 2011-06-14 07:44:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js 2011-06-23 03:10:28 +0000
@@ -229,6 +229,23 @@
// Search Patient
//-----------------------------------------------------------------------------
+function searchPatientsOnKeyUp( event )
+{
+ var key = getKeyCode( event );
+
+ if ( key==13 )// Enter
+ {
+ searchPatients();
+ }
+}
+
+function getKeyCode(e)
+{
+ if (window.event)
+ return window.event.keyCode;
+ return (e)? e.which : null;
+}
+
function searchPatients()
{
hideById( 'listPatientDiv' );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm 2011-06-14 07:44:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm 2011-06-23 03:10:28 +0000
@@ -35,7 +35,7 @@
<em title="$i18n.getString( "required" )" class="required">*</em></label>
</td>
<td>
- <input type="text" id="searchText" name="searchText" maxlength="30" style="width:20em" value="$!searchText" >
+ <input type="text" id="searchText" name="searchText" maxlength="30" style="width:20em" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );'>
<select id="programId" name='programId' style="display:none; width:20.2em" ></select>
</td>
<td><input type="button" value='$i18n.getString( "search" )' onclick='searchPatients();'></td>