Ignore:
Timestamp:
08/17/10 16:17:12 (14 years ago)
Author:
viani
Message:

Ticket #1135 - Merged r1990:3166 from /trunk/workflow into /branches/2.2/workflow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/workflow/js/userinterface/orgchart.js

    r1452 r3167  
    4545        content += '</select></a></li>'; 
    4646        content += '<li><a href="#" onclick="window.open(\'' + enderecoImagem + '\', \'extwindow\'); return false;"><img src="templateFile.php?file=images/Process.gif">&nbsp;&nbsp;Gráfico</a></li>'; 
    47         content += '<li><a><input type="text" name="search_term" id="search_term" onkeypress="if (((event.which) ? event.which : event.keyCode) == 13) $(\'search_span\').onclick(); return true;" /><span id="search_span" style="cursor: pointer;" onclick="tmp = $$(\'div#orgchartAreas a.destaque\'); if (tmp[0]) tmp[0].removeClassName(\'destaque\'); orgchartSearchEmployee($F(\'search_term\')); return false;">&nbsp;busca</span></a></li>'; 
     47        content += '<li><a><input type="text" name="search_term" id="search_term" onkeypress="if (((event.which) ? event.which : event.keyCode) == 13) $(\'search_span\').onclick(); return true;" /><span id="search_span" style="cursor: pointer;" onclick="tmp = $$(\'div#orgchartAreas a.destaque\'); if (tmp[0]) tmp[0].removeClassName(\'destaque\'); orgchartSearchEmployee($F(\'search_term\')); return false;">&nbsp;busca&nbsp;</span><img src="templateFile.php?file=images/help.png" title="Informe o nome, área ou telefone a ser pesquisado." style="cursor: help" /></a></li>'; 
    4848        content += '<li><a href="#" onclick="printArea(); return false;"><img src="templateFile.php?file=images/imprimir.png" width="16">&nbsp;&nbsp;Imprimir</a></li>'; 
    4949        content += '</ul>'; 
     
    171171        var content = '<center><h2>Substituição de Chefia</h2></center>'; 
    172172        content += '<table class="employeeList">'; 
    173         content += '<tr><th>Área</th><th>Titular</th><th>Substituto</th></tr>'; 
     173        content += '<tr><th>Área</th><th>Titular</th><th>Substituto</th><th>Data de início</th><th>Data de término</th></tr>'; 
    174174        var current; 
    175175        for (var i = 0; i < data.length; i++) 
     
    180180                content += '<td>' + current['titular'] + '</td>'; 
    181181                content += '<td>' + current['substituto'] + '</td>'; 
     182                content += '<td>' + current['data_inicio'] + '</td>'; 
     183                content += '<td>' + current['data_fim'] + '</td>'; 
    182184                content += '</tr>'; 
    183185        } 
     
    294296 
    295297        /* no employee to list */ 
    296         if ( ( ! data['employees'] || data['employees'].length == 0 ) && ( ! data['bygroup'] || data['bygroup'].length == 0 ) ) 
     298        if ( ( ! data['employees'] || data['employees'].length == 0 ) &&  
     299                 ( ! data['bygroup'] || data['bygroup'].length == 0 ) && 
     300                 ( ! data['bytelephone'] || data['bytelephone'].length == 0 ) ) 
    297301        { 
    298302                div.innerHTML = '<br/><br/><center><strong>Nenhum registro encontrado</strong></center>'; 
     
    317321                /* build the display table (headers)*/ 
    318322                content += '<table id="employeeList" class="employeeList" style="clear: both">'; 
    319                 content += '<tr>'; 
     323                content += '<tr class="message_header">'; 
    320324                content += '<th>Nome</th>'; 
    321325                if (useArea) 
     
    344348                                complement = ''; 
    345349                        if (employees[i]['removed']) 
    346                                 complement += ' <font color="red">(excluído)</font>'; 
     350                                complement += ' <font color="red">(inativo)</font>'; 
    347351                        content += '<tr class="linha'+ i%2 + (useCategories ? ' categoria_' + employees[i]['funcionario_categoria_id'] : '') + '" onmouseover="this.className=\'highlight0\'" onmouseout="this.className=\'linha'+ i%2 + (useCategories ? ' categoria_' + employees[i]['funcionario_categoria_id'] : '') + '\'">'; 
    348352                        content += '<td><a href="javascript:void(0);" onmouseover="getEmployeeInfoTimer(event, ' + employees[i]['funcionario_id'] + '); return false;" onmouseout="hideEmployeeInfo(); return false;">' + employees[i]['cn'] + complement + '</a></td>'; 
     
    477481                        div.innerHTML += '</center><span style="color:red">Busca pelo nome: ' + searchTerm.toUpperCase( ) + '</span>' + content; 
    478482 
     483                // printing records found by group 
    479484                if ( data['bygroup'] && data['bygroup'].length ) 
    480485                { 
     
    484489                        if ( content ) 
    485490                                div.innerHTML += '<br/><br/><span style="color:red">Busca pelo setor: ' + searchTerm.toUpperCase( ) + '</span><br/>' + content; 
     491                } 
     492 
     493                // printing records found by telephoneNumber 
     494                if ( data['bytelephone'] && data['bytelephone'].length ) 
     495                { 
     496                        employees = [ ]; 
     497                        employees[ 'employees' ] = data['bytelephone']; 
     498                        content = printEmployeesHandler( employees, 'returnResult' ); 
     499                        if ( content ) 
     500                                div.innerHTML += '<br/><br/><span style="color:red">Busca pelo telefone: ' + searchTerm.toUpperCase( ) + '</span><br/>' + content; 
    486501                } 
    487502 
Note: See TracChangeset for help on using the changeset viewer.