Changeset 1969 for trunk/expressoMail1_2/js
- Timestamp:
- 02/03/10 16:33:54 (15 years ago)
- Location:
- trunk/expressoMail1_2/js
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/draw_api.js
r1965 r1969 1153 1153 currentTab = ID; 1154 1154 openTab.type[ID] = 2; 1155 proxy_mensagens.get_msg( parseInt(folder.nextSibling.id),nextMsgBox,true,show_msg);1155 proxy_mensagens.get_msg(folder.nextSibling.id,nextMsgBox,true,show_msg); 1156 1156 //cExecute("$this.imap_functions.get_info_msg&msg_number="+folder.nextSibling.id+"&msg_folder="+nextMsgBox, show_msg); 1157 1157 }; … … 1209 1209 openTab.type[ID] = 2; 1210 1210 //cExecute("$this.imap_functions.get_info_msg&msg_number="+folder.previousSibling.id+"&msg_folder=" + previousMsgBox, show_msg); 1211 proxy_mensagens.get_msg( parseInt(folder.previousSibling.id),previousMsgBox,true,show_msg);1211 proxy_mensagens.get_msg(folder.previousSibling.id,previousMsgBox,true,show_msg); 1212 1212 }; 1213 1213 } -
trunk/expressoMail1_2/js/globals.js
r1526 r1969 20 20 var tree_folders = ''; 21 21 var folders = new Array(); 22 var global_search = 1; 22 23 var title_app_menu = '<table height="16px" align=center border=0 width=100% cellspacing=0 cellpadding=2>'+ 23 24 '<tr><td align=left height=16px width="1%" nowrap class="table_top"> '+ -
trunk/expressoMail1_2/js/local_messages.js
r1964 r1969 311 311 } 312 312 313 /** 314 * check if ID is no from main tab, if it's from main returns false, else 315 * returns an array with all string in position 0, the mail id in position 1 316 * and the part of string relative to tab in position 2 317 * @param {Object} id_mail 318 */ 319 local_messages.prototype.parse_id_mail = function(id_mail) { 320 if (this.isInt(id_mail)) 321 return false; 322 323 var matches = id_mail.match(/(.+)(_[a-zA-Z0-9]+)/); 324 return matches; 325 } 326 327 local_messages.prototype.isInt = function(x) { 328 var y=parseInt(x); 329 if (isNaN(y)) return false; 330 return x==y && x.toString()==y.toString(); 331 } 332 313 333 local_messages.prototype.get_local_mail = function(id_mail) { 314 334 this.init_local_messages(); 335 336 var plus_id = ''; 337 var matches = ''; 338 if(matches = this.parse_id_mail(id_mail)) { //Mails coming from other tab. 339 id_mail = matches[1]; 340 plus_id = matches[2]; 341 } 342 315 343 var rs = this.dbGears.execute("select mail.rowid,mail.mail,mail.ffrom,mail.subject,mail.body,mail.fto,mail.cc,folder.folder,mail.original_id from mail inner join folder on mail.id_folder=folder.rowid where mail.rowid="+id_mail); 316 344 var retorno = null; … … 324 352 if (typeof(retorno.source) == 'string') 325 353 { 326 retorno.msg_number=rs.field(0) ;354 retorno.msg_number=rs.field(0)+plus_id; 327 355 retorno.original_ID=rs.field(8); 328 356 retorno.msg_folder=rs.field(7); … … 367 395 retorno['local_message'] = true; 368 396 retorno['msg_folder'] = "local_"+rs.field(7); //Now it's a local folder 369 retorno['msg_number'] = rs.field(0) ; //the message number is the rowid397 retorno['msg_number'] = rs.field(0)+plus_id; //the message number is the rowid 370 398 371 399 } … … 490 518 local_messages.prototype.get_url_anexo = function(msg_number,pid) { 491 519 this.init_local_messages(); 492 520 var matches = ''; 521 if(matches = this.parse_id_mail(msg_number)) { 522 msg_number = matches[1]; 523 } 524 493 525 var retorno; 494 526 var rs = this.dbGears.execute("select url from anexo where id_mail="+msg_number+" and pid = '"+pid+"'"); … … 561 593 } 562 594 595 596 563 597 local_messages.prototype.set_messages_flag = function(msgs_number, flag) { 564 598 this.init_local_messages(); … … 573 607 } 574 608 for (var i in msgs_to_set) { 575 609 610 var matches = '';//Messages comming from other tabs. 611 if(matches = this.parse_id_mail(msgs_to_set[i])) { 612 msgs_to_set[i] = matches[1]; 613 } 614 576 615 var rs = this.dbGears.execute("select header,unseen from mail where rowid=" + msgs_to_set[i]); 577 616 header = connector.unserialize(rs.field(0)); -
trunk/expressoMail1_2/js/mail_sync.js
r1857 r1969 215 215 216 216 var call_back = function(url,success,captureId) { 217 218 217 if (!success) { 219 218 /* -
trunk/expressoMail1_2/js/main.js
r1965 r1969 595 595 } 596 596 trfolder = (tr.getAttribute('name') == null?get_current_folder():tr.getAttribute('name')); 597 selected_param += ','+trfolder+';'+tr.id ;597 selected_param += ','+trfolder+';'+tr.id.replace(/_[a-zA-Z0-9]+/,""); 598 598 } 599 599 } … … 607 607 } 608 608 trfolder = (tr.getAttribute('name') == null?get_current_folder():tr.getAttribute('name')); 609 selected_param=trfolder+';'+tr.id ;609 selected_param=trfolder+';'+tr.id.replace(/_[a-zA-Z0-9]+/,""); 610 610 } 611 611 var params = ""; -
trunk/expressoMail1_2/js/messages_proxy.js
r1938 r1969 25 25 expresso_local_messages.set_messages_flag(msg_number,"seen"); 26 26 var data = expresso_local_messages.get_local_mail(msg_number); 27 27 28 eval("call_back(data)"); 28 29 }else { -
trunk/expressoMail1_2/js/search.js
r1747 r1969 410 410 var uid_msg = aux[6]; 411 411 var subject = aux[2]; 412 tr.id = uid_msg ;412 tr.id = uid_msg+"_s"+global_search; 413 413 414 414 // Keep the two lines together please … … 545 545 tbody.appendChild(tr); 546 546 } 547 global_search++; //Tabs from search must not have the same id on its tr's 548 547 549 table.appendChild(tbody); 548 550
Note: See TracChangeset
for help on using the changeset viewer.