Changeset 1339


Ignore:
Timestamp:
08/19/09 08:36:56 (15 years ago)
Author:
amuller
Message:

Ticket #605 - reverte modificação que criou problema na busca

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/search.js

    r1330 r1339  
    334334                                aux[0] = nw_array[i].substr(0, nw_array[i].indexOf('--')); 
    335335                                nw_array[i] = nw_array[i].substr(nw_array[i].indexOf('--')+2); 
    336                                 aux[3] = nw_array[i].substr(0, nw_array[i].indexOf('--')); 
    337                                 nw_array[i] = nw_array[i].substr(nw_array[i].indexOf('--')+2); 
    338336                                aux[1] = nw_array[i].substr(0, nw_array[i].indexOf('--')); 
    339337                                aux[2] = nw_array[i].substr(nw_array[i].indexOf('--')+2); 
     
    343341                        { 
    344342                                var aux = nw_array[i].split("--"); 
    345                                 aux.splice(4,0,aux[1]); 
    346                                 var mailbox = aux.shift(); 
    347                                 aux.splice(0,1,mailbox); 
    348                         } 
    349                          
    350                         var mailbox_name = aux[0]; 
    351                         var mailbox_id = aux[3]; 
    352                         var uid_msg = aux[7]; 
     343                        } 
     344 
     345                        var mailbox = aux[0]; 
     346                        var uid_msg = aux[6]; 
    353347                        var subject = aux[2]; 
    354348                        tr.id = uid_msg; 
    355                         tr.setAttribute('name',mailbox_id); 
    356                         if (aux[6].match("U")) 
     349 
     350                        // Keep the two lines together please 
     351                        tr.setAttribute('name',mailbox); 
     352                        tr.name = mailbox; 
     353 
     354                        if (aux[5].match("U")) 
    357355                                add_className(tr,'tr_msg_unread'); 
    358356                        add_className(tr, i%2 != 0 ? 'tr_msg_read2' : 'tr_msg_read'); 
     
    370368                                { 
    371369                                        td.style.width = "2%"; 
    372                                         if (aux[6].match('T')) 
     370                                        if (aux[5].match('T')) 
    373371                                        { 
    374                                                 attachNum = parseInt(aux[6].substr(aux[6].indexOf('T')+1)); 
     372                                                attachNum = parseInt(aux[5].substr(aux[5].indexOf('T')+1)); 
    375373                                                td1 = "<img src='templates/"+template+"/images/clip.gif' title='"+attachNum +' '+ get_lang('attachment(s)')+"'>"; 
    376374                                        } 
     
    382380                                        td.style.width = "1%"; 
    383381                                        td.id = "td_message_answered_"+uid_msg; 
    384                                         if (aux[6].match('X')) 
     382                                        if (aux[5].match('X')) 
    385383                                                td1 = '<img src=templates/'+template+'/images/forwarded.gif title=Forwarded>'; 
    386384                                        else 
    387                                                 if (aux[6].match('A')) 
     385                                                if (aux[5].match('A')) 
    388386                                                        td1 = '<img src=templates/'+template+'/images/answered.gif>'; 
    389387                                                else 
     
    394392                                        td.style.width = "1%"; 
    395393                                        td.id = "td_message_important_"+uid_msg; 
    396                                         if (aux[6].match("F")) 
     394                                        if (aux[5].match("F")) 
    397395                                        { 
    398396                                                add_className(tr, 'flagged_msg'); 
     
    410408                                if (j == 5) 
    411409                                { 
    412                                         td.style.width = "20%"; 
     410                                        td.style.width = "14%"; 
    413411                                        td.onclick = _onclick; 
    414412                                        var nm_box = aux[0].split(cyrus_delimiter); 
     
    418416                                        td.style.color = "#42795b"; 
    419417                                        td.style.fontWeight = "bold"; 
    420                                         if(proxy_mensagens.is_local_folder(td1)) { 
    421                                                 var td1 = this.aux_local_folder_display(td1); 
    422                                                 aux[2] = tr.name = aux[0]; // precisa trocar pelo nome real no banco do gears. 
    423                                         } else { 
    424                                                 if(td1 == "INBOX"){ 
    425                                                         var td1  = get_lang("Inbox"); 
    426                                                 }  
    427                                                 else if (nm_box[0] == 'user')  
    428                                                         if (nm_box.length > 1)  
    429                                                                 var td1 = nm_box[1] + '/' + lang_folder(td1); 
    430                                                         else  
    431                                                                 var td1 = td1; 
    432                                                 else  
    433                                                         var td1 = lang_folder(td1); 
     418 
     419                                        if(td1 == "INBOX"){ 
     420                                                var td1  = get_lang("Inbox"); 
    434421                                        } 
    435422 
     
    440427                                if( j == 6) 
    441428                                { 
    442                                         if (aux[2].length > 29) 
    443                                                 aux[2] = aux[2].substr(0,29) + "..."; 
     429                                        if (aux[1].length > 29) 
     430                                                aux[1] = aux[1].substr(0,29) + "..."; 
    444431                                        td.style.width = "20%"; 
    445432                                        td.onclick = _onclick; 
     
    453440                                        if (! subject_encode) 
    454441                                                aux[2] = get_lang("no subject") + "..."; 
    455                                         if (aux[2] > 70) 
     442                                        if (aux[2].length > 70) 
    456443                                                aux[2] = aux[2].substr(0,70) + "..."; 
    457444                                        td.style.width = "35%"; 
     
    459446                                        td.setAttribute("NoWrap","true"); 
    460447                                        td.style.overflow = "hidden"; 
    461                                         var td1  = subject; 
     448                                        var td1  = aux[2]; 
    462449 
    463450                                } 
     
    467454                                        td.align = "center"; 
    468455                                        td.onclick = _onclick; 
    469                                         var td1  = aux[4]; 
     456                                        var td1  = aux[3]; 
    470457                                } 
    471458                                if( j == 9) 
     
    474461                                        td.align = "center"; 
    475462                                        td.onclick = _onclick; 
    476                                         var td1  = aux[5]; 
     463                                        var td1  = aux[4]; 
    477464                                } 
    478465                                if (j == 10) 
    479466                                { 
    480                                         if (aux[6].match("U")) 
     467                                        if (aux[5].match("U")) 
    481468                                                add_className(tr, 'tr_msg_unread'); 
    482                                         if (aux[7].match("F")) 
     469                                        if (aux[5].match("F")) 
    483470                                                add_className(tr, 'flagged_msg'); 
    484471                                        var td1 = ''; 
     
    489476                        aux.splice(0,(aux.length)); 
    490477 
    491                 _dragArea.makeDragged(tr, uid_msg, subject, true, mailbox_id); 
     478                _dragArea.makeDragged(tr, uid_msg, subject, true, mailbox); 
    492479                tbody.appendChild(tr); 
    493480                } 
     
    524511                tr_element.className = "message_header"; 
    525512                td_element0 = document.createElement("TD"); 
    526                 td_element0.setAttribute("width", "6%"); 
     513                td_element0.setAttribute("width", "1%"); 
    527514                chk_box_element = document.createElement("INPUT"); 
    528515                chk_box_element.id  = "chk_box_select_all_messages"; 
     
    658645        } 
    659646 
    660         searchE.prototype.open_msg = function(mailbox_id, uid_msg, subject){ 
     647        searchE.prototype.open_msg = function(mailbox, uid_msg, subject){ 
    661648                var handler_get_msg = function(data){ 
    662649                        if(Element("border_id_" + uid_msg + "_r")){alert(get_lang("This message is already opened!"));} 
     
    664651                        //set_msg_as_read(msgs_to_set[i], false); 
    665652                } 
    666                 proxy_mensagens.get_msg(uid_msg,mailbox_id,false,handler_get_msg); 
     653                proxy_mensagens.get_msg(uid_msg,mailbox,false,handler_get_msg); 
    667654                /*var args   = "$this.imap_functions.get_info_msg"; 
    668655                var params = "msg_number=" + uid_msg + "&msg_folder=" + mailbox; 
Note: See TracChangeset for help on using the changeset viewer.