Changeset 4791
- Timestamp:
- 07/02/08 17:55:12 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs-modules/registration/web/module/resources/scripts/registration.js
r4776 r4791 1 1 var reg_patientFound = false; 2 2 var reg_directDashboard = false; 3 4 var shown = false; 5 var time = 250; 6 var distance = 10; 3 7 4 8 function searchPhrase(e){ … … 11 15 $("#searchResults").load('/openmrs/moduleServlet/registration/RegistrationSearchServlet?phrase='+user); 12 16 $("#searchField").focus(); 13 return true; 17 if(shown){ 18 hideBarcodePopup(); 19 } 20 return true; 14 21 } 15 22 else if(ch==13){ … … 20 27 alert('No Matching Patient Found'); 21 28 } 29 return true; 22 30 } 23 31 else{ … … 43 51 } 44 52 53 function hideBarcodePopup(){ 54 var info = $('.popup').css('opacity', 0); 55 info.animate({ 56 top: '-=' + distance + 'px', 57 opacity: 0 58 }, time, 'swing', function () { 59 shown = false; 60 info.css('display', 'none'); 61 }); 62 } 63 45 64 function showBarcodePopup() { 46 var time = 250;47 var distance = 10;48 var beingShown = false;49 var shown = false;50 65 var info = $('.popup').css('opacity', 0); 51 52 66 info.css({ 53 67 top: -90, … … 58 72 opacity: 1 59 73 }, time, 'swing', function() { 60 beingShown = false;61 74 shown = true; 62 75 });