xhr = false; function searchE() { this.totalPages = 1; this.numPages = 5; this.lastPage = 0; this.searchW = []; this.condition = ""; this.sort_type = ""; this.name_box_search = ""; this.all_boxes = []; this.type = ""; this.txtfields = new Array("txt_ass","txt_de","txt_body","txt_para","txt_cc","txt_cco", "since_date", "before_date", "on_date"); this.selectFields = new Array("flagged", "seen", "answered", "recent"); this.divElement = null; this.elementChecked = false; this.modal = ""; } //Monta os forms dentro da janela; searchE.prototype.showForms = function(value, data) { if( trim(value) != "" ) { if (Element("check_all_msg")) Element("check_all_msg").checked = true; /* flag de controle. Evita o acesso ao elemento "check_all_msg" que será inserido no documento * apenas quando o template for carregado */ this.elementChecked = true; EsearchE.all_mailboxes(); EsearchE.func_search( value, null, 'SORTDATE_REVERSE' ); } else { var div = document.createElement("div"); var args = null; args = { "button_left" : "<<", "button_right" : ">>", "Inform_your_search_in_the_text_fields" : get_lang('Inform your search in the text fields'), "From" : get_lang('From'), "To" : get_lang('To'), "Cc" : get_lang('Cc'), "Subject" : get_lang('Subject'), "Message_body" : get_lang('Message body'), "Since_Date" : get_lang('Since Date'), "Before_Date" : get_lang('Before Date'), "On_Date" : get_lang('On Date'), "Flags" : get_lang('Flags'), "Flagged" : get_lang('Flagged'), "Unflagged" : get_lang('Unflagged'), "Seen" : get_lang('Seen'), "Unseen" : get_lang('Unseen'), "Answered_Forwarded" : get_lang('Answered/Forwarded'), "Unanswered_Unforwarded" : get_lang('Unanswered/Unforwarded'), "Recent" : get_lang('Recent'), "Old" : get_lang('Old'), "Search_the_messages_in_these_folders" : get_lang('Search the messages in these folders'), "In_all_the_folders" : get_lang('In all the folders'), "From_value" : (data != "undefined" ? data : "") } $(div).html(DataLayer.render("./templates/default/searchMails.ejs", args )); div.setAttribute( "style","overflow:hidden"); this.modal = $(div).dialog( { resizable : false, title : get_lang("Search Email"), position : 'center', width : 795, height : 450, modal : true, buttons : [ { text: get_lang("Close"), click: function() { $(this).dialog("close"); } }, { text: get_lang("Clean"), click: function() { EsearchE.func_clean(); } }, { text: get_lang("Search"), click: function() { EsearchE.func_search(); } } ], beforeClose : function() { $("#sel_search_nm_box1")[0].parentNode.removeChild($("#sel_search_nm_box1")[0]); $("#divFoldersSearch")[0].parentNode.removeChild($("#divFoldersSearch")[0]); //$(this).dialog("destroy"); $('fieldset', div).remove(); }, close:function(event, ui) { if(typeof(shortcut) != 'undefined') shortcut.disabled = false; }, open: function(event, ui) { if(typeof(shortcut) != 'undefined') shortcut.disabled = true; } }); this.divElement = div.parentNode; if( !Element("table_layer") ) { var table_layer = ""; } // Cria as caixas postais; this.foldersTree(); var dates = $("#since_date, #before_date").datepicker({ onSelect: function( selectedDate ) { var option = this.id == "since_date" ? "minDate" : "maxDate", instance = $( this ).data( "datepicker" ), date = $.datepicker.parseDate( instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings ); dates.not( this ).datepicker( "option", option, date ); } }); $("#on_date").datepicker(); } } searchE.prototype.foldersTree = function() { var treeFoldersSearch = new dFTree({name : 'treeFoldersSearch'}); var root = new dNode({id : 'root', caption: get_lang('My Folders'), onClick: "ttree.setFolder('root')"}); treeFoldersSearch.add(root, 'root'); for(var i = 0; i < folders.length ; i++ ) { var nn = new dNode({id:folders[i].folder_id, caption: lang_folder(folders[i].folder_name), plusSign:folders[i].folder_hasChildren, onClick: "ttree.setFolder('"+folders[i].folder_id+"')"}); if ( folders[i].folder_parent == '' ) { folders[i].folder_parent = 'root'; } else if ( folders[i].folder_parent.indexOf('user') != -1 ) { //if ( treeFoldersSearch.getNodeById('user') ) { var n_root_shared_folders = new dNode({id:'user', caption:get_lang("Shared Folders"), plusSign:true}); treeFoldersSearch.add( n_root_shared_folders,'root'); } } // Ver Ticket #1548 if( folders[i].folder_parent != 'root') { var node_parent = treeFoldersSearch.getNodeById(folders[i].folder_parent); if( typeof node_parent != 'undefined') { node_parent.plusSign = true; treeFoldersSearch.alter(node_parent); } } treeFoldersSearch.add( nn, folders[i].folder_parent ); } treeFoldersSearch.draw( $("#divFoldersSearch")[0] ); treeFoldersSearch.getNodeById("root")._select(); root.changeState(); } function openpage(data) { var _data = [3]; var _gears = []; var local_folders = []; // Gears - local if ( preferences.use_local_messages == 1 ) { temp = expresso_local_messages.list_local_folders(); for (var x in temp) { local_folders.push(temp[x][0]); } } if ( local_folders.length > 0 ) _gears = expresso_local_messages.search( local_folders, expresso_local_messages.getFilter() ); _data['data'] = data['data']; _data['num_msgs'] = data['num_msgs']; _data['gears_num_msgs'] = _gears.length; delete_border( data['currentTab'], false); EsearchE.mount_result(_data); } searchE.prototype.show_paging = function(size) { var span_pg = Element("span_paging"+currentTab); if( span_pg == null ) { span_pg = document.createElement('span'); span_pg.id = "span_paging"+currentTab; } else span_pg.innerHTML = ""; if(size > parseInt(preferences.max_email_per_page)) { this.totalPages = Math.ceil(size/preferences.max_email_per_page); if((size/preferences.max_email_per_page) > this.totalPages) this.totalPages++; } if(this.page != 0 && this.page != null) { _link = document.createElement("A"); if( this.value ) _link.href = 'javascript:EsearchE.quickSearchMail( false, '+0+', false, "'+currentTab+'" )'; else { _link.href = 'javascript:EsearchE.page=0;'; _link.href += 'cExecute("$this.imap_functions.search_msg",openpage,"condition='+this.condition+'&sort_type='+this.sort_type+'&page=0¤t_tab='+currentTab+'");'; } } else { _link = document.createElement("SPAN"); } span_pg.appendChild(_link); _link.innerHTML = "<<"; _link.title = get_lang("First"); span_pg.innerHTML += " "; if(this.page == this.lastPage + (this.numPages)) { this.lastPage = this.page - 1; } else if((this.lastPage != 0 && this.lastPage == this.page) || this.page == (this.totalPages-1)) { this.lastPage = this.page - (this.numPages - 1); } else if(this.page == 0) { this.lastPage = 0; } if(this.lastPage < 0) this.lastPage = 0; else if(this.lastPage > 0 && (this.lastPage > (this.totalPages -(this.numPages - 1)))) this.lastPage = this.totalPages -(this.numPages); var hasMarked = false; if(this.page == null){ this.page = 0; } for(i = this.lastPage; i <= this.totalPages; i++) { if( ( i * preferences.max_email_per_page ) > size) { break; } if( this.page == i || (i == this.totalPages && !hasMarked) ) { var _link = document.createElement('span'); _link.setAttribute("style", "font-weight:bold; color:red") _link.innerHTML = ( this.page + 1 ) + " "; } else { var _page = i; var _link = document.createElement('A'); _link.innerHTML = ( _page + 1 ) + " "; if( this.value ) _link.href = 'javascript: EsearchE.quickSearchMail( false, '+i+', false, "'+currentTab+'" )'; else{ _link.href = 'javascript:EsearchE.page='+i+';'; _link.href += 'cExecute("$this.imap_functions.search_msg",openpage,"condition='+this.condition+'&sort_type='+this.sort_type+'&page='+_page+'¤t_tab='+currentTab+'");'; } } _link.innerHTML = " ... "; if(i == (this.lastPage + this.numPages)) { span_pg.appendChild( _link ); break; } else if(this.lastPage == 0 || i != this.lastPage) { _link.innerHTML = " "+( i + 1 )+" "; } span_pg.appendChild( _link ); } if(this.page != (this.totalPages - 1)) { _link = document.createElement("A"); if( this.value ) _link.href = 'javascript: EsearchE.quickSearchMail( false, '+(this.totalPages-1)+', false, "'+currentTab+'" )'; else{ _link.href = 'javascript:EsearchE.page='+(this.totalPages-1)+';'; _link.href += 'cExecute("$this.imap_functions.search_msg",openpage,"condition='+this.condition+'&sort_type='+this.sort_type+'&page='+(this.totalPages-1)+'¤t_tab='+currentTab+'");'; } } else { _link = document.createElement("SPAN"); } span_pg.innerHTML += " "; span_pg.appendChild(_link); _link.title = get_lang("Last"); _link.innerHTML += ">>"; Element("div_menu_c3").appendChild(span_pg); } searchE.prototype.searchFor = function( borderID, sortType ) { var border_id = borderID; var sort_type = sortType; var is_local = border_id.match('.*_local_.*'); if(!is_local) { if( this.value ) return this.quickSearchMail( document.getElementsByName(currentTab)[0].value, false, sortType, border_id ); } var args = "$this.imap_functions.search_msg"; var params = "condition="+EsearchE.condition+"&page="+EsearchE.page+"&sort_type="+sort_type; var handler = function( data ) { var allMsg = [3]; var gears = []; var local_folders = []; if ( preferences.use_local_messages == 1 && is_local) { temp = expresso_local_messages.list_local_folders(); for (var x in temp) { local_folders.push( temp[x][0] ); } if ( local_folders.length > 0 ) { var currentSearch = document.getElementsByName(currentTab); expresso_local_messages.setSortType(sortType); gears = expresso_local_messages.search( local_folders, "##ALL <=>"+currentSearch[0].value +"##" ); } } if (!is_local) { if( data['num_msgs']) { allMsg['data'] = data['data']; allMsg['num_msgs'] = data['num_msgs']; } } if (gears.length > 0) { allMsg['data_gears'] = gears; } var currentSearch = document.getElementsByName(currentTab)[0].value; delete_border( border_id, false ); EsearchE.mount_result( allMsg , sort_type, null, null, null, currentSearch ); }; if (is_local) { eval("handler('none')"); } else { cExecute(args,handler,params); } } searchE.prototype.viewLocalMessage = function() { var data = [2]; var gears = []; var local_folders = []; // Gears - local if ( preferences.use_local_messages == 1 ) { temp = expresso_local_messages.list_local_folders(); for (var x in temp) { local_folders.push( temp[x][0] ); } if ( local_folders.length > 0 ){ var currentSearch = document.getElementsByName(currentTab); if(currentSearch[0].value != ''){ gears = expresso_local_messages.search( local_folders, "##ALL <=>"+currentSearch[0].value +"##"); }else{ if(openTab.condition[currentTab]){ var condit = openTab.condition[currentTab][0].split(','); var filter = condit[0].split('##'); gears = expresso_local_messages.search( local_folders, '##'+filter[1]+'##'); } } } data['data_gears'] = gears; data['num_msgs'] = gears.length; if(data['num_msgs'] != undefined) write_msg( data['num_msgs'] + " " + get_lang("results found") ); EsearchE.mount_result( data, 'SORTDATE' ); } } searchE.prototype.make_tr_message = function(aux,border_id,i) { /** * Preenche a estrutura de cache de mensagens para posterior consulta de * informações sobre as mensagens no escopo global. */ if (!onceOpenedHeadersMessages[aux.boxname]) onceOpenedHeadersMessages[aux.boxname] = {}; onceOpenedHeadersMessages[aux.boxname][aux.uid] = aux; var tr = document.createElement("TR"); if(typeof(preferences.line_height) != 'undefined') tr.style.height = preferences.line_height; var msg_folder = get_current_folder(); var mailbox = aux.boxname; var uid_msg = aux.uid; var subject = aux.subject; var labels = aux.labels; var followupflagged = aux.followupflagged; tr.id = uid_msg+"_s"+numBox; // Keep the two lines together please tr.setAttribute('name',mailbox); tr.name = mailbox; // set attribute role id_folder tr.setAttribute('role', uid_msg+'_'+mailbox); tr.role = uid_msg+'_'+mailbox; if ( aux.flag.match("U") ) add_className(tr,'tr_msg_unread'); add_className(tr, i%2 != 0 ? 'tr_msg_read2' : 'tr_msg_read'); var _onclick = function() { proxy_mensagens.get_msg(this.parentNode.id,url_encode(this.parentNode.getAttribute('name')),false,show_msg); }; for(var j=0 ; j <= 11 ; j++) { var td = document.createElement("TD"); add_className(td, 'td_msg'); if (j == 0) { td.setAttribute("width", colSizes[1][0]); var chk_onclick; if (is_ie) chk_onclick = "changeBgColor(window.event,"+uid_msg+");"; else chk_onclick = "changeBgColor(event,'"+uid_msg+"');"; //'search_' + numBox var td1 = ''; } if (j == 1) { td.setAttribute("width", colSizes[1][1]); if (aux.flag.match('T')) { attachNum = parseInt(aux.flag.substr(aux.flag.indexOf('T')+1)); td1 = ""; } else td1 = ''; } if (j == 2) { td.setAttribute("width", colSizes[1][2]); td.id = "td_message_answered_"+uid_msg; if (aux.flag.match('X')) td1 = ''; else if (aux.flag.match('A')) td1 = ''; else td1 = ''; } if (j == 3) { td.setAttribute("width", colSizes[1][3]); td.id = "td_message_important_"+uid_msg; if (aux.flag.match("F")) { add_className(tr, 'flagged_msg'); td1 = ""; } else td1 = ''; } if (j == 4) { td.setAttribute("width", colSizes[1][4]); td.id = "td_message_followup_search_"+uid_msg; td.setAttribute("class","search-result-item"); td1 = '
'; $(td).click(function(event, ui){ var messageClickedId = $(this).attr('id').match(/td_message_followup_search_([\d]+)/)[1]; var followupColor = $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited").css('backgroundColor'); $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited") .html(''); $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited").css("background", "transparent"); /**TODO Alterar após melhorias no filtro da camada javascript*/ DataLayer.remove('followupflagged', false); var flagged = DataLayer.get('followupflagged', {filter: [ 'AND', ['=', 'messageNumber', messageClickedId], ['=', 'folderName', mailbox] ]}); if(flagged == '' || flagged == [] || flagged == 'undefined'){ /** * Aplica followupflag de Acompanhamento */ aux.followupflagged = { uid : User.me.id, folderName : mailbox, messageNumber : messageClickedId, alarmTime : false, backgroundColor : '#FF2016', followupflagId: '1' }; aux.followupflagged.id = DataLayer.put('followupflagged', aux.followupflagged); DataLayer.commit(false, false, function(data){ var fail = false; $.each(data, function(index, value) { fail = false; if(typeof value === 'string'){ fail = value; } }); $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited") .html(''); if (fail) { var isCurrentFolder = current_folder == mailbox ? '#td_message_followup_' + messageClickedId + ', ' : ''; $(isCurrentFolder + 'tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited").css("background", "#CCCCCC"); MsgsCallbackFollowupflag[fail](); return false; } if(current_folder == mailbox){ $('#td_message_followup_' + messageClickedId + ', ' + 'tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).attr('title', get_lang('Follow up')).find(".flag-edited").css("background", aux.followupflagged.backgroundColor); }else{ $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).attr('title', get_lang('Follow up')).find(".flag-edited").css("background", aux.followupflagged.backgroundColor); } updateCacheFollowupflag(messageClickedId, mailbox, true); }); }else if(onceOpenedHeadersMessages[mailbox][messageClickedId]['followupflagged'].followupflag.name == 'Follow up'){ /** * Remover followupflag de Acompanhamento (DFD0078:RI25) */ $(this).find(".flag-edited").css("background", "#cccccc"); DataLayer.remove('followupflagged', flagged[0].id ); DataLayer.commit(false, false, function(){ $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited") .html(''); if(current_folder == mailbox){ updateCacheFollowupflag(messageClickedId, mailbox, false); $('#td_message_followup_' + messageClickedId + ', ' + 'tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).attr('title', '').find(".flag-edited").css("background", '#CCC'); $('#td_message_followup_' + messageClickedId + ', ' + 'tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited") .find("img").attr("src", "../prototype/modules/mail/img/flagEditor.png").css("margin-left","0"); }else{ updateCacheFollowupflag(messageClickedId, mailbox, false); $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).attr('title', '').find(".flag-edited").css("background", '#CCC'); $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited") .find("img").attr("src", "../prototype/modules/mail/img/flagEditor.png").css("margin-left","0"); } }); } else { $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited") .html(''); $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited").css("background", followupColor); $(this).parents('[role="'+messageClickedId+'_'+mailbox+'"]').attr('class', 'selected_msg').find(':checkbox').trigger('click'); configureFollowupflag(); } //if(!){} }); } if (j == 5) { td.setAttribute("width", colSizes[1][5]); td.id = "td_message_labels_search_"+uid_msg; td.setAttribute("class","td-label-search"); if (aux.labels) { td1 = ''; updateLabelsColumn(aux) } else { td1 = ''; } } if (j == 6) { td.setAttribute("width", colSizes[1][6]); td.id = "td_message_sent_"+uid_msg; td1 = ''; } if ( j == 7 ) { td.setAttribute("width", colSizes[1][7]); td.className = "td_resizable"; td.onclick = _onclick; var nm_box = aux.boxname.split(cyrus_delimiter); var td1 = nm_box.pop(); td.setAttribute("NoWrap","true"); td.style.overflow = "hidden"; td.style.color = "#42795b"; td.style.fontWeight = "bold"; var td1 = get_lang(td1).substr(get_lang(td1).length-1) == "*"?td1:get_lang(td1); td1 = translateFolder(td1); if (proxy_mensagens.is_local_folder(td1)) { var td1 = this.aux_local_folder_display(td1); } } if( j == 8 ) { var name; if( aux.from.name != undefined){ name = aux.from.name; }else{ name = aux.from; } if ( name !== null && name.length > 29) name = name.substr(0,29) + "..."; td.setAttribute("width", colSizes[1][8]); td.className = "td_resizable"; td.onclick = _onclick; td.setAttribute("NoWrap","true"); td.style.overflow = "hidden"; var td1 = ' "; } if( j == 9 ) { //var subject_encode = url_encode(subject); aux.subject = html_entities(aux.subject); if (aux.subject.length <= 1) aux.subject = "(" + get_lang("no subject") + ")"; if (aux.subject.length > 70) aux.subject = aux.subject.substr(0,70) + "..."; td.setAttribute("width", colSizes[1][9]); td.className = "td_resizable td_msg_search_subject"; td.onclick = _onclick; td.setAttribute("NoWrap","true"); td.style.overflow = "hidden"; var td1 = aux.subject; } if( j == 10 ) { td.setAttribute("width", colSizes[1][10]); td.className = "td_resizable"; td.align = "center"; td.onclick = _onclick; if( validate_date( aux.udate ) ) { var td1 = aux.udate; } else { var dt = new Date( aux.udate * 1000 ); var td1 = dt.getDate() + "/"; if( !( dt.getMonth() + 1 ).toString().match(/\d{2}/) ) td1 += "0"+( dt.getMonth() + 1 ) + "/"; else td1 += ( dt.getMonth() + 1 ) + "/"; td1 += dt.getFullYear(); } } if( j == 11 ) { td.setAttribute("width", colSizes[1][11]); td.className = "td_resizable"; td.align = "center"; td.onclick = _onclick; if(aux.Size != undefined){ var td1 = borkb(aux.Size); } else{ var td1 = borkb(aux.size); } } if( j == 12 ) { if (aux.flag.match("U")) add_className(tr, 'tr_msg_unread'); if (aux.flag.match("F")) add_className(tr, 'flagged_msg'); var td1 = ''; } if (j<12) { td.innerHTML = td1; //Carregar os followupflag nos resultados. if (aux.followupflagged) { if(aux.followupflagged.followupflag.id < 7){ var nameFollowupflag = get_lang(aux.followupflagged.followupflag.name); }else{ var nameFollowupflag = aux.followupflagged.followupflag.name; } $(td).attr('title', nameFollowupflag) .find(".flag-edited").css("background",aux.followupflagged.backgroundColor); if(aux.followupflagged.isDone == "1"){ $(td).find(".flag-edited").find("img") .attr("src", "../prototype/modules/mail/img/flagChecked.png") .css("margin-left","-3px"); } } else { $(td).find(".flag-edited").css("background","#cccccc"); } tr.appendChild(td); } } //_dragArea.makeDragged(tr, uid_msg, subject, true, mailbox); $(tr).draggable({ start : function(){ if($(".shared-folders").length){ $(".shared-folders").parent().find('.folder:not(".shared-folders")').droppable({ over : function(a, b){ //SETA BORDA EM VOLTA DA PASTA $(this).css("border", "1px solid black"); }, out : function(){ //RETIRA BORDA EM VOLTA DA PASTA $(this).css("border", ""); }, //accept: ".draggin_mail", drop : function(event, ui){ $(this).css("border", ""); if($(this).parent().attr('id') == undefined){ var folder_to = 'INBOX'; var to_folder_title = get_lang("Inbox"); }else{ var folder_to = $(this).parent().attr('id'); var to_folder_title = $(this).attr('title'); } var folder_to_move = ui.draggable.parent().attr('id'); var border_id = ui.draggable.find("input[type=hidden]").attr("name"); // Mensagens : SE O DROP VIER DA LISTA DE MENSAGENS : if(ui.draggable.parents('[id^="content_id_"]')[0]){ move_search_msgs("content_id_"+border_id, folder_to, to_folder_title); return refresh(); } } }); } }, stop :function(){ $(".shared-folders").parent().find(".folder").droppable("destroy"); }, helper: function(event){ if($(this).find("input:checkbox").attr("checked") != "checked"){ $(this).find("input:checkbox").trigger('click'); $(this).addClass("selected_msg"); } if($("#content_id_"+border_id).find("tr input:checked").length > 1) return $(DataLayer.render('../prototype/modules/mail/templates/draggin_box.ejs', {texto : (($("#content_id_"+border_id).find("tr input:checked")).length+" mensagens selecionadas"), type: "messages"})); if( $(this).find(".td_msg_search_subject").text().length > 18 ) return $(DataLayer.render('../prototype/modules/mail/templates/draggin_box.ejs', {texto : $(this).find(".td_msg_search_subject").text().substring(0,18) + "...", type: "messages"})); else return $(DataLayer.render('../prototype/modules/mail/templates/draggin_box.ejs', {texto : $(this).find(".td_msg_search_subject").text(), type: "messages"})); }, cursorAt: {cursor: "crosshair", top: -5, left: -5}, refreshPositions: true , scroll: true, scrollSensitivity: 100, scrollSpeed: 100, containment: "#divAppbox" }).bind("contextmenu", function(event){ if(event.button == 2) if($(this).find("input:checkbox").attr("checked") != "checked"){ $(this).find("input:checkbox").trigger('click'); $(this).addClass("selected_msg"); } }); return tr; } // Form resultado searchE.prototype.mount_result = function( Data, sort_type, keep_border, keep_filled, division, actualSearch ) { var data = ( Data['data'] ) ? Data['data'] : Data['data_gears']; if ( data == undefined ) return; var msg_folder = get_current_folder(); var messageNumbers = new Array(); var messageFolders = new Array(); for (var i=0; i