Changeset d470f97 in github


Ignore:
Timestamp:
May 26, 2010 1:18:01 PM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
5d6a3aa
Parents:
982e0b0
Message:
  • fix FF crash (#1486752)
  • fix some issues after deleting last message from the list
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/js/app.js

    r13e1552 rd470f97  
    10531053  this.enable_command = function() 
    10541054  { 
    1055     var args = arguments, len = args.length, 
    1056       command, enable = args[len-1]; 
    1057  
    1058     for (var n=0, len=len-1; n<len; n++) { 
    1059       if (typeof args[n] === 'object') { 
    1060         for (var i in args[n]) 
    1061           this.enable_command(args[n][i], enable); 
    1062         continue; 
    1063       } 
    1064       command = args[n]; 
    1065       this.commands[command] = enable; 
    1066       this.set_button(command, (enable ? 'act' : 'pas')); 
     1055    var args = Array.prototype.slice.call(arguments), 
     1056      enable = args.pop(), cmd; 
     1057 
     1058    for (var n=0; n<args.length; n++) { 
     1059      cmd = args[n]; 
     1060      // argument of type array 
     1061      if (typeof cmd === 'string') { 
     1062        this.commands[cmd] = enable; 
     1063        this.set_button(cmd, (enable ? 'act' : 'pas')); 
     1064      } 
     1065      // push array elements into commands array 
     1066      else { 
     1067        for (var i in cmd) 
     1068          args.push(cmd[i]); 
     1069      } 
    10671070    } 
    10681071  }; 
     
    49544957          this.enable_command(this.env.message_commands, true); 
    49554958        } 
    4956         else if (this.task == 'mail') { 
    4957           this.triggerEvent('listupdate', { folder:this.env.mailbox, rowcount:this.message_list.rowcount }); 
    4958         } 
    49594959        else if (this.task == 'addressbook') { 
    49604960          this.triggerEvent('listupdate', { folder:this.env.source, rowcount:this.contact_list.rowcount }); 
    49614961        } 
    4962         break; 
    49634962 
    49644963      case 'purge': 
Note: See TracChangeset for help on using the changeset viewer.