rcube_list_widget.rows is not an array - fixed checking if it's empty (#1489359)
| | |
| | | { |
| | | var len = a_uids.length, |
| | | i, uid, all_deleted = true, |
| | | rows = this.message_list ? this.message_list.rows : []; |
| | | rows = this.message_list ? this.message_list.rows : {}; |
| | | |
| | | if (len == 1) { |
| | | if (!rows.length || (rows[a_uids[0]] && !rows[a_uids[0]].deleted)) |
| | | if (!this.message_list || (rows[a_uids[0]] && !rows[a_uids[0]].deleted)) |
| | | this.flag_as_deleted(a_uids); |
| | | else |
| | | this.flag_as_undeleted(a_uids); |
| | |
| | | var r_uids = [], |
| | | post_data = this.selection_post_data({_uid: this.uids_to_list(a_uids), _flag: 'delete'}), |
| | | lock = this.display_message(this.get_label('markingmessage'), 'loading'), |
| | | rows = this.message_list ? this.message_list.rows : [], |
| | | rows = this.message_list ? this.message_list.rows : {}, |
| | | count = 0; |
| | | |
| | | for (var i=0, len=a_uids.length; i<len; i++) { |
| | |
| | | this.flag_deleted_as_read = function(uids) |
| | | { |
| | | var icn_src, uid, i, len, |
| | | rows = this.message_list ? this.message_list.rows : []; |
| | | rows = this.message_list ? this.message_list.rows : {}; |
| | | |
| | | uids = String(uids).split(','); |
| | | |
| | |
| | | this.tbody; |
| | | this.fixed_header; |
| | | this.frame = null; |
| | | this.rows = []; |
| | | this.rows = {}; |
| | | this.selection = []; |
| | | this.rowcount = 0; |
| | | this.colcount = 0; |
| | |
| | | } |
| | | |
| | | 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) |
| | |
| | | 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; |
| | | } |
| | |
| | | */ |
| | | 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 |