Ignore:
Timestamp:
07/13/10 09:58:07 (14 years ago)
Author:
asaikawa
Message:

Ticket #871 - Implementada opcao para selecionar se exibe todas as contas, ou apenas as visiveis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/workflow/js/jscode/participants.js

    r795 r3041  
    11var participantsClone = null; 
     2var chkOnlyVisibleAccountsClone = null; 
    23var searchTimer = null; 
    34var globalSearchEnter = true; 
     
    2324        var params = { 
    2425                organization: $F('organization'), 
     26                onlyVisibleAccounts: $F('onlyVisibleAccounts'), 
    2527                entities: $F('entities'), 
    2628                id: $F('id'), 
     
    3436        var params = { 
    3537                context: $F('sector'), 
     38                onlyVisibleAccounts: $F('onlyVisibleAccounts'), 
    3639                entities: $F('entities'), 
    3740                id: $F('id'), 
     
    4649        setSelectValue($('participants'), data); 
    4750        participantsClone = data; 
     51        if($('onlyVisibleAccounts')) 
     52                chkOnlyVisibleAccountsClone = $('onlyVisibleAccounts').checked; 
    4853} 
    4954 
     
    6368        var reg = new RegExp("<option[^>]*>[^<]*" + searchString + "[^<]*<\/option>", "gi"); 
    6469        setSelectValue($('participants'), participantsClone.match(reg)); 
     70        if($('onlyVisibleAccounts')) 
     71                $('onlyVisibleAccounts').checked = chkOnlyVisibleAccountsClone; 
    6572 
    6673        var participants = $('participants'); 
     
    126133 
    127134                obj = $('participants'); 
    128                 if (obj) 
     135                if (obj){ 
    129136                        participantsClone = obj.innerHTML; 
     137                        if($('onlyVisibleAccounts')) 
     138                                chkOnlyVisibleAccountsClone = $('onlyVisibleAccounts').checked; 
     139                } 
    130140 
    131141                obj = $('exitLink'); 
     
    140150                if (obj) 
    141151                        obj.focus(); 
     152 
     153                obj = $('onlyVisibleAccounts'); 
     154                if (obj) 
     155                        obj.onclick = checkOnlyVisibleAccounts; 
    142156 
    143157                obj = $('useGlobalSearch'); 
     
    149163        }); 
    150164}; 
     165 
     166function checkOnlyVisibleAccounts() 
     167{ 
     168        if(!$('useGlobalSearch').checked) 
     169                getParticipants(); 
     170        else 
     171                toggleFullSearch(); 
     172} 
    151173 
    152174function participantsFilterName(name) 
     
    330352        $('globalSearchWarnings').innerHTML = ''; 
    331353        var params = { 
     354                onlyVisibleAccounts: $F('onlyVisibleAccounts'), 
    332355                searchTerm: $F('search'), 
    333356                entities: $F('entities'), 
     
    341364{ 
    342365        newWidth   = 500; 
    343         newHeight  = 290; 
     366        newHeight  = 315; 
    344367        newScreenX = screen.width - newWidth; 
    345368        newScreenY = 0; 
Note: See TracChangeset for help on using the changeset viewer.