Changeset 5131 for trunk/contactcenter/js
- Timestamp:
- 11/03/11 11:17:35 (12 years ago)
- Location:
- trunk/contactcenter/js
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/contactcenter/js/cc.js
r4507 r5131 231 231 function openContactDetails(id){ 232 232 // Build the ContactDetails Window. 233 if( !contactdetailsWin&& !is_ie)233 if((typeof(contactdetailsWin) == 'undefined') && !is_ie) 234 234 __cdWin(); 235 235 … … 996 996 for (var type in CC_contact_full_info['connections']){ 997 997 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,})*$/; 998 999 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{ 999 1007 if((CC_contact_full_info['connections'][type][i]['value'].length < 4) || 1000 1008 (!comp.test(CC_contact_full_info['connections'][type][i]['value']))){ … … 1002 1010 return false; 1003 1011 } 1012 } 1004 1013 } 1005 1014 var _options_default = Element("cc_"+(type == 1 ? 'email' : 'phone')+"_default"); … … 1009 1018 } 1010 1019 } 1011 }1012 if(!haveConnections){1013 showMessage(Element('cc_msg_tel_or_mail_required').value);1014 return false;1015 1020 } 1016 1021 … … 1634 1639 //'<td style="width: 30px;" align="right"><input name="cc_conn_is_default" id="cc_conn_is_default_'+ CC_conn_count +'" type="radio"></td>'+ 1635 1640 '<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"> ' +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"> ' + 1637 1642 '<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>'; 1638 1643 } … … 1642 1647 //'<td style="width: 30px;" align="right"><input name="cc_conn_is_default" id="cc_conn_is_default_'+ CC_conn_count +'" type="radio"></td>'+ 1643 1648 '<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)"> ' +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)"> ' + 1645 1650 '<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>'; 1646 1651 } … … 1806 1811 1807 1812 connRemoveLine(id); 1813 } 1814 1815 function emailTolower(obj){ 1816 document.getElementById(obj).value = document.getElementById(obj).value.toLowerCase(); 1817 1808 1818 } 1809 1819 … … 2308 2318 2309 2319 if(data[3][pos][k] === 'none') 2310 data[3][pos][k] = ' ';2320 "Não informado."; 2311 2321 break; 2312 2322 case 'cc_phone' : 2313 2323 2314 2324 if(data[3][pos][k] === 'none') 2315 data[3][pos][k] = ' ';2325 data[3][pos][k] = "Não informado."; 2316 2326 break; 2317 2327 } … … 2352 2362 else 2353 2363 { 2364 if(data[3][pos][k] != "Não informado.") 2354 2365 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>'; 2355 2368 } 2356 2369 break; … … 2366 2379 Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], 20); 2367 2380 } 2381 if(data[3][pos][k] != " ") 2368 2382 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."; 2369 2385 break; 2370 2386 2371 2387 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) 2373 2393 { 2374 2394 Element(id+':'+data[2][k]).innerHTML = adjustString(data[3][pos][k], 15); … … 2380 2400 } 2381 2401 break; 2382 2402 }else{ 2403 break; 2404 } 2383 2405 case 'cc_id': 2384 2406 var id_contact = data[3][pos][k]; … … 2410 2432 //Para tratar tamanho do campo "celular" do empregado 2411 2433 case 'cc_mobile': 2434 if(preferences.cellShow && ccTree.catalog_perms == 1){ 2412 2435 if (data[3][pos][k].length > 20) 2413 2436 { … … 2421 2444 Element(id+':cc_mobile').innerHTML = data[3][pos][k]; 2422 2445 break; 2423 2446 }else{ 2447 break; 2448 } 2424 2449 //Para tratar tamanho do campo "matricula" do empregado 2425 2450 case 'cc_empNumber': 2451 if(preferences.empNumShow && ccTree.catalog_perms == 1){ 2426 2452 if (data[3][pos][k].length > 20) 2427 2453 { … … 2435 2461 Element(id+':cc_empNumber').innerHTML = data[3][pos][k]; 2436 2462 break; 2437 2463 }else{ 2464 break; 2465 } 2438 2466 //Para tratar tamanho do campo "departamento" do empregado 2439 2467 case 'cc_department': … … 2461 2489 Element(id+':'+data[2][k]).innerHTML = data[3][pos][k]; 2462 2490 } 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; 2463 2521 } 2464 2522 } … … 2515 2573 { 2516 2574 case 'cc_title': 2517 if (data[3][pos][k].length > 50)2575 if (data[3][pos][k].length > (CC_visual == 'table' ? 50 : 20)) 2518 2576 { 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)); 2520 2578 Element(id+':'+data[2][k]).title = data[3][pos][k]; 2521 2579 } … … 2663 2721 '<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">' : '') + 2664 2722 '<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: 1 4px; 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>' + 2666 2724 '<span style="cursor: pointer; cursor: hand; z-index: 1;position: absolute; top: 100px; left: 35px" valign="bottom" id="' + id + ':cc_icon_group"> </span>'+ 2667 2725 //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>' + 2669 2727 '<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>' + 2671 2729 //Para exibir o setor/lotacao do empregado nos cartoes 2672 2730 '<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>' + … … 2694 2752 '<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1"></span>' + 2695 2753 '<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%">'+ 2698 2756 '<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">' + 2699 2757 ' | '+ … … 2705 2763 html_card = '<tr style="height:20px" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE">' + 2706 2764 //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>' : '') + 2708 2766 '<td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;"><span valign="bottom" id="' + id + ':cc_icon_group"> </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>' + 2711 2769 //Para exibir o celular empresarial do empregado na tabela 2712 (preferences.cellShow && ccTree.catalog_perms == 1 ? '<td align="center" n owrap><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>' : '') + 2713 2771 //Para exibir o setor/lotacao do empregado na tabela 2714 (preferences.departmentShow && ccTree.catalog_perms == 1 ? '<td align="center" n owrap><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>' : '') + 2715 2773 ( 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>':'') + 2717 2775 (ccTree.catalog_perms & 2 ? 2718 '<td align=" left" >'+2776 '<td align="center" width="10%" >'+ 2719 2777 '<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">' + 2720 2778 ' | '+ … … 2722 2780 '<input id="' + id + ':cc_id" type="hidden">'+ 2723 2781 '<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>' + 2725 2783 '<span id="' + id + ':cc_alias" style="display:none"></span>' + 2726 2784 // Esse campo é necessário se o contato possui dados no campo cc_company -
trunk/contactcenter/js/ccAddGroup.js
r4769 r5131 128 128 if (data['status'] != 'ok' && data['status'] != 'warning') 129 129 { 130 showMessage(Element('cc_msg_err_duplicate_group').value); 130 131 return; 131 132 } … … 205 206 206 207 this.title.value = ''; 208 ccAGSearchTerm.value = ''; 207 209 } 208 210 … … 240 242 241 243 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)){ 243 245 isSelected = true; 244 break;246 //break; 245 247 } 246 248 } … … 346 348 347 349 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 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 // } 363 365 364 366 var handler = function(data) … … 435 437 { 436 438 ccAddGroup.clearSourceList(); 439 if (catalogLevel == '0.2') 440 ccAddGroup.search(); 437 441 } 438 442 -
trunk/contactcenter/js/ccIEContacts.js
r3334 r5131 47 47 this.el.style.top = "0px"; 48 48 this.el.style.width = this.wWidth + 'px'; 49 this.el.style.height = this.wHeight + 'px';49 this.el.style.height = this.wHeight + 100+'px'; 50 50 if(is_ie) { 51 this.el.style.width = " 430";51 this.el.style.width = "650"; 52 52 this.el.style.overflowY = "auto"; 53 53 this.el.style.overflowX = "hidden"; 54 54 } 55 55 else { 56 this.el.style.overflowY = "auto"; 56 57 this.el.style.overflow = "-moz-scrollbars-vertical"; 57 58 } … … 75 76 var lang_outl2k_pt = Element('cc_msg_outlook_2k_pt').value; 76 77 var lang_outl2k_en = Element('cc_msg_outlook_2k_en').value; 78 var lang_outl03 = Element('cc_msg_outlook_2003').value; 77 79 var lang_expresso_default_csv = Element('cc_msg_expresso_default_csv').value; 78 80 79 81 80 82 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>'+ 82 84 '<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+ 83 85 ' <input onclick="javascript:ccIEContacts.changeOptions(this.value)" id="type" type="radio" name="type" style="border:0" value="e"/>'+lang_export_contacts+' <br></td></tr>'+ 84 86 '</table>'+ 85 '<table border=0 height=" 208px" width="100%" id="import_span">'+87 '<table border=0 height="100%" width="100%" id="import_span">'+ 86 88 '<tr><td>'+ 87 89 '<font color="DARKBLUE" size="2">'+lang_expresso_info_csv+'</font></td></tr>'+ … … 91 93 '<option value="outlook">'+("Outlook Express")+'</option>'+ 92 94 '<option value="outlook2000">'+("Outlook 2000")+'</option>'+ 95 '<option value="outlook2003">'+("Outlook 2003")+'</option>'+ 93 96 '<option value="thunderbird">'+("Mozilla Thunderbird")+'</option>'+ 94 97 '<option value="expresso" selected>'+lang_expresso_default+'</option></select><br>'+ … … 102 105 '<input type="button" value='+lang_close_win+' onClick="javascript:ccIEContacts.close()"></center></td></tr>'+ 103 106 '<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">'+ 105 108 '<tr><td>'+ 106 109 '<font color="DARKBLUE" size="2">'+ lang_msg_expresso_info_csv+'</font></td></tr>'+ … … 112 115 '<option value="outlook2000_pt-BR">'+lang_outl2k_pt+'</option>'+ 113 116 '<option value="outlook2000_en">'+lang_outl2k_en+'</option>'+ 117 '<option value="outlook2003">'+lang_outl03+'</option>'+ 114 118 '<option value="thunderbird">'+lang_moz_tb+'</option>'+ 115 119 '</select>'+ 116 120 '</td></tr>'+ 117 '<tr><td align="center"> </td></tr>'+118 121 '<tr><td nowrap><center><input id="export_button" type="button" value='+lang_export_contacts+ ' onClick="javascript:ccIEContacts.exportCSV(this)"> '+ 119 122 '<input type="button" value='+lang_close_win+ ' onClick="javascript:ccIEContacts.close()"></center></td></tr>'+ … … 121 124 } 122 125 this.showWindow(); 126 if(Element('s_info')) 127 Element('s_info').style.visibility = 'hidden'; 128 ccIEContacts.cleanInfo(); 123 129 } 124 130 … … 131 137 content_id: this.el.id, 132 138 width: (this.wWidth +(is_ie ? 41 : 0)) +'px', 133 height: this.wHeight + 'px',139 height: this.wHeight +100+'px', 134 140 title_color: '#3978d6', 135 141 bg_color: '#eee', … … 166 172 var l_2 = '<font face="Verdana" size="1" color="RED">['+args[2]+lang_failure+']</font>'; 167 173 var l_3 = '<font face="Verdana" size="1" color="DARKBLUE">['+args[3]+lang_exists+']</font>'; 174 if(args[2]) 168 175 var l_4 = '<br><a font face="Verdana" size="1" href="javascript:ccIEContacts.showFailures(\''+args[4]+'\')">'+lang_show_more_info+'</a>'; 169 176 var l_error = '<span style="height:15px;background:#cc4444"> <font face="Verdana" size="1" color="WHITE">'+lang_import_fail+ ' </font></span>'; … … 172 179 if(args[0] == 'success') { 173 180 174 for(i = 1; i < 5; i++) {181 for(i = 1; i < 4; i++) { 175 182 status += " "+eval('l_'+i); 183 } 184 if(args[2]){ 185 status += " "+eval('l_4'); 176 186 } 177 187 Element('s_info').innerHTML = ' <font face="Verdana" size="1" color="BLACK"><b>'+lang_import_finish+'</b></font><br> '+status; … … 200 210 cIEContacts.prototype.importCSV = function () 201 211 { 212 ccIEContacts.cleanInfo(); 202 213 var lang_msg_invalid_csv = Element('cc_msg_invalid_csv').value; 203 214 var form = document.formCSV; … … 223 234 args[3] = data._existing ? data._existing : 0; 224 235 args[4] = data._failure_status 225 236 if(args[1] > 0) 237 ccTree.setCatalog("0.0"); 226 238 } 227 239 _this.importWriteStatus(args); -
trunk/contactcenter/js/ccListParticipants.js
r880 r5131 55 55 if(names.length) { 56 56 for (var d = 0; d < (names.length-1); d++) { 57 var email_valido = email[d] != 'null' ? email[d] : "não informado" 57 58 el.innerHTML += 58 59 "<font color='DARKBLUE'> "+ 59 60 "\"" + names[d]+ "\"" + 60 " <"+email [d]+61 " <"+email_valido+ 61 62 "></font> <br>"; 62 63 } -
trunk/contactcenter/js/ccMain.js
r3795 r5131 22 22 var search_params = new Array(); 23 23 search_params['holder'] = Element('cc_panel_search_call'); 24 search_params['total_width'] = (v_label != false & v_atrib != false)? '485px' : '33 0px';24 search_params['total_width'] = (v_label != false & v_atrib != false)? '485px' : '335px'; 25 25 search_params['input_width'] = '200px'; 26 26 search_params['progress_top'] = '150px'; -
trunk/contactcenter/js/ccQuickAdd-plugin.js
r4721 r5131 202 202 } 203 203 //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,})*$/; 206 206 207 207 if (sdata[4] !== "" && !reEmail.test(this._fields[4].value)) { … … 211 211 } 212 212 } 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(); 217 214 var sdata = 'add='+escape(serialize(sdata)); 218 215 -
trunk/contactcenter/js/cc_config.js
r4548 r5131 22 22 function cc_attribute_clear(form) 23 23 { 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 }49 24 form.submit(); 50 25 } … … 60 35 function cc_attribute_add() 61 36 { 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; 64 42 65 43 var numeroAtributo = 0; 66 var vars = document.getElementsByClassName("cc_attribute"); 44 var table = document.getElementsByName("cc_newconftable"); 45 var vars = table[0].getElementsByTagName("TR"); 67 46 68 47 var maior = 0; 69 for (var i= 0; i<vars.length; i++) {48 for (var i=1; i<vars.length; i++) { 70 49 var tupla = vars[i]; 71 50 var linhaIndice = tupla.getElementsByTagName("input")[0]; … … 88 67 var cc_attribute_searchable = "newsettings[cc_attribute_searchable_" + numeroAtributo + "]"; 89 68 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"); 92 70 93 var newDiv = document.createElement("div");94 newDiv.setAttribute("class", "cc_attribute");71 //LINHA DOS CAMPOS 72 var tudo = document.createElement("TR"); 95 73 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); 108 134 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); 160 136 } 161 137 … … 170 146 { 171 147 var tupla = e.parentNode; 172 148 tupla = tupla.parentNode; 149 var mom = tupla.parentNode; 173 150 var inputs = tupla.getElementsByTagName("input"); 174 151 -
trunk/contactcenter/js/cc_search.js
r4548 r5131 270 270 target.appendChild( holder ); 271 271 272 this.win = new dJSWin({272 this.win = win = new dJSWin({ 273 273 id: 'ccSearch_Layer2', 274 274 content_id: 'Layer2', … … 380 380 data['search_for'] = cn; 381 381 382 customFilterDiv.style.visibility = 'hidden';382 win.close(); 383 383 document.getElementById('overlay').style.visibility = 'hidden'; 384 384 }
Note: See TracChangeset
for help on using the changeset viewer.