thomascube
2009-05-26 a25d3969a00e60bcbfdf6907f7ce77d4651c1179
program/js/app.js
@@ -150,6 +150,9 @@
    // enable general commands
    this.enable_command('logout', 'mail', 'addressbook', 'settings', true);
    
    if (this.env.permaurl)
      this.enable_command('permaurl', true);
    switch (this.task)
      {
      case 'mail':
@@ -162,7 +165,7 @@
          this.message_list.addEventListener('select', function(o){ p.msglist_select(o); });
          this.message_list.addEventListener('dragstart', function(o){ p.drag_start(o); });
          this.message_list.addEventListener('dragmove', function(o, e){ p.drag_move(e); });
          this.message_list.addEventListener('dragend', function(o){ p.drag_active = false; });
          this.message_list.addEventListener('dragend', function(o, e){ p.drag_end(e); });
          document.onmouseup = function(e){ return p.doc_mouse_up(e); };
          this.message_list.init();
@@ -278,7 +281,7 @@
          this.contact_list.addEventListener('select', function(o){ p.contactlist_select(o); });
          this.contact_list.addEventListener('dragstart', function(o){ p.drag_start(o); });
          this.contact_list.addEventListener('dragmove', function(o, e){ p.drag_move(e); });
          this.contact_list.addEventListener('dragend', function(o){ p.drag_active = false; });
          this.contact_list.addEventListener('dragend', function(o, e){ p.drag_end(e); });
          this.contact_list.init();
          if (this.env.cid)
@@ -559,14 +562,21 @@
        this.switch_task(command);
        break;
      case 'permaurl':
        if (obj && obj.href && obj.target)
          return true;
        else if (this.env.permaurl)
          parent.location.href = this.env.permaurl;
        break;
      case 'open':
   var uid;
        var uid;
        if (uid = this.get_single_uid())
     {
     obj.href = '?_task='+this.env.task+'&_action=show&_mbox='+urlencode(this.env.mailbox)+'&_uid='+uid;
     return true;
          }
   break;
        {
          obj.href = '?_task='+this.env.task+'&_action=show&_mbox='+urlencode(this.env.mailbox)+'&_uid='+uid;
          return true;
        }
        break;
      // misc list commands
      case 'list':
@@ -1258,6 +1268,21 @@
    }
  };
  this.drag_end = function(e)
  {
    this.drag_active = false;
    // over the folders
    if (this.gui_objects.folderlist && this.env.folder_coords) {
      for (var k in this.env.folder_coords) {
        if (k == this.env.last_folder_target) {
          $(this.get_folder_li(k)).removeClass('droptarget');
          this.env.last_folder_target = null;
        }
      }
    }
  };
  this.drag_move = function(e)
  {
    if (this.gui_objects.folderlist && this.env.folder_coords) {