svncommit
2007-02-21 bb76bc64659c1cda3940e098c8d932f7a3b0664c
program/js/app.js
@@ -671,7 +671,7 @@
        if (this.env.uid && props.mimetype && find_in_array(props.mimetype, this.mimetypes)>=0)
          {
          if (props.mimetype == 'text/html')
            qstring += '&safe=1';
            qstring += '&_safe=1';
          this.attachment_win = window.open(this.env.comm_path+'&_action=get&'+qstring+'&_frame=1', 'rcubemailattachment');
          if (this.attachment_win)
            {
@@ -1091,13 +1091,13 @@
      {
      this.enable_command('show', 'reply', 'reply-all', 'forward', 'print', selected);
      this.enable_command('delete', 'moveto', list.selection.length>0 ? true : false);
      // start timer for message preview (wait for double click)
      if (selected && this.env.contentframe)
        this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, this.dblclick_time + 10);
      else if (this.env.contentframe)
        this.show_messageframe(false);
      }
    // start timer for message preview (wait for double click)
    if (selected && this.env.contentframe)
      this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, this.dblclick_time + 10);
    else if (this.env.contentframe)
      this.show_messageframe(false);
    };
@@ -1226,7 +1226,8 @@
      page = 1;
      add_url += '&_refresh=1';
      this.env.current_page = page;
      this.message_list.clear_selection();
      if (this.message_list)
        this.message_list.clear_selection();
      this.show_messageframe(false);
      }
    
@@ -2584,6 +2585,7 @@
        form.elements['_folder_name'].value = ''; 
      }
    this.sort_subscription_list();
    };
@@ -2732,6 +2734,32 @@
    return new_row;
    };
  // sort subscription folder list
  this.sort_subscription_list = function()
    {
    var index = new Array();
    var tbody = this.gui_objects.subscriptionlist.tBodies[0];
    var swapped = false;
    for (var i = 0; i<(tbody.childNodes.length-1); i++)
      if (this.env.subscriptionrows[tbody.childNodes[i].id]!=null)
        index.push(i);
    for (i = 0; i<(index.length-1); i++)
      {
      if (this.env.subscriptionrows[tbody.childNodes[index[i]].id][0]>
          this.env.subscriptionrows[tbody.childNodes[index[i+1]].id][0])
        {
        var swap = tbody.replaceChild(tbody.childNodes[index[i]], tbody.childNodes[index[i+1]]);
        if (typeof(tbody.childNodes[index[i]]) != 'undefined')
          tbody.insertBefore(swap, tbody.childNodes[index[i]])
        else
          tbody.appendChild(swap);
        swapped = true;
        }
      }
    if (swapped)
      this.sort_subscription_list();
    };
  /*********************************************************/
  /*********           GUI functionality           *********/