Changeset 5229
- Timestamp:
- 12/01/11 13:22:22 (13 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/index.php
r5134 r5229 165 165 $template->set_var("msg_number",$_GET['msgball']['msgnum'] ? $_GET['msgball']['msgnum'] : $_GET['to']); 166 166 $template->set_var("user_email",$_SESSION['phpgw_info']['expressomail']['user']['email']); 167 include_once $_SESSION['rootPath'] . '/header.inc.php'; 168 require_once $_SESSION['rootPath'] . '/API/class.servicelocator.php'; 169 $alternativeMailService = ServiceLocator::getService('ldap'); 170 $AlternateEmailExpresso = Array(); 171 $AlternateEmailExpresso = $alternativeMailService->getMailAlternateByUidNumber($_SESSION['phpgw_info']['expressomail']['user']['account_id']); 172 $template->set_var("user_email_alternative", implode(",", $AlternateEmailExpresso)); 167 173 $acc = CreateObject('phpgwapi.accounts'); 168 174 $template->set_var("user_organization", $acc->get_organization($GLOBALS['phpgw_info']['user']['account_dn'])); -
trunk/expressoMail1_2/js/main.js
r5221 r5229 1265 1265 RichTextEditor.editorReady = false; 1266 1266 1267 1267 1268 1268 if (Element('show_img_link_'+border_ID)) 1269 1269 { … … 1342 1342 if (document.getElementById("to_values_" + border_ID)){ 1343 1343 data.to_all = document.getElementById("to_values_" + border_ID).value; 1344 data.to_all_alternative = document.getElementById("user_email_alternative").value; 1344 1345 data.to_all = data.to_all.replace(/\n/gi," "); 1345 1346 data.to_all = data.to_all.replace(/</gi,"<"); 1346 1347 data.to_all = data.to_all.replace(/>/gi,">"); 1347 1348 var _array_to_all = data.to_all.split(","); 1349 var _array_to_alternative = data.to_all_alternative.split(","); 1348 1350 } 1349 1351 } … … 1443 1445 } 1444 1446 } 1447 for(i = 0; i < _array_to_alternative.length; i++) { 1448 for(k = 0; k < data.to_all.length; k++){ 1449 if(data.to_all[k].replace(/^\s+|\s+$/g,"") == _array_to_alternative[i]) 1450 data.to_all.splice( k , 1); 1451 } 1452 } 1445 1453 data.to_all = data.to_all.join(","); 1446 1454 … … 1450 1458 Element("to_" + new_border_ID).value += ', ' + data.to_all; 1451 1459 if (data.cc){ 1460 data.cc = new Array(); 1461 var j = 0; 1462 for(i = 0; i < _array_cc.length; i++) { 1463 if(_array_cc[i].lastIndexOf(Element("user_email").value) == "-1"){ 1464 data.cc[j++] = _array_cc[i]; 1465 } 1466 } 1467 for(i = 0; i < _array_to_alternative.length; i++) { 1468 for(k = 0; k < data.cc.length; k++){ 1469 if(data.cc[k].replace(/^\s+|\s+$/g,"") == _array_to_alternative[i]) 1470 data.cc.splice( k , 1); 1471 } 1472 } 1452 1473 Element("cc_" + new_border_ID).value = data.cc; 1453 1474 Element("a_cc_link_" + new_border_ID).style.display='none'; … … 1483 1504 } 1484 1505 } 1485 if (data.to_all != get_lang("undisclosed-recipient")) 1486 data.to_all = data.to_all.join(","); 1487 else 1506 for(i = 0; i < _array_to_alternative.length; i++) { 1507 for(k = 0; k < data.to_all.length; k++){ 1508 if(data.to_all[k].replace(/^\s+|\s+$/g,"") == _array_to_alternative[i]) 1509 data.to_all.splice( k , 1); 1510 } 1511 } 1512 if (data.to_all != get_lang("undisclosed-recipient")) 1513 data.to_all = data.to_all.join(","); 1514 else 1488 1515 data.to_all = ""; 1489 1516 title = "Re: " + data.subject; 1490 1517 Element("to_" + new_border_ID).value = data.to; 1518 1491 1519 Element("to_" + new_border_ID).value += ', ' + data.to_all; 1492 1520 … … 1495 1523 var j = 0; 1496 1524 for(i = 0; i < _array_cc.length; i++) { 1497 if(_array_cc[i].lastIndexOf(Element("user_email").value) == "-1"){ 1498 data.cc[j++] = _array_cc[i]; 1499 } 1500 } 1501 if (data.cc != get_lang("undisclosed-recipient")) 1502 data.cc = data.cc.join(","); 1503 else 1504 data.cc = ""; 1525 if(_array_cc[i].lastIndexOf(Element("user_email").value) == "-1"){ 1526 data.cc[j++] = _array_cc[i]; 1527 } 1528 } 1529 for(i = 0; i < _array_to_alternative.length; i++) { 1530 for(k = 0; k < data.cc.length; k++){ 1531 if(data.cc[k].replace(/^\s+|\s+$/g,"") == _array_to_alternative[i]) 1532 data.cc.splice( k , 1); 1533 } 1534 } 1535 if (data.cc != get_lang("undisclosed-recipient")) 1536 data.cc = data.cc.join(","); 1537 else 1538 data.cc = ""; 1505 1539 document.getElementById("cc_" + new_border_ID).value = data.cc; 1506 1540 document.getElementById("a_cc_link_" + new_border_ID).style.display='none'; -
trunk/expressoMail1_2/templates/default/index.tpl
r5196 r5229 6 6 <input type="hidden" value="{msg_folder}" id="msg_folder"> 7 7 <input type="hidden" value="{msg_number}" id="msg_number"> 8 <input type="hidden" value="{user_email_alternative}" id="user_email_alternative"> 8 9 <input type="hidden" value="{user_email}" id="user_email"> 9 10 <input type="hidden" value="{user_organization}" id="user_organization">
Note: See TracChangeset
for help on using the changeset viewer.