Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 4791

Show
Ignore:
Timestamp:
07/02/08 17:55:12 (2 months ago)
Author:
sunbiz
Message:

registration: Corrected Barcode Scanner Hint Balloon

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/registration/web/module/resources/scripts/registration.js

    r4776 r4791  
    11var reg_patientFound = false; 
    22var reg_directDashboard = false; 
     3 
     4var shown = false; 
     5var time = 250; 
     6var distance = 10; 
    37 
    48function searchPhrase(e){ 
     
    1115            $("#searchResults").load('/openmrs/moduleServlet/registration/RegistrationSearchServlet?phrase='+user); 
    1216            $("#searchField").focus(); 
    13             return true;             
     17            if(shown){ 
     18                hideBarcodePopup(); 
     19            } 
     20            return true; 
    1421        } 
    1522        else if(ch==13){ 
     
    2027                alert('No Matching Patient Found'); 
    2128            } 
     29            return true; 
    2230        } 
    2331        else{ 
     
    4351} 
    4452 
     53function 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 
    4564function showBarcodePopup() { 
    46     var time = 250; 
    47     var distance = 10; 
    48     var beingShown = false; 
    49     var shown = false; 
    5065    var info = $('.popup').css('opacity', 0); 
    51  
    5266    info.css({ 
    5367        top: -90, 
     
    5872        opacity: 1 
    5973    }, time, 'swing', function() { 
    60         beingShown = false; 
    6174        shown = true; 
    6275    });