thomascube
2007-05-17 41bece1a1adffb524daa2203dfb91211f63989d8
program/js/list.js
@@ -95,7 +95,7 @@
init_row: function(row)
{
  // make references in internal array and set event handlers
  if (row && String(row.id).match(/rcmrow([0-9]+)/))
  if (row && String(row.id).match(/rcmrow([a-z0-9\-_=]+)/i))
  {
    var p = this;
    var uid = RegExp.$1;
@@ -117,12 +117,14 @@
/**
 *
 */
clear: function()
clear: function(sel)
{
  var tbody = document.createElement('TBODY');
  this.list.insertBefore(tbody, this.list.tBodies[0]);
  this.list.removeChild(this.list.tBodies[1]);
  this.rows = new Array();
  this.rows = new Array();
  if (sel) this.clear_selection();
},
@@ -582,7 +584,7 @@
  
    // get subjects of selectedd messages
    var names = '';
    var c, subject, obj;
    var c, node, subject, obj;
    for(var n=0; n<this.selection.length; n++)
    {
      if (n>12)  // only show 12 lines
@@ -597,10 +599,11 @@
        subject = '';
        for(c=0; c<obj.childNodes.length; c++)
          if (!subject && obj.childNodes[c].nodeName=='TD' && obj.childNodes[c].firstChild && obj.childNodes[c].firstChild.nodeType==3)
          if (obj.childNodes[c].nodeName=='TD' && (node = obj.childNodes[c].firstChild) && (node.nodeType==3 || node.nodeName=='A'))
          {
            subject = obj.childNodes[c].firstChild.data;
            subject = node.nodeType==3 ? node.data : node.innerHTML;
            names += (subject.length > 50 ? subject.substring(0, 50)+'...' : subject) + '<br />';
            break;
          }
      }
    }