Changeset 2722 for trunk/expressoMail1_2/js/jscode
- Timestamp:
- 05/06/10 15:25:02 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/jscode/draw_api_messages.js
r2718 r2722 147 147 { 148 148 expresso.connector.loadScript("jscode/ccQuickAdd"); 149 var id=this.id; 149 150 150 151 var array_addrs = ''; … … 176 177 var sm_envelope_img1 = '<img style="cursor:'+ (is_ie ? 'hand' : 'pointer') +'" title="' + get_lang("Add Contact") + 177 178 '" onclick="ccQuickAddOne.showList(\''+cc_data+'\')" src="' + URL_SERVER + 'expressoMail1_2/templates/'+template+'/images/user_card.png">'; 178 var to_addybook_add = "<SPAN id='insert_plugin_"+idx_cc+"_"+ this.id+"'>";179 var to_addybook_add = "<SPAN id='insert_plugin_"+idx_cc+"_"+id+"'>"; 179 180 to_addybook_add += addrs; 180 181 to_addybook_add += sm_envelope_img1; … … 265 266 else 266 267 _name = info_msg.from.email.length > _maxChar ? info_msg.from.email.substring(0,_maxChar) + "..." : info_msg.from.email; 267 268 var id = this.id; 268 269 td.innerHTML = _name.bold() + ', ' + info_msg.udate; 269 270 if (info_msg.attachment.names.length > 0) 270 td.innerHTML += " <img style='cursor:pointer' onclick='javascript:Element(\"option_hide_more_"+ this.id+"\").onclick()' src ='" + URL_SERVER + "expressoMail1_2/templates/"+template+"/images/clip.gif' title='"+info_msg.attachment.names+"'>";271 td.innerHTML += " <img style='cursor:pointer' onclick='javascript:Element(\"option_hide_more_"+id+"\").onclick()' src ='" + URL_SERVER + "expressoMail1_2/templates/"+template+"/images/clip.gif' title='"+info_msg.attachment.names+"'>"; 271 272 272 273 if (typeof(info_msg.signature) == 'string') … … 287 288 { 288 289 var options = createAndSet("TD",['noWrap','width','align'],['true','30%','right']); 289 var option_hide_more = createAndSet("SPAN",['class','value','id'],['message_options','more_options','option_hide_more_'+ this.id],get_lang('show details'));290 var option_hide_more = createAndSet("SPAN",['class','value','id'],['message_options','more_options','option_hide_more_'+id],get_lang('show details')); 290 291 option_hide_more.onclick = function(){ 291 292 try{ 292 var _height = Element("div_message_scroll_"+ this.id).style.height;293 var _height = Element("div_message_scroll_"+id).style.height; 293 294 } 294 295 catch(e){ … … 300 301 this.innerHTML = "<b><u>"+get_lang('hide details')+"</u></b>"; 301 302 this.value = 'hide_options'; 302 Element("div_message_scroll_"+ this.id).style.height = (_height - _offset)+"px";303 Element('table_msg_details_'+ this.id).style.display = '';303 Element("div_message_scroll_"+id).style.height = (_height - _offset)+"px"; 304 Element('table_msg_details_'+id).style.display = ''; 304 305 305 306 } … … 307 308 this.innerHTML = get_lang('show details'); 308 309 this.value = 'more_options'; 309 Element("div_message_scroll_"+ this.id).style.height = (_height + _offset)+"px";310 Element('table_msg_details_'+ this.id).style.display = 'none';310 Element("div_message_scroll_"+id).style.height = (_height + _offset)+"px"; 311 Element('table_msg_details_'+id).style.display = 'none'; 311 312 } 312 313 }; … … 409 410 var option_hide_more = createAndSet("SPAN",['class','value','id'],['message_options','more_options','option_hide_more_'+this.id],get_lang('Show details')); 410 411 option_hide_more.onclick = function(){ 411 var _height = Element("div_message_scroll_"+ this.id).style.height;412 var _height = Element("div_message_scroll_"+id).style.height; 412 413 _height = parseInt(_height.replace("px","")); 413 414 var _offset = 35; … … 415 416 this.innerHTML = "<b><u>"+get_lang('Hide details')+"</u></b>"; 416 417 this.value = 'hide_options'; 417 Element("div_message_scroll_"+ this.id).style.height = (_height - _offset)+"px";418 Element('table_msg_details_'+ this.id).style.display = '';418 Element("div_message_scroll_"+id).style.height = (_height - _offset)+"px"; 419 Element('table_msg_details_'+id).style.display = ''; 419 420 } 420 421 else{ 421 422 this.innerHTML = get_lang('show details'); 422 423 this.value = 'more_options'; 423 Element("div_message_scroll_"+ this.id).style.height = (_height + _offset)+"px";424 Element('table_msg_details_'+ this.id).style.display = 'none';424 Element("div_message_scroll_"+id).style.height = (_height + _offset)+"px"; 425 Element('table_msg_details_'+id).style.display = 'none'; 425 426 } 426 427 }; … … 470 471 var td1 = createAndSet('TD',['width'],['7%'],get_lang("From: ")); 471 472 td1.appendChild(deny_email(info_msg.from.email)); 473 var id=this.id; 472 474 473 475 if (info_msg.sender){ … … 478 480 var sender = document.createElement("TD"); 479 481 sender.className = "header_message_field"; 480 sender.id = "sender_"+ this.id;481 sender.innerHTML += this.draw_plugin_cc( this.id,info_msg.sender.full);482 var sender_values = createAndSet("INPUT",['id','type','value'],["sender_values_"+ this.id,"HIDDEN",info_msg.sender.full]);482 sender.id = "sender_"+id; 483 sender.innerHTML += this.draw_plugin_cc(info_msg.sender.full); 484 var sender_values = createAndSet("INPUT",['id','type','value'],["sender_values_"+id,"HIDDEN",info_msg.sender.full]); 483 485 484 486 tbody_message_others_options.appendChild(appendChilds(tr111, td111, sender, sender_values)); … … 488 490 489 491 if (info_msg.Draft != "X"){ 490 from.innerHTML += this.draw_plugin_cc( this.id,info_msg.from);492 from.innerHTML += this.draw_plugin_cc(info_msg.from); 491 493 tbody_message_others_options.appendChild(tr1); 492 494 } … … 499 501 tr11.className = "tr_message_header"; 500 502 var _td11 = createAndSet('TD',['noWrap'],['true'],get_lang("Reply to")+": "); 501 var _reply_to = createAndSet('TD',['id', 'class'],["reply_to_"+ this.id, "header_message_field"],this.draw_plugin_cc(this.id,info_msg.reply_to));502 var _reply_to_values = createAndSet('INPUT',['id', 'type', 'value'],["reply_to_values_"+ this.id,"HIDDEN",info_msg.reply_to]);503 var _reply_to = createAndSet('TD',['id', 'class'],["reply_to_"+id, "header_message_field"],this.draw_plugin_cc(info_msg.reply_to)); 504 var _reply_to_values = createAndSet('INPUT',['id', 'type', 'value'],["reply_to_values_"+id,"HIDDEN",info_msg.reply_to]); 503 505 tbody_message_others_options.appendChild(appendChilds(tr11,_td11,_reply_to,_reply_to_values)); 504 506 } … … 509 511 td2.innerHTML = get_lang("To: "); 510 512 var to = document.createElement("TD"); 511 to.id = "to_"+ this.id;512 513 var _to_values = createAndSet('INPUT',['id', 'type', 'value'],["to_values_"+ this.id, "HIDDEN", info_msg.toaddress2]);513 to.id = "to_"+id; 514 515 var _to_values = createAndSet('INPUT',['id', 'type', 'value'],["to_values_"+id, "HIDDEN", info_msg.toaddress2]); 514 516 // Salva a pasta da mensagem 515 var _input_cfolder = createAndSet('INPUT',['id', 'name', 'type', 'value'],["input_folder_"+ this.id, "input_folder", "hidden", info_msg.msg_folder]);517 var _input_cfolder = createAndSet('INPUT',['id', 'name', 'type', 'value'],["input_folder_"+id, "input_folder", "hidden", info_msg.msg_folder]); 516 518 td2.appendChild(_input_cfolder); 517 519 518 toaddress_array[ this.id] = info_msg.toaddress2.split(",");519 if (toaddress_array[ this.id].length > 1){520 to.innerHTML += this.draw_plugin_cc(t his.id, toaddress_array[this.id][0]);521 var _div_toaddrs = createAndSet('SPAN',['id','style'],["div_toaddress_"+ this.id,'display: inline']," (<a STYLE='color: RED;' onclick=javascript:show_div_address_full('"+this.id+"','to');>"+get_lang('more')+"</a>)");520 toaddress_array[id] = info_msg.toaddress2.split(","); 521 if (toaddress_array[id].length > 1){ 522 to.innerHTML += this.draw_plugin_cc(toaddress_array[id][0]); 523 var _div_toaddrs = createAndSet('SPAN',['id','style'],["div_toaddress_"+id,'display: inline']," (<a STYLE='color: RED;' onclick=javascript:show_div_address_full('"+id+"','to');>"+get_lang('more')+"</a>)"); 522 524 to.appendChild(_div_toaddrs); 523 525 } 524 526 else { 525 to.innerHTML += this.draw_plugin_cc(t his.id,toaddress_array[this.id]);527 to.innerHTML += this.draw_plugin_cc(toaddress_array[id]); 526 528 } 527 529 to.className = "header_message_field"; … … 541 543 div_ccaddress.id = "div_ccaddress_"+this.id; 542 544 var div_ccaddress_full = createAndSet("SPAN",['id', 'style'],["div_ccaddress_full_"+this.id, "display: inline"]); 543 cc.innerHTML = this.draw_plugin_cc( this.id,ccaddress_array[this.id][0]);545 cc.innerHTML = this.draw_plugin_cc(ccaddress_array[this.id][0]); 544 546 div_ccaddress.innerHTML += " (<a STYLE='color: RED;' onclick=javascript:show_div_address_full('"+this.id+"','cc');>"+get_lang('more')+"</a>)"; 545 547 cc.appendChild(div_ccaddress); 546 548 } 547 549 else{ 548 cc.innerHTML = this.draw_plugin_cc( this.id,info_msg.cc);550 cc.innerHTML = this.draw_plugin_cc(info_msg.cc); 549 551 } 550 552 tbody_message_others_options.appendChild(appendChilds(tr3,td3,cc,cc_values)); … … 1633 1635 1634 1636 for(var idx = 1 ; idx < _address.length;idx++) { 1635 div_address_full.innerHTML += isOverLimit ? '<br>'+_address[idx] : ','+this.draw_plugin_cc( id,_address[idx]);1637 div_address_full.innerHTML += isOverLimit ? '<br>'+_address[idx] : ','+this.draw_plugin_cc(_address[idx]); 1636 1638 } 1637 1639 div_address_full.innerHTML += " (<a STYLE='color: RED;' onclick=document.getElementById('div_"+type+"address_full_"+id+"').style.display='none';document.getElementById('div_"+type+"address_"+id+"').style.display='';>"+get_lang('less')+"</a>)";
Note: See TracChangeset
for help on using the changeset viewer.