Thomas Bruederli
2013-10-29 a9d476f0123273b8ccd51ffb4669d6631a8b40d6
program/js/list.js
@@ -50,7 +50,6 @@
  this.keyboard = false;
  this.toggleselect = false;
  this.dont_select = false;
  this.drag_active = false;
  this.col_drag_active = false;
  this.column_fixed = null;
@@ -409,7 +408,7 @@
  var evtarget = rcube_event.get_target(e),
    tagname = evtarget.tagName.toLowerCase();
  if (this.dont_select || (evtarget && (tagname == 'input' || tagname == 'img' || evtarget.onclick)))
  if (evtarget && (tagname == 'input' || tagname == 'img' || (tagname != 'a' && evtarget.onclick)))
    return true;
  // accept right-clicks
@@ -455,17 +454,11 @@
  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
  // selects/unselects currently selected row
  if (!this.drag_active && this.in_selection_before == id && !dblclicked)
    this.select_row(id, mod_key, false);
    this.select_row(id, mod_key, true);
  this.drag_start = false;
  this.in_selection_before = false;
@@ -509,8 +502,6 @@
    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;
@@ -796,7 +787,7 @@
        break;
      case CONTROL_KEY:
        if (!with_mouse)
        if (with_mouse)
          this.highlight_row(id, true);
        break;
@@ -921,7 +912,8 @@
    from_rowIndex = this._rowIndex(this.rows[this.shift_start].obj),
    to_rowIndex = this._rowIndex(to_row.obj);
  if (!to_row.expanded && to_row.has_children)
  // if we're going down the list, and we hit a thread, and it's closed, select the whole thread
  if (from_rowIndex < to_rowIndex && !to_row.expanded && to_row.has_children)
    if (to_row = this.rows[(this.row_children(id)).pop()])
      to_rowIndex = this._rowIndex(to_row.obj);
@@ -943,6 +935,7 @@
  }
},
/**
 * Helper method to emulate the rowIndex property of non-tr elements
 */