| | |
| | | |
| | | this.msglist_set_coltypes = function(list) |
| | | { |
| | | var i, found, name, cols = list.list.tHead.rows[0].cells; |
| | | var i, found, name, cols = list.thead.rows[0].cells; |
| | | |
| | | this.env.coltypes = []; |
| | | |
| | |
| | | + (flags.flagged ? ' flagged' : '') |
| | | + (flags.unread_children && flags.seen && !this.env.autoexpand_threads ? ' unroot' : '') |
| | | + (message.selected ? ' selected' : ''), |
| | | // for performance use DOM instead of jQuery here |
| | | row = document.createElement('tr'); |
| | | |
| | | row.id = 'rcmrow'+uid; |
| | | row = { cols:[], style:{}, id:'rcmrow'+uid }; |
| | | |
| | | // message status icons |
| | | css_class = 'msgicon'; |
| | |
| | | // add each submitted col |
| | | for (n in this.env.coltypes) { |
| | | c = this.env.coltypes[n]; |
| | | col = document.createElement('td'); |
| | | col.className = String(c).toLowerCase(); |
| | | col = { className: String(c).toLowerCase() }; |
| | | |
| | | if (c == 'flag') { |
| | | css_class = (flags.flagged ? 'flagged' : 'unflagged'); |
| | |
| | | html = cols[c]; |
| | | |
| | | col.innerHTML = html; |
| | | |
| | | row.appendChild(col); |
| | | row.cols.push(col); |
| | | } |
| | | |
| | | list.insert_row(row, attop); |
| | |
| | | if (root) |
| | | row = rows[root] ? rows[root].obj : null; |
| | | else |
| | | row = this.message_list.list.tBodies[0].firstChild; |
| | | row = this.message_list.tbody.firstChild; |
| | | |
| | | while (row) { |
| | | if (row.nodeType == 1 && (r = rows[row.uid])) { |
| | |
| | | this.delete_excessive_thread_rows = function() |
| | | { |
| | | var rows = this.message_list.rows, |
| | | tbody = this.message_list.list.tBodies[0], |
| | | tbody = this.message_list.tbody, |
| | | row = tbody.firstChild, |
| | | cnt = this.env.pagesize + 1; |
| | | |
| | |
| | | newcid = newcid+'-'+source; |
| | | } |
| | | |
| | | if (list.rows[cid] && (row = list.rows[cid].obj)) { |
| | | for (c=0; c<cols_arr.length; c++) |
| | | if (row.cells[c]) |
| | | $(row.cells[c]).html(cols_arr[c]); |
| | | |
| | | // cid change |
| | | if (newcid) { |
| | | newcid = this.html_identifier(newcid); |
| | | row.id = 'rcmrow' + newcid; |
| | | list.remove_row(cid); |
| | | list.init_row(row); |
| | | list.selection[0] = newcid; |
| | | row.style.display = ''; |
| | | } |
| | | } |
| | | list.update_row(cid, cols_arr, newcid, true); |
| | | }; |
| | | |
| | | // add row to contacts list |
| | |
| | | return false; |
| | | |
| | | var c, col, list = this.contact_list, |
| | | row = document.createElement('tr'); |
| | | row = { cols:[] }; |
| | | |
| | | row.id = 'rcmrow'+this.html_identifier(cid); |
| | | row.className = 'contact ' + (classes || ''); |
| | |
| | | |
| | | // add each submitted col |
| | | for (c in cols) { |
| | | col = document.createElement('td'); |
| | | col = {}; |
| | | col.className = String(c).toLowerCase(); |
| | | col.innerHTML = cols[c]; |
| | | row.appendChild(col); |
| | | row.cols.push(col); |
| | | } |
| | | |
| | | list.insert_row(row); |
| | |
| | | |
| | | this.update_identity_row = function(id, name, add) |
| | | { |
| | | var row, col, list = this.identity_list, |
| | | var list = this.identity_list, |
| | | rid = this.html_identifier(id); |
| | | |
| | | if (list.rows[rid] && (row = list.rows[rid].obj)) { |
| | | $(row.cells[0]).html(name); |
| | | } |
| | | else if (add) { |
| | | row = $('<tr>').attr('id', 'rcmrow'+rid).get(0); |
| | | col = $('<td>').addClass('mail').html(name).appendTo(row); |
| | | list.insert_row(row); |
| | | if (add) { |
| | | list.insert_row({ id:'rcmrow'+rid, cols:[ { className:'mail', innerHTML:name } ] }); |
| | | list.select(rid); |
| | | } |
| | | else { |
| | | list.update_row(rid, [ name ]); |
| | | } |
| | | }; |
| | | |
| | |
| | | this.set_message_coltypes = function(coltypes, repl, smart_col) |
| | | { |
| | | var list = this.message_list, |
| | | thead = list ? list.list.tHead : null, |
| | | thead = list ? list.thead : null, |
| | | cell, col, n, len, th, tr; |
| | | |
| | | this.env.coltypes = coltypes; |