Ignore:
Timestamp:
11/03/11 11:17:35 (12 years ago)
Author:
wmerlotto
Message:

Ticket #2305 - Enviando alteracoes, desenvolvidas internamente na Prognus, do modulo contactcenter.

Location:
trunk/contactcenter/js
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/contactcenter/js/cc.js

    r4507 r5131  
    231231function openContactDetails(id){ 
    232232        // Build the ContactDetails Window. 
    233         if(!contactdetailsWin && !is_ie)  
     233        if((typeof(contactdetailsWin) == 'undefined') && !is_ie)  
    234234                __cdWin(); 
    235235 
     
    996996        for (var type in CC_contact_full_info['connections']){ 
    997997            haveConnections = true; 
     998                        var reEmail = /^[a-zA-Z0-9][_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{1,})*$/; 
    998999            for (var i in CC_contact_full_info['connections'][type]){ 
     1000                                if(type == 1){ 
     1001                                        if(!reEmail.test(CC_contact_full_info['connections'][type][i]['value'])){ 
     1002                                                showMessage('Endereço para conexão de ' + CC_contact_full_info['connections'][type][i]['name'] + ', não é válido'); 
     1003                                                return false; 
     1004                                        } 
     1005                                } 
     1006                                else{ 
    9991007                if((CC_contact_full_info['connections'][type][i]['value'].length < 4) || 
    10001008                    (!comp.test(CC_contact_full_info['connections'][type][i]['value']))){ 
     
    10021010                    return false; 
    10031011                } 
     1012            } 
    10041013            } 
    10051014            var _options_default = Element("cc_"+(type == 1 ? 'email' : 'phone')+"_default"); 
     
    10091018            } 
    10101019        } 
    1011     } 
    1012     if(!haveConnections){ 
    1013         showMessage(Element('cc_msg_tel_or_mail_required').value); 
    1014         return false; 
    10151020    } 
    10161021 
     
    16341639                        //'<td style="width: 30px;" align="right"><input name="cc_conn_is_default" id="cc_conn_is_default_'+ CC_conn_count +'" type="radio"></td>'+ 
    16351640                        '<td style="width: 10px;" align="right"><input id="cc_conn_name_'+CC_conn_count+'" type="hidden"><td style="width: 100px;" align="right"><span style="width: 150px;" id="cc_conn_label_'+CC_conn_count+'">'+_label+'</span></td>' + 
    1636                         '<td align="left"><input id="cc_conn_value_'+ CC_conn_count +'" style="width: 150px;" maxlength="100" type="text">&nbsp;' + 
     1641                        '<td align="left"><input id="cc_conn_value_'+ CC_conn_count +'" onkeyup="javascript:emailTolower(\'cc_conn_value_' + CC_conn_count + '\')" style="width: 150px;" maxlength="100" type="text">&nbsp;' + 
    16371642                        '<img align="top" alt="X" src="templates/default/images/x.png" style="width:18px; height:18px" onclick="javascript:removeConnField(\'cc_conn_tr_' + CC_conn_count + '\')"></td>'; 
    16381643                } 
     
    16421647                        //'<td style="width: 30px;" align="right"><input name="cc_conn_is_default" id="cc_conn_is_default_'+ CC_conn_count +'" type="radio"></td>'+ 
    16431648                        '<td style="width: 10px;" align="right"><input id="cc_conn_name_'+CC_conn_count+'" type="hidden"><td style="width: 100px;" align="right"><span style="width: 150px;" id="cc_conn_label_'+CC_conn_count+'">'+_label+'</span></td>' + 
    1644                         '<td align="left"><input id="cc_conn_value_'+ CC_conn_count +'" style="width: 150px;" maxlength="30" type="text" onkeyup="formatPhone(this)">&nbsp;' + 
     1649                        '<td align="left"><input id="cc_conn_value_'+ CC_conn_count +'" onkeyup="javascript:emailTolower(\'cc_conn_value_' + CC_conn_count + '\')" style="width: 150px;" maxlength="30" type="text" onkeyup="formatPhone(this)">&nbsp;' + 
    16451650                        '<img align="top" alt="X" src="templates/default/images/x.png" style="width:18px; height:18px" onclick="javascript:removeConnField(\'cc_conn_tr_' + CC_conn_count + '\')"></td>'; 
    16461651                } 
     
    18061811 
    18071812        connRemoveLine(id); 
     1813} 
     1814 
     1815function emailTolower(obj){ 
     1816        document.getElementById(obj).value = document.getElementById(obj).value.toLowerCase(); 
     1817 
    18081818} 
    18091819 
     
    23082318 
    23092319                                                                if(data[3][pos][k] === 'none') 
    2310                                                                         data[3][pos][k] = '&nbsp'; 
     2320                                                                        "Não informado."; 
    23112321                                                                break; 
    23122322                                                        case 'cc_phone' : 
    23132323 
    23142324                                                                if(data[3][pos][k] === 'none') 
    2315                                                                         data[3][pos][k] = '&nbsp'; 
     2325                                                                        data[3][pos][k] = "Não informado."; 
    23162326                                                                break; 
    23172327                                                } 
     
    23522362                                                                else 
    23532363                                                                { 
     2364                                                                        if(data[3][pos][k] != "Não informado.") 
    23542365                                                                        Element(id+':'+data[2][k]).innerHTML = data[5] + data[3][pos][k] + '\')">'+ data[3][pos][k]+'</span>'; 
     2366                                                                        else 
     2367                                                                                Element(id+':'+data[2][k]).innerHTML = data[13] + data[3][pos][k] + '\')">'+ data[3][pos][k]+'</span>'; 
    23552368                                                                } 
    23562369                                                                break; 
     
    23662379                                                                        Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], 20); 
    23672380                                                                } 
     2381                                                                if(data[3][pos][k] != " ") 
    23682382                                                                Element(id+':cc_phone').innerHTML = (data[3][pos][k].length < 23) ? data[3][pos][k]:data[3][pos][k].substr(0,22)+"<br>"+data[3][pos][k].substr(22,data[3][pos][k].length); 
     2383                                                                else 
     2384                                                                        Element(id+':cc_phone').innerHTML = "Não informado."; 
    23692385                                                                break; 
    23702386 
    23712387                                                        case 'cc_title': 
    2372                                                                 if (data[3][pos][k].length > 15) 
     2388                                                                if(preferences.departmentShow && ccTree.catalog_perms == 1){ 
     2389                                                                        if(data[3][pos][k] == " " || data[3][pos][k] == "" || data[3][pos][k] == "undefined"){ 
     2390                                                                                Element(id+':'+data[2][k]).innerHTML = "Não informado."; 
     2391                                                                        } 
     2392                                                                        else if (data[3][pos][k].length > 15) 
    23732393                                                                { 
    23742394                                                                        Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], 15); 
     
    23802400                                                                } 
    23812401                                                                break; 
    2382  
     2402                                                                }else{ 
     2403                                                                        break; 
     2404                                                                } 
    23832405                                                        case 'cc_id': 
    23842406                                                                var id_contact = data[3][pos][k]; 
     
    24102432                                                        //Para tratar tamanho do campo "celular" do empregado 
    24112433                                                        case 'cc_mobile': 
     2434                                                                if(preferences.cellShow && ccTree.catalog_perms == 1){ 
    24122435                                                                if (data[3][pos][k].length > 20) 
    24132436                                                                { 
     
    24212444                                                                Element(id+':cc_mobile').innerHTML = data[3][pos][k]; 
    24222445                                                                break; 
    2423  
     2446                                                                }else{ 
     2447                                                                        break; 
     2448                                                                }                
    24242449                                                        //Para tratar tamanho do campo "matricula" do empregado 
    24252450                                                        case 'cc_empNumber': 
     2451                                                                if(preferences.empNumShow && ccTree.catalog_perms == 1){ 
    24262452                                                                if (data[3][pos][k].length > 20) 
    24272453                                                                { 
     
    24352461                                                                Element(id+':cc_empNumber').innerHTML = data[3][pos][k]; 
    24362462                                                                break; 
    2437  
     2463                                                                }else{ 
     2464                                                                        break; 
     2465                                                                } 
    24382466                                                        //Para tratar tamanho do campo "departamento" do empregado 
    24392467                                                        case 'cc_department': 
     
    24612489                                                                        Element(id+':'+data[2][k]).innerHTML = data[3][pos][k]; 
    24622490                                                                } 
     2491                                                } 
     2492                                        }else{ 
     2493                                                data[3][pos][k] = unescape(data[3][pos][k]); 
     2494                                                switch (data[2][k]) 
     2495                                                { 
     2496                                                        case 'cc_mail': 
     2497                                                                Element(id+':'+data[2][k]).innerHTML = data[13] + "Não informado." + '\')">'+ "Não infomardo." +'</span>'; 
     2498                                                                break; 
     2499 
     2500                                                        case 'cc_phone': 
     2501                                                                Element(id+':cc_phone').innerHTML = "Não informado."; 
     2502                                                                break; 
     2503                                                        case 'cc_empNumber': 
     2504                                                                if(preferences.empNumShow && ccTree.catalog_perms == 1){ 
     2505                                                                        var cc_empNumberTD = Element(id+':cc_empNumber').parentNode; 
     2506                                                                        cc_empNumberTD.parentNode.removeChild(cc_empNumberTD); 
     2507                                                                } 
     2508                                                                break; 
     2509                                                        case 'cc_mobile': 
     2510                                                                if(preferences.cellShow && ccTree.catalog_perms == 1){ 
     2511                                                                        var cc_mobileTD = Element(id+':cc_mobile').parentNode; 
     2512                                                                        cc_mobileTD.parentNode.removeChild(cc_mobileTD); 
     2513                                                                } 
     2514                                                                break; 
     2515                                                        case 'cc_title': 
     2516                                                                if(preferences.departmentShow && ccTree.catalog_perms == 1){ 
     2517                                                                        var cc_titleTD = Element(id+':cc_title').parentNode; 
     2518                                                                        cc_titleTD.parentNode.removeChild(cc_titleTD); 
     2519                                                                } 
     2520                                                                break; 
    24632521                                                } 
    24642522                                        } 
     
    25152573                                                { 
    25162574                                                        case 'cc_title': 
    2517                                                                 if (data[3][pos][k].length > 50) 
     2575                                                                if (data[3][pos][k].length > (CC_visual == 'table'  ? 50 : 20)) 
    25182576                                                                { 
    2519                                                                         Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], 50); 
     2577                                                                        Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], (CC_visual == 'table'  ? 50 : 20)); 
    25202578                                                                        Element(id+':'+data[2][k]).title = data[3][pos][k]; 
    25212579                                                                } 
     
    26632721                                                '<img title="'+Element('cc_msg_card_remove').value+'" id="' + id + ':cc_card_remove" style="position: absolute; top: 78px; left: 223px; width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value);" onmouseover="resizeIcon(\''+id+':cc_card_remove\',0)" onmouseout="resizeIcon(\''+id+':cc_card_remove\',1)" src="templates/default/images/cc_x.png">' : '') + 
    26642722                                                '<img id="' + id + ':cc_photo" style="position: absolute; top: 15px; left: 7px;" src="" border="0" ondblclick="editContact(Element(\'' + id + ':cc_id\').value);">' + 
    2665                                                 '<span id="' + id + ':cc_company" style="position: absolute; top: 5px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 14px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_company_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_company_full\').style.visibility=\'hidden\'"></span>' + 
     2723                                                '<span id="' + id + ':cc_company" style="position: absolute; top: 5px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 10px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_company_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_company_full\').style.visibility=\'hidden\'"></span>' + 
    26662724                                                '<span style="cursor: pointer; cursor: hand; z-index: 1;position: absolute; top: 100px; left: 35px"  valign="bottom" id="' + id + ':cc_icon_group">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>'+ 
    26672725                                                //Para exibir a matricula do empregado nos cartoes 
    2668                                                 '<span id="' + id + ':cc_empNumber" style="position: absolute; top: 15px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 9px; text-align: center; height: 10px;"></span>' + 
     2726                                                '<span id="' + id + ':cc_empNumber" style="position: absolute; top: 20px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 9px; text-align: center; height: 10px;"></span>' + 
    26692727                                                '<span id="' + id + ':cc_name" style="position: absolute; top: 30px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 10px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_name_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_name_full\').style.visibility=\'hidden\'"></span>' + 
    2670                                                 '<span id="' + id + ':cc_title" style="position: absolute; top: 50px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 12px; text-align: center; height: 10px;"></span>' + 
     2728                                                '<span id="' + id + ':cc_title" style="position: absolute; top: 90px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 12px; text-align: center; height: 10px;"></span>' + 
    26712729                                                //Para exibir o setor/lotacao do empregado nos cartoes 
    26722730                                                '<span id="' + id + ':cc_department" style="position: absolute; top: 60px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 10px; text-align: center; height: 10px;"></span>' + 
     
    26942752                                        '<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1"></span>' + 
    26952753                                        '<span id="' + id + ':cc_title"></span></td>' + 
    2696                                         '<td width="40%" style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+'\'"  id="' + id + ':cc_short_name"></span></td>' + 
    2697                                         '<td align="left" width="55px">'+ 
     2754                                        '<td width="40%" style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span id="' + id + ':cc_short_name"></span></td>' + 
     2755                                        '<td align="center" width="10%">'+ 
    26982756                                        '<img  title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style=" cursor: pointer; cursor: hand; z-index: 1;width: 18px; height: 18px;"  onclick="editGroup(Element(\'' + id + ':cc_id\').value);" src="templates/default/images/cc_card_edit.png">' + 
    26992757                                        '&nbsp;&nbsp;|&nbsp;&nbsp;'+ 
     
    27052763                                html_card = '<tr  style="height:20px" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE">' + 
    27062764                                        //Para exibir a matricula do empregado na tabela 
    2707                                         (preferences.empNumShow && ccTree.catalog_perms == 1 ? '<td align="center" nowrap><span style="solid #999; font-weight: normal; font-size: 10px;height: 10px" id="' + id + ':cc_empNumber"></span></td>' : '') + 
     2765                                        (preferences.empNumShow && ccTree.catalog_perms == 1 ? '<td align="center" width="10%" name="cc_name_empNumber" nowrap><span style="solid #999; font-weight: normal; font-size: 10px;height: 10px" id="' + id + ':cc_empNumber"></span></td>' : '') + 
    27082766                                        '<td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;"><span valign="bottom" id="' + id + ':cc_icon_group">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="' + id + ':cc_name"></span></td>' + 
    2709                                         '<td style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_name\').innerHTML" id="' + id + ':cc_mail"></span></td>' + 
    2710                                         '<td align="center" nowrap><span style="solid #999; font-weight: normal; font-size: 10px;height: 10px" id="' + id + ':cc_phone"></span></td>' + 
     2767                                        '<td width="20%" align="center" name="cc_name_send_mail" style="solid #999; font-weight: normal; font-size: 10px; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_name\').innerHTML" id="' + id + ':cc_mail"></span></td>' + 
     2768                                        '<td width="20%" align="center" name="cc_name_phone" nowrap><span style="solid #999; font-weight: normal; font-size: 10px;height: 10px" id="' + id + ':cc_phone"></span></td>' + 
    27112769                                        //Para exibir o celular empresarial do empregado na tabela 
    2712                                         (preferences.cellShow && ccTree.catalog_perms == 1 ?    '<td align="center" nowrap><span style="solid #999; font-weight: normal; font-size: 10px;height: 10px" id="' + id + ':cc_mobile"></span></td>' : '') + 
     2770                                        (preferences.cellShow && ccTree.catalog_perms == 1 ?    '<td align="center" name="cc_name_mobile" nowrap><span style="solid #999; font-weight: normal; font-size: 10px;height: 10px" id="' + id + ':cc_mobile"></span></td>' : '') +  
    27132771                                        //Para exibir o setor/lotacao do empregado na tabela 
    2714                                         (preferences.departmentShow && ccTree.catalog_perms == 1 ? '<td align="center" nowrap><span style="solid #999; font-weight: normal; font-size: 10px;height: 10px" id="' + id + ':cc_department"></span></td>' : '') + 
     2772                                        (preferences.departmentShow && ccTree.catalog_perms == 1 ? '<td align="center" name="cc_name_title" nowrap><span style="solid #999; font-weight: normal; font-size: 10px;height: 10px" id="' + id + ':cc_title"></span></td>' : '') + 
    27152773                                        ( ccTree.catalog_perms == 1 ? 
    2716                                         '<td align="left"><span valign="bottom" id="' + id + ':cc_icon_data"></span></td>':'') +                                         
     2774                                        '<td align="center" width="10%"><span valign="bottom" id="' + id + ':cc_icon_data"></span></td>':'') +                                   
    27172775                                        (ccTree.catalog_perms & 2 ? 
    2718                                         '<td align="left" >'+ 
     2776                                        '<td align="center" width="10%" >'+ 
    27192777                                        '<img  title="'+Element('cc_msg_card_edit').value+'" id="' + id + ':cc_card_edit" style=" cursor: pointer; cursor: hand; z-index: 1;width: 18px; height: 18px;"  onclick="editContact(Element(\'' + id + ':cc_id\').value);" src="templates/default/images/cc_card_edit.png">' + 
    27202778                                        '&nbsp;&nbsp;|&nbsp;&nbsp;'+ 
     
    27222780                                        '<input id="' + id + ':cc_id" type="hidden">'+ 
    27232781                                        '<input type="hidden" id="' + id + ':cc_photo">' + 
    2724                                         '<span id="' + id + ':cc_title" style="display:none"></span>' + 
     2782                                        //'<span id="' + id + ':cc_mobile" style="display:none"></span>' + 
    27252783                                        '<span id="' + id + ':cc_alias" style="display:none"></span>' + 
    27262784                                        // Esse campo é necessário se o contato possui dados no campo cc_company 
  • trunk/contactcenter/js/ccAddGroup.js

    r4769 r5131  
    128128                        if (data['status'] != 'ok' && data['status'] != 'warning') 
    129129                        { 
     130                                showMessage(Element('cc_msg_err_duplicate_group').value); 
    130131                                return; 
    131132                        } 
     
    205206                         
    206207                this.title.value = '';                           
     208                ccAGSearchTerm.value = ''; 
    207209        } 
    208210         
     
    240242 
    241243                                for(var j = 0;j < select_in.options.length; j++) {                                                                                                                                                       
    242                                         if(select_in.options[j].value == select.options[i].value){ 
     244                                        if((select_in.options[j].value == select.options[i].value) && (select_in.options[j].textContent == select.options[i].textContent)){ 
    243245                                                isSelected = true;                                               
    244                                                 break;   
     246                                                //break;         
    245247                                        } 
    246248                                } 
     
    346348 
    347349            var search_for = data['search_for'].split(' '); 
    348             var greaterThan4 = false; 
    349             var use_length = v_min; 
    350  
    351             for (i = 0; i < search_for.length; i++) 
    352             { 
    353                 if (search_for[i].length >= use_length) 
    354                 { 
    355                     greaterThan4 = true; 
    356                 } 
    357             } 
    358  
    359             if (!greaterThan4){ 
    360                 alert("Favor fazer a consulta com pelo menos " + v_min + " caracteres!"); 
    361                 return; 
    362             } 
     350            //var greaterThan4 = false; 
     351            //var use_length = v_min; 
     352 
     353            //for (i = 0; i < search_for.length; i++) 
     354            //{ 
     355            //    if (search_for[i].length >= use_length) 
     356            //    { 
     357            //        greaterThan4 = true; 
     358            //    } 
     359            //} 
     360 
     361            // if (!greaterThan4){ 
     362            //     alert("Favor fazer a consulta com pelo menos " + v_min + " caracteres!"); 
     363                        //     return; 
     364            // } 
    363365 
    364366            var handler = function(data) 
     
    435437                { 
    436438                   ccAddGroup.clearSourceList(); 
     439                                   if (catalogLevel == '0.2') 
     440                                                ccAddGroup.search(); 
    437441                } 
    438442 
  • trunk/contactcenter/js/ccIEContacts.js

    r3334 r5131  
    4747                        this.el.style.top = "0px"; 
    4848                        this.el.style.width = this.wWidth       + 'px'; 
    49                         this.el.style.height = this.wHeight + 'px'; 
     49                        this.el.style.height = this.wHeight + 100+'px'; 
    5050                        if(is_ie) { 
    51                                 this.el.style.width = "430"; 
     51                                this.el.style.width = "650"; 
    5252                                this.el.style.overflowY = "auto";        
    5353                                this.el.style.overflowX = "hidden"; 
    5454                        }                                                                                                        
    5555                        else {                                                                   
     56                                this.el.style.overflowY = "auto"; 
    5657                                this.el.style.overflow = "-moz-scrollbars-vertical"; 
    5758                        } 
     
    7576                        var lang_outl2k_pt = Element('cc_msg_outlook_2k_pt').value; 
    7677                        var lang_outl2k_en = Element('cc_msg_outlook_2k_en').value; 
     78                        var lang_outl03 = Element('cc_msg_outlook_2003').value; 
    7779                        var lang_expresso_default_csv = Element('cc_msg_expresso_default_csv').value; 
    7880 
    7981                 
    8082                        this.el.innerHTML =  
    81                         '<div align="left" id="divAppbox"><table width="100%" border=0>'+ 
     83                        '<div align="left" id="divAppbox" width="90%" ><table width="100%" border=0>'+ 
    8284                        '<tr><td style="border-bottom:1px solid black"><input onclick="javascript:ccIEContacts.changeOptions(this.value)" id="type" type="radio" name="type" value="i" style="border:0" checked>'+lang_import_contacts+ 
    8385                        '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input onclick="javascript:ccIEContacts.changeOptions(this.value)" id="type" type="radio" name="type" style="border:0" value="e"/>'+lang_export_contacts+' <br></td></tr>'+ 
    8486                        '</table>'+ 
    85                         '<table border=0 height="208px"  width="100%" id="import_span">'+ 
     87                        '<table border=0 height="100%"  width="100%" id="import_span">'+ 
    8688                        '<tr><td>'+ 
    8789                        '<font color="DARKBLUE" size="2">'+lang_expresso_info_csv+'</font></td></tr>'+ 
     
    9193                        '<option value="outlook">'+("Outlook Express")+'</option>'+ 
    9294                        '<option value="outlook2000">'+("Outlook 2000")+'</option>'+ 
     95                        '<option value="outlook2003">'+("Outlook 2003")+'</option>'+ 
    9396                        '<option value="thunderbird">'+("Mozilla Thunderbird")+'</option>'+ 
    9497                        '<option value="expresso" selected>'+lang_expresso_default+'</option></select><br>'+ 
     
    102105                        '<input type="button" value='+lang_close_win+' onClick="javascript:ccIEContacts.close()"></center></td></tr>'+ 
    103106                        '<tr><td height="10px" align="center" nowrap><span style="visibility:hidden" id="s_info2"></span></td></tr></table>'+ 
    104                         '<table border=0  height="208px"  width="100%" style="display:none" id="export_span">'+ 
     107                        '<table border=0  height="100%"  width="100%" style="display:none" id="export_span">'+ 
    105108                        '<tr><td>'+                                              
    106109                        '<font color="DARKBLUE" size="2">'+ lang_msg_expresso_info_csv+'</font></td></tr>'+ 
     
    112115                        '<option value="outlook2000_pt-BR">'+lang_outl2k_pt+'</option>'+ 
    113116                        '<option value="outlook2000_en">'+lang_outl2k_en+'</option>'+ 
     117                        '<option value="outlook2003">'+lang_outl03+'</option>'+ 
    114118                        '<option value="thunderbird">'+lang_moz_tb+'</option>'+ 
    115119                        '</select>'+                     
    116120                        '</td></tr>'+ 
    117                         '<tr><td align="center">&nbsp;</td></tr>'+ 
    118121                        '<tr><td nowrap><center><input id="export_button" type="button" value='+lang_export_contacts+ ' onClick="javascript:ccIEContacts.exportCSV(this)">&nbsp;&nbsp;&nbsp;&nbsp;'+ 
    119122                        '<input type="button" value='+lang_close_win+ ' onClick="javascript:ccIEContacts.close()"></center></td></tr>'+ 
     
    121124                }                
    122125                this.showWindow(); 
     126                if(Element('s_info')) 
     127                        Element('s_info').style.visibility = 'hidden'; 
     128                ccIEContacts.cleanInfo(); 
    123129        } 
    124130         
     
    131137                                content_id: this.el.id, 
    132138                                width: (this.wWidth +(is_ie ? 41 : 0))  +'px', 
    133                                 height: this.wHeight +'px', 
     139                                height: this.wHeight +100+'px', 
    134140                                title_color: '#3978d6', 
    135141                                bg_color: '#eee', 
     
    166172                var l_2         = '<font face="Verdana" size="1" color="RED">['+args[2]+lang_failure+']</font>'; 
    167173                var l_3         = '<font face="Verdana" size="1" color="DARKBLUE">['+args[3]+lang_exists+']</font>'; 
     174                if(args[2]) 
    168175                var l_4         = '<br><a font face="Verdana" size="1" href="javascript:ccIEContacts.showFailures(\''+args[4]+'\')">'+lang_show_more_info+'</a>'; 
    169176                var l_error     = '<span style="height:15px;background:#cc4444">&nbsp;&nbsp;<font face="Verdana" size="1" color="WHITE">'+lang_import_fail+ '&nbsp;</font></span>'; 
     
    172179                if(args[0] == 'success') { 
    173180 
    174                         for(i = 1; i < 5; i++) { 
     181                        for(i = 1; i < 4; i++) { 
    175182                                status += "&nbsp;"+eval('l_'+i); 
     183                        } 
     184                        if(args[2]){ 
     185                                status += "&nbsp;"+eval('l_4'); 
    176186                        } 
    177187                        Element('s_info').innerHTML = '&nbsp;&nbsp;<font face="Verdana" size="1" color="BLACK"><b>'+lang_import_finish+'</b></font><br>&nbsp;'+status; 
     
    200210        cIEContacts.prototype.importCSV = function () 
    201211        {                
     212                ccIEContacts.cleanInfo(); 
    202213                var lang_msg_invalid_csv = Element('cc_msg_invalid_csv').value; 
    203214                var form = document.formCSV; 
     
    223234                                args[3] = data._existing ? data._existing : 0; 
    224235                                args[4] = data._failure_status 
    225  
     236                                if(args[1] > 0) 
     237                                        ccTree.setCatalog("0.0"); 
    226238                        } 
    227239                        _this.importWriteStatus(args); 
  • trunk/contactcenter/js/ccListParticipants.js

    r880 r5131  
    5555                if(names.length) { 
    5656                        for (var d = 0; d < (names.length-1); d++) {                                                                                                                                                                                                                                                                                                     
     57                                var email_valido = email[d] != 'null' ? email[d] : "não informado"                                                                                                                                                                                                                                                                                               
    5758                                el.innerHTML +=  
    5859                                "<font color='DARKBLUE'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+ 
    5960                                        "\"" + names[d]+ "\"" + 
    60                                         " &lt;"+email[d]+ 
     61                                        " &lt;"+email_valido+ 
    6162                                        "&gt;</font>&nbsp;&nbsp;&nbsp;<br>";                                                                                                                                     
    6263                        } 
  • trunk/contactcenter/js/ccMain.js

    r3795 r5131  
    2222                var search_params = new Array(); 
    2323                search_params['holder'] = Element('cc_panel_search_call'); 
    24                 search_params['total_width'] = (v_label != false &  v_atrib != false)? '485px' : '330px'; 
     24                search_params['total_width'] = (v_label != false &  v_atrib != false)? '485px' : '335px'; 
    2525                search_params['input_width'] = '200px'; 
    2626                search_params['progress_top'] = '150px'; 
  • trunk/contactcenter/js/ccQuickAdd-plugin.js

    r4721 r5131  
    202202                } 
    203203                //Utiliza expressão regular para validar email 
    204                 if (this._fields[4].value != '') { 
    205                         var reEmail = /^[A-Za-z\d_-]+(\.[A-Za-z\d_-]+)*@(([A-Za-z\d][A-Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/; 
     204                if (this._fields[4].value != ''){ 
     205                        var reEmail = /^[a-zA-Z0-9][_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{1,})*$/; 
    206206                         
    207207                        if (sdata[4] !== "" && !reEmail.test(this._fields[4].value)) { 
     
    211211                        } 
    212212                } 
    213                 else if(this._fields[3].value=='') { 
    214                         alert(Element('cc_msg_tel_or_mail_required').value); 
    215                         return false; 
    216                 } 
     213                sdata[4] = sdata[4].toLowerCase(); 
    217214                var sdata = 'add='+escape(serialize(sdata)); 
    218215 
  • trunk/contactcenter/js/cc_config.js

    r4548 r5131  
    2222        function cc_attribute_clear(form) 
    2323        { 
    24  
    25                 var vars = document.getElementsByClassName("cc_attribute"); 
    26                  
    27                 var tupla; 
    28                 var select; 
    29                 var inputs; 
    30                  
    31                 for (var i=0; i<vars.length; i++) {      
    32                         tupla = vars[i]; 
    33                         inputs = tupla.getElementsByTagName("input"); 
    34                          
    35                         if(inputs[0].value == "" || inputs[1].value == "")  
    36                         {                
    37                                 //tupla.parentNode.removeChild(tupla); 
    38                                 inputs[0].setAttribute("value", ""); 
    39                                 inputs[1].setAttribute("value", ""); 
    40                                  
    41                                 select = tupla.getElementsByTagName("select"); 
    42                                 select[0].innerHTML = "<option value=\"\" selected=\"selected\"></option>"; 
    43                                 select[1].innerHTML = "<option value=\"\" selected=\"selected\"></option>"; 
    44                                  
    45                                 tupla.style.visible = "hidden"; 
    46                                 tupla.style.display = "none"; 
    47                         } 
    48                 } 
    4924                form.submit(); 
    5025        } 
     
    6035        function cc_attribute_add() 
    6136        { 
    62                 var stringTexto = document.getElementsByClassName("cc_attribute")[0].getElementsByTagName("select")[0].getElementsByTagName("option")[0].innerHTML; 
    63                 var stringMultivalorado = document.getElementsByClassName("cc_attribute")[0].getElementsByTagName("select")[0].getElementsByTagName("option")[1].innerHTML 
     37                var stringTexto = document.getElementById('textHidden').value; 
     38                var stringMultivalorado = document.getElementById('multitextHidden').value; 
     39                var stringYes = document.getElementById('yesHidden').value; 
     40                var stringNo = document.getElementById('noHidden').value; 
     41                var stringDelete = document.getElementById('deleteHidden').value; 
    6442                 
    6543                var numeroAtributo = 0; 
    66                 var vars = document.getElementsByClassName("cc_attribute"); 
     44                var table = document.getElementsByName("cc_newconftable"); 
     45                var vars = table[0].getElementsByTagName("TR");  
    6746                 
    6847                var maior = 0; 
    69                 for (var i=0; i<vars.length; i++) { 
     48                for (var i=1; i<vars.length; i++) { 
    7049                        var tupla = vars[i]; 
    7150                        var linhaIndice = tupla.getElementsByTagName("input")[0]; 
     
    8867                var cc_attribute_searchable = "newsettings[cc_attribute_searchable_" + numeroAtributo + "]"; 
    8968                 
    90                 var pool = document.getElementById("cc_attribute_fields"); 
    91                 var btn = document.getElementById("c_attribute_box_adder"); // nome do id definido no template. 
     69                var pool = document.getElementById("cc_newconftable"); 
    9270                 
    93                 var newDiv = document.createElement("div"); 
    94                         newDiv.setAttribute("class", "cc_attribute"); 
     71                //LINHA DOS CAMPOS 
     72                var tudo = document.createElement("TR"); 
    9573         
    96                 var formularioNome = document.createElement("input"); 
    97                         formularioNome.setAttribute("type", "text"); 
    98                         formularioNome.setAttribute("name", cc_attribute_name); 
    99                         formularioNome.setAttribute("value", ""); 
    100                         formularioNome.setAttribute("style", "width: 170px;"); 
    101          
    102                 var formularioLdap = document.createElement("input"); 
    103                         formularioLdap.setAttribute("type", "text"); 
    104                         formularioLdap.setAttribute("name", cc_attribute_ldapname); 
    105                         formularioLdap.setAttribute("value", ""); 
    106                         //formularioLdap.setAttribute("style", "margin: 0px 40px;"); 
    107                         formularioLdap.setAttribute("style", "width: 170px;"); 
     74                //INPUT DO NOME 
     75                var tudoBody1 = document.createElement("TD"); 
     76                tudoBody1.innerHTML = "<input type=\"text\" name=\""+cc_attribute_name+"\" value=\"\" style=\"width:170px;\" />"; 
     77                tudo.appendChild(tudoBody1); 
     78                 
     79                //INPUT CORRESPONDENTE 
     80                var tudoBody2 = document.createElement("TD"); 
     81                tudoBody2.innerHTML = "<input type=\"text\" name=\""+cc_attribute_ldapname+"\" value=\"\" style=\"width:170px;\" />"; 
     82                tudo.appendChild(tudoBody2); 
     83                 
     84                //TD SELECT MULTI OR TEXT  
     85                var tudoBody3 = document.createElement("TD"); 
     86                        //SELECT MULTI OR TEXT  
     87                        var select1 = document.createElement("SELECT"); 
     88                        select1.name = cc_attribute_type; 
     89                        select1.style.width = "86px"; 
     90                        select1.style.margin = "0px 0px 0px 8px"; 
     91                        //OPTION TEXT 
     92                        var option1 = document.createElement("OPTION"); 
     93                        option1.innerHTML = stringTexto; 
     94                        option1.value = "text"; 
     95                        //OPTION MULTI 
     96                        var option2 = document.createElement("OPTION"); 
     97                        option2.innerHTML = stringMultivalorado; 
     98                        option2.value = "multivalues"; 
     99                        //ADD OPTIONs TO SELECT 
     100                        select1.appendChild(option1); 
     101                        select1.appendChild(option2); 
     102                        //ADD SELECT TO TD 
     103                        tudoBody3.appendChild(select1); 
     104                        //ADD TD TO TR 
     105                        tudo.appendChild(tudoBody3); 
     106                         
     107                //TD SELECT YES OR NO  
     108                var tudoBody4 = document.createElement("TD"); 
     109                        //SELECT YES OR NO  
     110                        var select2 = document.createElement("SELECT"); 
     111                        select2.name = cc_attribute_searchable; 
     112                        select2.style.margin = "0px 16px"; 
     113                        //OPTION YES 
     114                        var option3 = document.createElement("OPTION"); 
     115                        option3.innerHTML = stringYes; 
     116                        option3.value = "true"; 
     117                        //OPTION NO 
     118                        var option4 = document.createElement("OPTION"); 
     119                        option4.selected = "selected"; 
     120                        option4.innerHTML = stringNo; 
     121                        option4.value = "false"; 
     122                        //ADD OPTIONs TO SELECT 
     123                        select2.appendChild(option3); 
     124                        select2.appendChild(option4); 
     125                        //ADD SELECT TO TD 
     126                        tudoBody4.appendChild(select2); 
     127                        //ADD TD TO TR 
     128                        tudo.appendChild(tudoBody4); 
     129                 
     130                //TD IMG                 
     131                var tudoBody5 = document.createElement("TD"); 
     132                tudoBody5.innerHTML = "<img src=\"contactcenter/templates/default/images/cc_x.png\" title=\""+ stringDelete +"\" alt=\""+ stringDelete +"\" style=\"width: 15px; height: 14px; cursor: pointer; position: relative; top: 3px;\" onclick=\"javascript:cc_attribute_delete(this)\">" 
     133                tudo.appendChild(tudoBody5); 
    108134 
    109                 var selectTipos = document.createElement("select"); 
    110                 selectTipos.setAttribute("name", cc_attribute_type); 
    111                 selectTipos.setAttribute("style", "width: 86px; margin: 0px 0px 0px 8px"); 
    112                 //selectTipos.setAttribute("style", "margin: 0px 0px 0px 8px"); 
    113                         var optionTexto = document.createElement("option"); 
    114                         optionTexto.setAttribute("value", "text"); 
    115                         optionTexto.setAttribute("selected", "selected"); 
    116                         optionTexto.innerHTML = stringTexto + " "; 
    117                  
    118                         var optionMultivalorado = document.createElement("option"); 
    119                         optionMultivalorado.setAttribute("value", "multivalues"); 
    120                         optionMultivalorado.innerHTML = stringMultivalorado + " "; 
    121                          
    122                 selectTipos.appendChild(optionTexto); 
    123                 selectTipos.appendChild(optionMultivalorado); 
    124                                  
    125                 var selectPesquisavel = document.createElement("select"); 
    126                 selectPesquisavel.setAttribute("name", cc_attribute_searchable); 
    127                 selectPesquisavel.setAttribute("style", "margin: 0px 16px;"); 
    128                         var optionYes = document.createElement("option"); 
    129                                 optionYes.setAttribute("value", "true"); 
    130                                 optionYes.innerHTML = "Sim "; 
    131                         var optionNo =  document.createElement("option"); 
    132                                 optionNo.setAttribute("value", "false"); 
    133                                 optionNo.setAttribute("selected", "selected"); 
    134                                 optionNo.innerHTML = "Não "; 
    135                          
    136                                  
    137                 selectPesquisavel.appendChild(optionYes); 
    138                 selectPesquisavel.appendChild(optionNo);                 
    139                                  
    140                                  
    141                                  
    142                 var imagem = document.createElement("img"); 
    143                         imagem.setAttribute("type", "image"); 
    144                         imagem.setAttribute("src", "contactcenter/templates/default/images/cc_x.png"); 
    145                         imagem.setAttribute("alt", "Excluir Campo "); 
    146                         imagem.setAttribute("style", "width: 15px; height: 14px; cursor: pointer; position: relative; top: 3px;"); 
    147                         imagem.setAttribute("onclick", "javascript:cc_attribute_delete(this)"); 
    148          
    149                 newDiv.appendChild(formularioNome); 
    150                 newDiv.appendChild(document.createTextNode(" ")); 
    151                 newDiv.appendChild(formularioLdap); 
    152                 newDiv.appendChild(document.createTextNode(" ")); 
    153                 newDiv.appendChild(selectTipos); 
    154                 newDiv.appendChild(document.createTextNode(" ")); 
    155                 newDiv.appendChild(selectPesquisavel); 
    156                 newDiv.appendChild(document.createTextNode(" ")); 
    157                 newDiv.appendChild(imagem); 
    158  
    159                 pool.appendChild(newDiv); 
     135                pool.appendChild(tudo); 
    160136        } 
    161137         
     
    170146        { 
    171147                        var tupla = e.parentNode; 
    172                          
     148                        tupla = tupla.parentNode; 
     149                        var mom = tupla.parentNode; 
    173150                        var inputs = tupla.getElementsByTagName("input"); 
    174151 
  • trunk/contactcenter/js/cc_search.js

    r4548 r5131  
    270270                        target.appendChild( holder ); 
    271271                         
    272                         this.win = new dJSWin({ 
     272                        this.win = win = new dJSWin({ 
    273273                                        id: 'ccSearch_Layer2', 
    274274                                        content_id: 'Layer2', 
     
    380380                        data['search_for'] = cn; 
    381381 
    382                     customFilterDiv.style.visibility = 'hidden'; 
     382                    win.close(); 
    383383                    document.getElementById('overlay').style.visibility = 'hidden'; 
    384384                } 
Note: See TracChangeset for help on using the changeset viewer.