| | |
| | | this.tbody; |
| | | this.fixed_header; |
| | | this.frame = null; |
| | | this.rows = []; |
| | | this.rows = {}; |
| | | this.selection = []; |
| | | this.rowcount = 0; |
| | | this.colcount = 0; |
| | |
| | | this.keyboard = false; |
| | | this.toggleselect = false; |
| | | |
| | | this.dont_select = false; |
| | | this.drag_active = false; |
| | | this.col_drag_active = false; |
| | | this.column_fixed = null; |
| | |
| | | } |
| | | |
| | | if (this.tbody) { |
| | | this.rows = []; |
| | | this.rows = {}; |
| | | this.rowcount = 0; |
| | | |
| | | var r, len, rows = this.tbody.childNodes; |
| | |
| | | $(this.row_tagname() + ':not(.thead)', this.tbody).remove(); |
| | | } |
| | | |
| | | this.rows = []; |
| | | this.rows = {}; |
| | | this.rowcount = 0; |
| | | |
| | | if (sel) |
| | |
| | | var evtarget = rcube_event.get_target(e), |
| | | tagname = evtarget.tagName.toLowerCase(); |
| | | |
| | | if (this.dont_select || (evtarget && (tagname == 'input' || tagname == 'img'))) |
| | | if (evtarget && (tagname == 'input' || tagname == 'img' || (tagname != 'a' && evtarget.onclick))) |
| | | return true; |
| | | |
| | | // accept right-clicks |
| | | if (rcube_event.get_button(e) == 2) |
| | | return true; |
| | | |
| | | this.in_selection_before = e.istouch || this.in_selection(id) ? id : false; |
| | | this.in_selection_before = e && e.istouch || this.in_selection(id) ? id : false; |
| | | |
| | | // selects currently unselected row |
| | | if (!this.in_selection_before) { |
| | |
| | | if ((evtarget && (tagname == 'input' || tagname == 'img'))) |
| | | return true; |
| | | |
| | | // don't do anything (another action processed before) |
| | | if (this.dont_select) { |
| | | this.dont_select = false; |
| | | return false; |
| | | } |
| | | |
| | | var dblclicked = now - this.rows[id].clicked < this.dblclick_time; |
| | | |
| | | // unselects currently selected row |
| | |
| | | this.in_selection_before = false; |
| | | |
| | | // row was double clicked |
| | | if (this.rows && dblclicked && this.in_selection(id)) { |
| | | if (this.rowcount && dblclicked && this.in_selection(id)) { |
| | | this.triggerEvent('dblclick'); |
| | | now = 0; |
| | | } |
| | |
| | | evtarget = rcube_event.get_target(e), |
| | | mod_key = rcube_event.get_modifier(e); |
| | | |
| | | // Don't select this message |
| | | this.dont_select = true; |
| | | // Don't treat double click on the expando as double click on the message. |
| | | row.clicked = 0; |
| | | |
| | |
| | | */ |
| | | get_next_row: function() |
| | | { |
| | | if (!this.rows) |
| | | if (!this.rowcount) |
| | | return false; |
| | | |
| | | var last_selected_row = this.rows[this.last_selected], |
| | |
| | | |
| | | get_prev_row: function() |
| | | { |
| | | if (!this.rows) |
| | | if (!this.rowcount) |
| | | return false; |
| | | |
| | | var last_selected_row = this.rows[this.last_selected], |
| | |
| | | */ |
| | | select_all: function(filter) |
| | | { |
| | | if (!this.rows || !this.rows.length) |
| | | if (!this.rowcount) |
| | | return false; |
| | | |
| | | // reset but remember selection first |
| | |
| | | */ |
| | | invert_selection: function() |
| | | { |
| | | if (!this.rows || !this.rows.length) |
| | | if (!this.rowcount) |
| | | return false; |
| | | |
| | | // remember old selection |