thomascube
2007-12-10 d39eecad6db1caee97624b80634587d98a75e701
program/js/list.js
@@ -37,6 +37,7 @@
  this.multiselect = false;
  this.draggable = false;
  this.keyboard = false;
  this.toggleselect = false;
  
  this.dont_select = false;
  this.drag_active = false;
@@ -132,10 +133,13 @@
/**
 * 'remove' message row from list (just hide it)
 */
remove_row: function(uid)
remove_row: function(uid, sel_next)
{
  if (this.rows[uid].obj)
    this.rows[uid].obj.style.display = 'none';
  if (sel_next)
    this.select_next();
  this.rows[uid] = null;
},
@@ -340,12 +344,20 @@
  if (this.last_selected != 0 && this.rows[this.last_selected])
    this.set_classname(this.rows[this.last_selected].obj, 'focused', false);
  // unselect if toggleselect is active and the same row was clicked again
  if (this.toggleselect && this.last_selected == id)
  {
    this.clear_selection();
    id = null;
  }
  else
    this.set_classname(this.rows[id].obj, 'focused', true);
  if (!this.selection.length)
    this.shift_start = null;
  this.last_selected = id;
  this.set_classname(this.rows[id].obj, 'focused', true);
},
@@ -523,8 +535,6 @@
  if (this.focused != true) 
    return true;
  this.shiftkey = e.shiftKey;
  var keyCode = document.layers ? e.which : document.all ? event.keyCode : document.getElementById ? e.keyCode : 0;
  var mod_key = rcube_event.get_modifier(e);
  switch (keyCode)
@@ -535,6 +545,7 @@
      break;
    default:
      this.shiftkey = e.shiftKey;
      this.key_pressed = keyCode;
      this.trigger_event('keypress');
  }