- Timestamp:
- 01/10/11 16:46:43 (14 years ago)
- Location:
- branches/2.0/expressoMail1_2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/expressoMail1_2/inc/class.imap_functions.inc.php
r3547 r3676 420 420 $return = array(); 421 421 $msg_number = $params['msg_number']; 422 if(preg_match('(.+)(_[a-zA-Z0-9]+)',$msg_number,$matches)) { //Verifies if it comes from a tab diferent of the main one. 423 $msg_number = $matches[1]; 424 $plus_id = $matches[2]; 425 } 426 else { 427 $plus_id = ''; 428 } 422 429 $msg_folder = urldecode($params['msg_folder']); 423 430 … … 476 483 } 477 484 478 $return['msg_number'] = $msg_number ;485 $return['msg_number'] = $msg_number.$plus_id; 479 486 $return['msg_folder'] = $msg_folder; 480 487 -
branches/2.0/expressoMail1_2/js/draw_api.js
r3522 r3676 1028 1028 currentTab = ID; 1029 1029 openTab.type[ID] = 2; 1030 proxy_mensagens.get_msg( parseInt(folder.nextSibling.id),nextMsgBox,true,show_msg);1030 proxy_mensagens.get_msg(folder.nextSibling.id,nextMsgBox,true,show_msg); 1031 1031 //cExecute("$this.imap_functions.get_info_msg&msg_number="+folder.nextSibling.id+"&msg_folder="+nextMsgBox, show_msg); 1032 1032 }; … … 1084 1084 openTab.type[ID] = 2; 1085 1085 //cExecute("$this.imap_functions.get_info_msg&msg_number="+folder.previousSibling.id+"&msg_folder=" + previousMsgBox, show_msg); 1086 proxy_mensagens.get_msg( parseInt(folder.previousSibling.id),previousMsgBox,true,show_msg);1086 proxy_mensagens.get_msg(folder.previousSibling.id,previousMsgBox,true,show_msg); 1087 1087 }; 1088 1088 } -
branches/2.0/expressoMail1_2/js/globals.js
r1402 r3676 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"> '+ -
branches/2.0/expressoMail1_2/js/local_messages.js
r1381 r3676 130 130 } 131 131 132 /** 133 * check if ID is no from main tab, if it's from main returns false, else 134 * returns an array with all string in position 0, the mail id in position 1 135 * and the part of string relative to tab in position 2 136 * @param {Object} id_mail 137 */ 138 local_messages.prototype.parse_id_mail = function(id_mail) { 139 if (this.isInt(id_mail)) 140 return false; 141 142 var matches = id_mail.match(/(.+)(_[a-zA-Z0-9]+)/); 143 return matches; 144 } 145 146 local_messages.prototype.isInt = function(x) { 147 var y=parseInt(x); 148 if (isNaN(y)) return false; 149 return x==y && x.toString()==y.toString(); 150 } 151 132 152 local_messages.prototype.get_local_mail = function(id_mail) { 133 153 this.init_local_messages(); 154 155 var plus_id = ''; 156 var matches = ''; 157 if(matches = this.parse_id_mail(id_mail)) { //Mails coming from other tab. 158 id_mail = matches[1]; 159 plus_id = matches[2]; 160 } 161 134 162 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); 135 163 var retorno = null; … … 143 171 if (typeof(retorno.source) == 'string') 144 172 { 145 retorno.msg_number=rs.field(0) ;173 retorno.msg_number=rs.field(0)+plus_id; 146 174 retorno.original_ID=rs.field(8); 147 175 retorno.msg_folder=rs.field(7); … … 186 214 retorno['local_message'] = true; 187 215 retorno['msg_folder'] = "local_"+rs.field(7); //Now it's a local folder 188 retorno['msg_number'] = rs.field(0) ; //the message number is the rowid216 retorno['msg_number'] = rs.field(0)+plus_id; //the message number is the rowid 189 217 190 218 } … … 289 317 local_messages.prototype.get_url_anexo = function(msg_number,pid) { 290 318 this.init_local_messages(); 291 319 var matches = ''; 320 if(matches = this.parse_id_mail(msg_number)) { 321 msg_number = matches[1]; 322 } 292 323 var retorno; 293 324 var rs = this.dbGears.execute("select url from anexo where id_mail="+msg_number+" and pid = '"+pid+"'"); … … 372 403 } 373 404 for (var i in msgs_to_set) { 374 405 406 var matches = '';//Messages comming from other tabs. 407 if(matches = this.parse_id_mail(msgs_to_set[i])) { 408 msgs_to_set[i] = matches[1]; 409 } 410 375 411 var rs = this.dbGears.execute("select header,unseen from mail where rowid=" + msgs_to_set[i]); 376 412 header = connector.unserialize(rs.field(0)); -
branches/2.0/expressoMail1_2/js/main.js
r3522 r3676 582 582 } 583 583 trfolder = (tr.getAttribute('name') == null?get_current_folder():tr.getAttribute('name')); 584 selected_param += ','+trfolder+';'+tr.id ;584 selected_param += ','+trfolder+';'+tr.id.replace(/_[a-zA-Z0-9]+/,""); 585 585 } 586 586 } … … 594 594 } 595 595 trfolder = (tr.getAttribute('name') == null?get_current_folder():tr.getAttribute('name')); 596 selected_param=trfolder+';'+tr.id ;596 selected_param=trfolder+';'+tr.id.replace(/_[a-zA-Z0-9]+/,""); 597 597 } 598 598 var params = ""; -
branches/2.0/expressoMail1_2/js/search.js
r2780 r3676 221 221 var uid_msg = aux.uid; 222 222 var subject = aux.subject; 223 tr.id = uid_msg ;223 tr.id = uid_msg+"_s"+global_search; 224 224 225 225 // Keep the two lines together please … … 354 354 tbody.appendChild(tr); 355 355 } 356 global_search++; //Tabs from search must not have the same id on its tr's 356 357 table.appendChild(tbody); 357 358
Note: See TracChangeset
for help on using the changeset viewer.