Changeset 2718
- Timestamp:
- 05/06/10 14:38:20 (14 years ago)
- Location:
- trunk/expressoMail1_2/js/jscode
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/jscode/draw_api_messages.js
r2715 r2718 36 36 /* Class draw_message */ 37 37 function draw_message(){ 38 var id=0; 38 39 } 39 draw_message.prototype.createNxtPrevButtons = function(msg_folder, ID,folder_id){40 draw_message.prototype.createNxtPrevButtons = function(msg_folder,folder_id){ 40 41 var next_previous_msg_td = createAndSet("TD",[ "noWrap", "align", "width" ], [ "true", "right", "40px"]); 41 42 var img_next_msg = createAndSet("IMG", [ 'id', 'src', 'title' ], [ 42 'msg_opt_next_' + ID,43 'msg_opt_next_' + this.id, 43 44 URL_SERVER + 'expressoMail1_2/templates/'+template+'/images/down.button.png', 44 45 get_lang('Next') ]); … … 81 82 img_next_msg.onclick = function() 82 83 { 83 delete_border( ID);84 delete_border(this.id); 84 85 }; 85 86 } … … 87 88 var img_space = document.createElement("SPAN"); 88 89 img_space.innerHTML = " "; 89 var img_previous_msg = createAndSet("IMG",['id','src','title'],['msg_opt_previous_' + ID,90 var img_previous_msg = createAndSet("IMG",['id','src','title'],['msg_opt_previous_' + this.id, 90 91 URL_SERVER + 'expressoMail1_2/templates/'+template+'/images/up.button.png', 91 92 get_lang('Previous')]); 92 93 img_previous_msg.style.cursor = 'pointer'; 93 94 94 //folder = document.getElementById(ID.substr(0, ID.indexOf('_')));95 95 if (!folder){ 96 delete_border( ID);96 delete_border(this.id); 97 97 return; 98 98 } 99 if (folder){ // mensagem local criptografada nao tem IDda pasta local99 if (folder){ // mensagem local criptografada nao tem this.id da pasta local 100 100 if (folder.previousSibling) 101 101 { … … 133 133 img_previous_msg.onclick = function() 134 134 { 135 delete_border( ID);135 delete_border(this.id); 136 136 }; 137 137 } … … 144 144 }; 145 145 var idx_cc = 0; 146 draw_message.prototype.draw_plugin_cc = function( ID,addrs)146 draw_message.prototype.draw_plugin_cc = function(addrs) 147 147 { 148 148 expresso.connector.loadScript("jscode/ccQuickAdd"); … … 176 176 var sm_envelope_img1 = '<img style="cursor:'+ (is_ie ? 'hand' : 'pointer') +'" title="' + get_lang("Add Contact") + 177 177 '" 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+"_"+ ID+"'>";178 var to_addybook_add = "<SPAN id='insert_plugin_"+idx_cc+"_"+this.id+"'>"; 179 179 to_addybook_add += addrs; 180 180 to_addybook_add += sm_envelope_img1; … … 185 185 186 186 187 draw_message.prototype.show_signature_certificate_data = function( ID){188 var _height = Element("div_message_scroll_"+ID).style.height;189 190 191 192 193 194 Element("div_message_scroll_"+ID).style.height = (_height + _offset)+"px";195 Element('tr_signature_'+ID).style.display = 'none';196 Element('td_signature_'+ID).style.display = 'none';197 198 199 200 201 202 Element("div_message_scroll_"+ID).style.height = (_height - _offset)+"px";203 Element('tr_signature_'+ID).style.display = '';204 Element('td_signature_'+ID).style.display = '';205 206 207 208 draw_message.prototype.putSignature = function( ID,info_msg,tdx){187 draw_message.prototype.show_signature_certificate_data = function(){ 188 var _height = Element("div_message_scroll_"+this.id).style.height; 189 _height = parseInt(_height.replace("px","")); 190 var _offset = 130; 191 if (this.value == 'more_cert'){ 192 //this.innerHTML += "<b><u>Mais Informaï¿Åï¿Åes</u></b>"; 193 this.value = 'hide_cert'; 194 Element("div_message_scroll_"+this.id).style.height = (_height + _offset)+"px"; 195 Element('tr_signature_'+this.id).style.display = 'none'; 196 Element('td_signature_'+this.id).style.display = 'none'; 197 198 } 199 else{ 200 //this.innerHTML += "Mais Informaï¿Åï¿Åes"; 201 this.value = 'more_cert'; 202 Element("div_message_scroll_"+this.id).style.height = (_height - _offset)+"px"; 203 Element('tr_signature_'+this.id).style.display = ''; 204 Element('td_signature_'+this.id).style.display = ''; 205 } 206 }; 207 208 draw_message.prototype.putSignature = function(info_msg,tdx){ 209 209 var tr_signature = document.createElement("TR"); 210 210 var td_signature = document.createElement("TD"); 211 211 td_signature.className = 'tr_message_header'; 212 tr_signature.id = 'tr_signature_'+ ID;212 tr_signature.id = 'tr_signature_'+this.id; 213 213 td_signature.colSpan = "5"; 214 214 tr_signature.style.display = 'none'; … … 218 218 td_signature.innerHTML += '<hr></hr>'; 219 219 var signature_status_pos = info_msg.signature[0].indexOf('Message untouched'); 220 td_signature.id = "td_signature_"+ ID;220 td_signature.id = "td_signature_"+this.id; 221 221 if(signature_status_pos < 0 ) 222 222 { 223 tdx.innerHTML += ' <img style="cursor:pointer" src="' + URL_SERVER + 'expressoMail1_2/templates/'+template+'/images/signed_error.gif" title="'+get_lang("Details")+'" onclick="show_signature_certificate_data(\'' + ID+ '\')">';223 tdx.innerHTML += ' <img style="cursor:pointer" src="' + URL_SERVER + 'expressoMail1_2/templates/'+template+'/images/signed_error.gif" title="'+get_lang("Details")+'" onclick="show_signature_certificate_data(\'' + this.id + '\')">'; 224 224 tr_signature.style.display = ''; 225 225 } 226 226 else 227 227 { 228 tdx.innerHTML += ' <img style="cursor:pointer" src="' + URL_SERVER + 'expressoMail1_2/templates/'+template+'/images/signed_table.gif" title="'+get_lang("Details")+'" onclick="show_signature_certificate_data(\'' + ID+ '\')">';228 tdx.innerHTML += ' <img style="cursor:pointer" src="' + URL_SERVER + 'expressoMail1_2/templates/'+template+'/images/signed_table.gif" title="'+get_lang("Details")+'" onclick="show_signature_certificate_data(\'' + this.id + '\')">'; 229 229 } 230 230 tr_signature.appendChild(td_signature); … … 243 243 var menuHidden = Element("folderscol").style.display == 'none' ? true : false; 244 244 245 var folder_id = 0; 246 var ID = info_msg.msg_number + "_r"; 247 folder_id = info_msg.original_ID ? info_msg.original_ID: info_msg.msg_number; 245 var folder_id = info_msg.msg_number; 248 246 var folder = document.getElementById(folder_id); 249 247 if (!folder){ 250 delete_border( ID);248 delete_border(this.id); 251 249 return false; 252 250 } 253 251 254 var next_previous_msg_td = this.createNxtPrevButtons(info_msg.msg_folder, ID,folder_id);252 var next_previous_msg_td = this.createNxtPrevButtons(info_msg.msg_folder,folder_id); 255 253 if (typeof(next_previous_msg_td) == 'undefined') 256 254 return false; … … 270 268 td.innerHTML = _name.bold() + ', ' + info_msg.udate; 271 269 if (info_msg.attachment.names.length > 0) 272 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+"'>";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+"'>"; 273 271 274 272 if (typeof(info_msg.signature) == 'string') … … 289 287 { 290 288 var options = createAndSet("TD",['noWrap','width','align'],['true','30%','right']); 291 var option_hide_more = createAndSet("SPAN",['class','value','id'],['message_options','more_options','option_hide_more_'+ ID],get_lang('show details'));289 var option_hide_more = createAndSet("SPAN",['class','value','id'],['message_options','more_options','option_hide_more_'+this.id],get_lang('show details')); 292 290 option_hide_more.onclick = function(){ 293 291 try{ 294 var _height = Element("div_message_scroll_"+ ID).style.height;292 var _height = Element("div_message_scroll_"+this.id).style.height; 295 293 } 296 294 catch(e){ … … 302 300 this.innerHTML = "<b><u>"+get_lang('hide details')+"</u></b>"; 303 301 this.value = 'hide_options'; 304 Element("div_message_scroll_"+ ID).style.height = (_height - _offset)+"px";305 Element('table_msg_details_'+ ID).style.display = '';302 Element("div_message_scroll_"+this.id).style.height = (_height - _offset)+"px"; 303 Element('table_msg_details_'+this.id).style.display = ''; 306 304 307 305 } … … 309 307 this.innerHTML = get_lang('show details'); 310 308 this.value = 'more_options'; 311 Element("div_message_scroll_"+ ID).style.height = (_height + _offset)+"px";312 Element('table_msg_details_'+ ID).style.display = 'none';309 Element("div_message_scroll_"+this.id).style.height = (_height + _offset)+"px"; 310 Element('table_msg_details_'+this.id).style.display = 'none'; 313 311 } 314 312 }; … … 328 326 option_mark.innerHTML = option_mark_as_unseen+option_mark_important; 329 327 330 var option_forward = createAndSet("SPAN",['id','class'],['msg_opt_forward_'+ ID, 'message_options'],get_lang('Forward'));331 option_forward.onclick = function(){new_message('forward', ID);};328 var option_forward = createAndSet("SPAN",['id','class'],['msg_opt_forward_'+this.id, 'message_options'],get_lang('Forward')); 329 option_forward.onclick = function(){new_message('forward', this.id);}; 332 330 appendChilds(options,option_hide_more,createAndSet('SPAN',false,false,' | '),option_forward); 333 331 334 var option_reply_options = createAndSet("IMG",['id', 'src', 'value'],['msg_opt_reply_options_'+ ID,URL_SERVER+'expressoMail1_2/templates/default/images/down.png','show']);332 var option_reply_options = createAndSet("IMG",['id', 'src', 'value'],['msg_opt_reply_options_'+this.id,URL_SERVER+'expressoMail1_2/templates/default/images/down.png','show']); 335 333 option_reply_options.onmouseover = function(){ 336 334 option_reply_options.src= URL_SERVER+'expressoMail1_2/templates/default/images/over.png'; … … 350 348 this.value = 'hide'; 351 349 option_reply_options.src= URL_SERVER+'expressoMail1_2/templates/default/images/pressed.png'; 352 Element('tr_other_options_'+ ID).style.display = '';350 Element('tr_other_options_'+this.id).style.display = ''; 353 351 354 352 } … … 356 354 this.value = 'show'; 357 355 option_reply_options.src= URL_SERVER+'expressoMail1_2/templates/default/images/down.png'; 358 Element('tr_other_options_'+ ID).style.display = 'none';356 Element('tr_other_options_'+this.id).style.display = 'none'; 359 357 } 360 358 }; 361 359 362 var _option_reply = createAndSet("SPAN",['id','class'],['msg_opt_reply_'+ ID,'message_options'],get_lang('Reply'));363 _option_reply.onclick = function(){new_message('reply_with_history', ID);};360 var _option_reply = createAndSet("SPAN",['id','class'],['msg_opt_reply_'+this.id,'message_options'],get_lang('Reply')); 361 _option_reply.onclick = function(){new_message('reply_with_history', this.id);}; 364 362 365 363 appendChilds(options,createAndSet('SPAN',false,false,' | '),option_reply_options,_option_reply); … … 368 366 369 367 ////////// OTHER OPTIONS //////////////////// 370 var _tr_other_options = createAndSet("TR",['id'],['tr_other_options_' + ID]);368 var _tr_other_options = createAndSet("TR",['id'],['tr_other_options_' + this.id]); 371 369 _tr_other_options.style.display = 'none'; 372 370 … … 378 376 var option_mark_as_normal = '<span class="message_options" onclick="proxy_mensagens.proxy_set_messages_flag(\'unflagged\','+info_msg.msg_number+');write_msg(\''+get_lang('Message marked as ')+get_lang("Normal")+'.\');">'+get_lang("Normal")+'</span> | '; 379 377 380 var option_reply_without_history = '<span onmouseover="this.className=\'reply_options_active\'" onmouseout="this.className=\'reply_options\'" class="reply_options" onclick=new_message("reply_without_history","'+ ID+'");>'+get_lang("Reply without history")+'</span>';381 var option_reply_to_all = '<span onmouseover="this.className=\'reply_options_active\'" onmouseout="this.className=\'reply_options\'" class="reply_options" onclick=new_message("reply_to_all_with_history","'+ ID+'");>'+get_lang("Reply to all")+'</span> | ';382 383 var option_reply_to_all_without_history = '<span onmouseover="this.className=\'reply_options_active\'" onmouseout="this.className=\'reply_options\'" class="reply_options" onclick=new_message("reply_to_all_without_history","'+ ID+'");>'+get_lang("Reply to all without history")+'</span> | </div>';378 var option_reply_without_history = '<span onmouseover="this.className=\'reply_options_active\'" onmouseout="this.className=\'reply_options\'" class="reply_options" onclick=new_message("reply_without_history","'+this.id+'");>'+get_lang("Reply without history")+'</span>'; 379 var option_reply_to_all = '<span onmouseover="this.className=\'reply_options_active\'" onmouseout="this.className=\'reply_options\'" class="reply_options" onclick=new_message("reply_to_all_with_history","'+this.id+'");>'+get_lang("Reply to all")+'</span> | '; 380 381 var option_reply_to_all_without_history = '<span onmouseover="this.className=\'reply_options_active\'" onmouseout="this.className=\'reply_options\'" class="reply_options" onclick=new_message("reply_to_all_without_history","'+this.id+'");>'+get_lang("Reply to all without history")+'</span> | </div>'; 384 382 385 383 div_other_options.innerHTML = option_reply_to_all + option_reply_to_all_without_history + option_reply_without_history; … … 403 401 if (info_msg.signature && info_msg.signature.length > 0) 404 402 { 405 tbody_message.appendChild(putSignature( ID,info_msg,td));403 tbody_message.appendChild(putSignature(this.id,info_msg,td)); 406 404 } 407 405 } … … 409 407 { 410 408 var options = createAndSet('TD',['width','noWrap','align'],['1%','true','right']); 411 var option_hide_more = createAndSet("SPAN",['class','value','id'],['message_options','more_options','option_hide_more_'+ ID],get_lang('Show details'));409 var option_hide_more = createAndSet("SPAN",['class','value','id'],['message_options','more_options','option_hide_more_'+this.id],get_lang('Show details')); 412 410 option_hide_more.onclick = function(){ 413 var _height = Element("div_message_scroll_"+ ID).style.height;411 var _height = Element("div_message_scroll_"+this.id).style.height; 414 412 _height = parseInt(_height.replace("px","")); 415 413 var _offset = 35; … … 417 415 this.innerHTML = "<b><u>"+get_lang('Hide details')+"</u></b>"; 418 416 this.value = 'hide_options'; 419 Element("div_message_scroll_"+ ID).style.height = (_height - _offset)+"px";420 Element('table_msg_details_'+ ID).style.display = '';417 Element("div_message_scroll_"+this.id).style.height = (_height - _offset)+"px"; 418 Element('table_msg_details_'+this.id).style.display = ''; 421 419 } 422 420 else{ 423 421 this.innerHTML = get_lang('show details'); 424 422 this.value = 'more_options'; 425 Element("div_message_scroll_"+ ID).style.height = (_height + _offset)+"px";426 Element('table_msg_details_'+ ID).style.display = 'none';423 Element("div_message_scroll_"+this.id).style.height = (_height + _offset)+"px"; 424 Element('table_msg_details_'+this.id).style.display = 'none'; 427 425 } 428 426 }; 429 427 var option_edit = createAndSet('SPAN',['class'],['message_options'], get_lang('Edit')); 430 option_edit.onclick= function () { new_message('edit', ID); };428 option_edit.onclick= function () { new_message('edit',this.id); }; 431 429 appendChilds(options, option_hide_more, createAndSet('SPAN',false,false," | "), option_edit); 432 430 … … 441 439 442 440 draw_message.prototype.draw_message_header = function(header,border_id){ 441 this.id = border_id; 443 442 var defaultWidth = document.body.offsetWidth - 37; 444 443 if(Element("folderscol").style.display != 'none') … … 458 457 459 458 460 draw_message.prototype.draw_message_body = function (info_msg , ID){459 draw_message.prototype.draw_message_body = function (info_msg){ 461 460 var defaultWidth = document.body.offsetWidth - 37; 462 461 if(Element("folderscol").style.display != 'none') 463 462 defaultWidth -= Element("folderscol").offsetWidth; 464 463 465 var table_message = Element('table_message_'+ ID);464 var table_message = Element('table_message_'+this.id); 466 465 var tbody_message = table_message.childNodes[0]; 467 466 … … 479 478 var sender = document.createElement("TD"); 480 479 sender.className = "header_message_field"; 481 sender.id = "sender_"+ ID;482 sender.innerHTML += this.draw_plugin_cc( ID, info_msg.sender.full);483 var sender_values = createAndSet("INPUT",['id','type','value'],["sender_values_"+ ID,"HIDDEN",info_msg.sender.full]);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]); 484 483 485 484 tbody_message_others_options.appendChild(appendChilds(tr111, td111, sender, sender_values)); 486 485 } 487 486 488 var from = createAndSet('TD',['id','class'],["from_"+ ID,"header_message_field"],info_msg.from.full);487 var from = createAndSet('TD',['id','class'],["from_"+this.id,"header_message_field"],info_msg.from.full); 489 488 490 489 if (info_msg.Draft != "X"){ 491 from.innerHTML += this.draw_plugin_cc( ID, info_msg.from);490 from.innerHTML += this.draw_plugin_cc(this.id, info_msg.from); 492 491 tbody_message_others_options.appendChild(tr1); 493 492 } 494 var from_values = createAndSet('INPUT',['id','type','value'],["from_values_"+ ID,"HIDDEN",info_msg.from.full]);495 var local_message = createAndSet("INPUT",['id','name','type','value'],["is_local_"+ ID,"is_local","HIDDEN",(info_msg.local_message)?"1":"0"]);493 var from_values = createAndSet('INPUT',['id','type','value'],["from_values_"+this.id,"HIDDEN",info_msg.from.full]); 494 var local_message = createAndSet("INPUT",['id','name','type','value'],["is_local_"+this.id,"is_local","HIDDEN",(info_msg.local_message)?"1":"0"]); 496 495 appendChilds(tr1,td1,from,from_values,local_message); 497 496 … … 500 499 tr11.className = "tr_message_header"; 501 500 var _td11 = createAndSet('TD',['noWrap'],['true'],get_lang("Reply to")+": "); 502 var _reply_to = createAndSet('TD',['id', 'class'],["reply_to_"+ ID, "header_message_field"],this.draw_plugin_cc(ID, info_msg.reply_to));503 var _reply_to_values = createAndSet('INPUT',['id', 'type', 'value'],["reply_to_values_"+ ID,"HIDDEN",info_msg.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]); 504 503 tbody_message_others_options.appendChild(appendChilds(tr11,_td11,_reply_to,_reply_to_values)); 505 504 } … … 510 509 td2.innerHTML = get_lang("To: "); 511 510 var to = document.createElement("TD"); 512 to.id = "to_"+ ID;513 514 var _to_values = createAndSet('INPUT',['id', 'type', 'value'],["to_values_"+ ID, "HIDDEN", info_msg.toaddress2]);511 to.id = "to_"+this.id; 512 513 var _to_values = createAndSet('INPUT',['id', 'type', 'value'],["to_values_"+this.id, "HIDDEN", info_msg.toaddress2]); 515 514 // Salva a pasta da mensagem 516 var _input_cfolder = createAndSet('INPUT',['id', 'name', 'type', 'value'],["input_folder_"+ ID, "input_folder", "hidden", info_msg.msg_folder]);515 var _input_cfolder = createAndSet('INPUT',['id', 'name', 'type', 'value'],["input_folder_"+this.id, "input_folder", "hidden", info_msg.msg_folder]); 517 516 td2.appendChild(_input_cfolder); 518 517 519 toaddress_array[ ID] = info_msg.toaddress2.split(",");520 if (toaddress_array[ ID].length > 1){521 to.innerHTML += this.draw_plugin_cc( ID, toaddress_array[ID][0]);522 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>)");518 toaddress_array[this.id] = info_msg.toaddress2.split(","); 519 if (toaddress_array[this.id].length > 1){ 520 to.innerHTML += this.draw_plugin_cc(this.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>)"); 523 522 to.appendChild(_div_toaddrs); 524 523 } 525 524 else { 526 to.innerHTML += this.draw_plugin_cc( ID,toaddress_array[ID]);525 to.innerHTML += this.draw_plugin_cc(this.id,toaddress_array[this.id]); 527 526 } 528 527 to.className = "header_message_field"; … … 534 533 var td3 = document.createElement("TD"); 535 534 td3.innerHTML = "CC: "; 536 var cc = createAndSet("TD",['id', 'class'],["cc_"+ ID,"header_message_field"]);537 538 var cc_values = createAndSet("INPUT",['id', 'type', 'value'],["cc_values_"+ ID, "HIDDEN", info_msg.cc]);539 ccaddress_array[ ID] = info_msg.cc.split(",");540 if (ccaddress_array[ ID].length > 1){535 var cc = createAndSet("TD",['id', 'class'],["cc_"+this.id,"header_message_field"]); 536 537 var cc_values = createAndSet("INPUT",['id', 'type', 'value'],["cc_values_"+this.id, "HIDDEN", info_msg.cc]); 538 ccaddress_array[this.id] = info_msg.cc.split(","); 539 if (ccaddress_array[this.id].length > 1){ 541 540 var div_ccaddress = document.createElement("SPAN"); 542 div_ccaddress.id = "div_ccaddress_"+ ID;543 var div_ccaddress_full = createAndSet("SPAN",['id', 'style'],["div_ccaddress_full_"+ ID, "display: inline"]);544 cc.innerHTML = this.draw_plugin_cc( ID, ccaddress_array[ID][0]);545 div_ccaddress.innerHTML += " (<a STYLE='color: RED;' onclick=javascript:show_div_address_full('"+ ID+"','cc');>"+get_lang('more')+"</a>)";541 div_ccaddress.id = "div_ccaddress_"+this.id; 542 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]); 544 div_ccaddress.innerHTML += " (<a STYLE='color: RED;' onclick=javascript:show_div_address_full('"+this.id+"','cc');>"+get_lang('more')+"</a>)"; 546 545 cc.appendChild(div_ccaddress); 547 546 } 548 547 else{ 549 cc.innerHTML = this.draw_plugin_cc( ID, info_msg.cc);548 cc.innerHTML = this.draw_plugin_cc(this.id, info_msg.cc); 550 549 } 551 550 tbody_message_others_options.appendChild(appendChilds(tr3,td3,cc,cc_values)); … … 561 560 var td4 = document.createElement("TD"); 562 561 td4.innerHTML = get_lang("Date: "); 563 var date = createAndSet('TD',['id','class'],["date_"+ ID,"header_message_field"],info_msg.fulldate);564 var date_day = createAndSet('INPUT',['id', 'type', 'value'],["date_day_"+ ID, "HIDDEN", info_msg.msg_day]);565 var date_hour = createAndSet('INPUT',['id', 'type', 'value'],["date_hour_"+ ID, "HIDDEN", info_msg.msg_hour]);562 var date = createAndSet('TD',['id','class'],["date_"+this.id,"header_message_field"],info_msg.fulldate); 563 var date_day = createAndSet('INPUT',['id', 'type', 'value'],["date_day_"+this.id, "HIDDEN", info_msg.msg_day]); 564 var date_hour = createAndSet('INPUT',['id', 'type', 'value'],["date_hour_"+this.id, "HIDDEN", info_msg.msg_hour]); 566 565 tbody_message_others_options.appendChild(appendChilds(tr4,td4,date,date_day,date_hour)); 567 566 … … 570 569 var td5 = document.createElement("TD"); 571 570 td5.innerHTML = get_lang("Subject"); 572 var subject = createAndSet('TD',['id', 'class'],["subject_"+ ID, "header_message_field"],info_msg.subject);571 var subject = createAndSet('TD',['id', 'class'],["subject_"+this.id, "header_message_field"],info_msg.subject); 573 572 tbody_message_others_options.appendChild(appendChilds(tr5,td5,subject)); 574 573 if (info_msg.attachments.length > 0){ … … 611 610 } 612 611 613 attachments.id = "attachments_" + ID;612 attachments.id = "attachments_" + this.id; 614 613 for (var i=0; i<info_msg.attachments.length; i++){ 615 614 var link_attachment = document.createElement("A"); … … 643 642 offset = bar.offsetHeight ? bar.offsetHeight : bar.clientHeight; 644 643 var div = document.createElement("DIV"); 645 div.id = "div_message_scroll_"+ ID;644 div.id = "div_message_scroll_"+this.id; 646 645 div.style.background = 'WHITE'; 647 646 div.style.height = document.body.clientHeight - offset - 125; … … 650 649 // END MAKE THE SCROLL HEIGHT 651 650 652 var table_msg_details = createAndSet("TABLE",['id','width','class'],['table_msg_details_' + ID,defaultWidth - 30,'table_message']);651 var table_msg_details = createAndSet("TABLE",['id','width','class'],['table_msg_details_' + this.id,defaultWidth - 30,'table_message']); 653 652 table_msg_details.style.display = 'none'; 654 653 table_msg_details.appendChild(tbody_message_others_options); … … 659 658 td.colSpan = '2'; 660 659 661 var newBody = this.blockImage(info_msg, ID,td);660 var newBody = this.blockImage(info_msg,this.id,td); 662 661 663 662 td.appendChild(div); … … 674 673 newBody = newBody.replace("<body","<span"); 675 674 newBody = newBody.replace("<BODY","<span"); 676 div.innerHTML+= "<span id='body_"+ ID+"' style='font-size:16px;'>"+newBody+"</span><br><br>";675 div.innerHTML+= "<span id='body_"+this.id+"' style='font-size:16px;'>"+newBody+"</span><br><br>"; 677 676 function mailto( link ) 678 677 { … … 702 701 703 702 704 var msg_number = createAndSet("INPUT",['id','type','value'],["msg_number_" + ID, "hidden", info_msg.msg_number]);705 var content = document.getElementById('content_id_' + ID);703 var msg_number = createAndSet("INPUT",['id','type','value'],["msg_number_" + this.id, "hidden", info_msg.msg_number]); 704 var content = document.getElementById('content_id_' + this.id); 706 705 loading_img = content.removeChild( loading_img ); 707 706 content.style.height = document.body.clientHeight - offset - 90; … … 714 713 option_hide_more.onclick(); 715 714 716 if (Element('div_toaddress_'+ ID) != null)717 { 718 show_div_address_full( ID,'to');715 if (Element('div_toaddress_'+this.id) != null) 716 { 717 show_div_address_full(this.id,'to'); 719 718 } 720 if (Element('div_ccaddress_'+ ID) != null)721 { 722 show_div_address_full( ID,'cc');719 if (Element('div_ccaddress_'+this.id) != null) 720 { 721 show_div_address_full(this.id,'cc'); 723 722 } 724 723 } … … 779 778 td3.innerHTML = get_lang("BCC") + " : "; 780 779 var cco = document.createElement("td"); 781 cco.id = "cco_"+ ID;782 783 var cco_values = createAndSet("INPUT",['id', 'type', 'value'],["cco_values_"+ ID,"hidden",bccField]);784 ccoaddress_array[ ID] = bccField.split(",");785 if (ccoaddress_array[ ID].length > 1){780 cco.id = "cco_"+this.id; 781 782 var cco_values = createAndSet("INPUT",['id', 'type', 'value'],["cco_values_"+this.id,"hidden",bccField]); 783 ccoaddress_array[this.id] = bccField.split(","); 784 if (ccoaddress_array[this.id].length > 1){ 786 785 var div_ccoaddress = document.createElement("SPAN"); 787 div_ccoaddress.id = "div_ccoaddress_"+ ID;788 var div_ccoaddress_full = createAndSet("SPAN",['id', 'style'],["div_ccoaddress_full_"+ ID, "display:inline"]);786 div_ccoaddress.id = "div_ccoaddress_"+this.id; 787 var div_ccoaddress_full = createAndSet("SPAN",['id', 'style'],["div_ccoaddress_full_"+this.id, "display:inline"]); 789 788 /* 790 789 * The function below is ugly, doesn't possible use this. … … 792 791 * on a hardcode concept. 793 792 */ 794 //cco.innerHTML = this.draw_plugin_cc( ID, ccoaddress_array[ID][0]);795 cco.innerHTML = ccoaddress_array[ ID][0];796 div_ccoaddress.innerHTML += " (<a STYLE='color: RED;' onclick=javascript:show_div_address_full('"+ ID+"','cco');>"+get_lang('more')+"</a>)";793 //cco.innerHTML = this.draw_plugin_cc(ccoaddress_array[this.id][0]); 794 cco.innerHTML = ccoaddress_array[this.id][0]; 795 div_ccoaddress.innerHTML += " (<a STYLE='color: RED;' onclick=javascript:show_div_address_full('"+this.id+"','cco');>"+get_lang('more')+"</a>)"; 797 796 cco.appendChild(div_ccoaddress); 798 797 } … … 803 802 * on a hardcode concept. 804 803 */ 805 //cco.innerHTML = this.draw_plugin_cc( ID,info_msg.cco);804 //cco.innerHTML = this.draw_plugin_cc(info_msg.cco); 806 805 cco.innerHTML = bccField; 807 806 } -
trunk/expressoMail1_2/js/jscode/main.js
r2715 r2718 354 354 } 355 355 } 356 else 357 return; 356 else{ 357 /* No tab avaliable, the draw_message_header hasn't finished?! */ 358 expresso.connector.cacheNextRequest(); 359 setTimeout('cExecute("expressoMail1_2.imap_functions.get_info_msg&msg_number='+ id_msg_read +'&msg_folder=' + current_folder+'", show_msg)',3000); 360 } 358 361 359 362 var domains = "";
Note: See TracChangeset
for help on using the changeset viewer.