/* +-----------------------------------------------------------------------+ | RoundCube List Widget | | | | This file is part of the RoundCube Webmail client | | Copyright (C) 2006-2008, RoundCube Dev, - Switzerland | | Licensed under the GNU GPL | | | +-----------------------------------------------------------------------+ | Authors: Thomas Bruederli | | Charles McNulty | +-----------------------------------------------------------------------+ | Requires: common.js | +-----------------------------------------------------------------------+ $Id: list.js 344 2006-09-18 03:49:28Z thomasb $ */ /** * RoundCube List Widget class * @contructor */ function rcube_list_widget(list, p) { // static contants this.ENTER_KEY = 13; this.DELETE_KEY = 46; this.BACKSPACE_KEY = 8; this.list = list ? list : null; this.frame = null; this.rows = []; this.selection = []; this.rowcount = 0; this.subject_col = -1; this.shiftkey = false; this.multiselect = false; this.multi_selecting = false; this.draggable = false; this.keyboard = false; this.toggleselect = false; this.dont_select = false; this.drag_active = false; this.last_selected = 0; this.shift_start = 0; this.in_selection_before = false; this.focused = false; this.drag_mouse_start = null; this.dblclick_time = 600; this.row_init = function(){}; this.events = { click:[], dblclick:[], select:[], keypress:[], dragstart:[], dragmove:[], dragend:[] }; // overwrite default paramaters if (p && typeof(p)=='object') for (var n in p) this[n] = p[n]; } rcube_list_widget.prototype = { /** * get all message rows from HTML table and init each row */ init: function() { if (this.list && this.list.tBodies[0]) { this.rows = new Array(); this.rowcount = 0; var row; for(var r=0; r