Changeset 14d494f in github


Ignore:
Timestamp:
Sep 28, 2011 5:00:25 AM (20 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.7, release-0.8
Children:
1991b77
Parents:
0c1cb2f
Message:
  • Fix misleading display when chaning editor type (#1488104), fix handling of custom commands result
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rb175394 r14d494f  
    22=========================== 
    33 
     4- Fix misleading display when chaning editor type (#1488104) 
    45- Add loading indicator on contact delete 
    56- Fix bug where after delete message rows can be added to the list of another folder (#1487752) 
  • program/js/app.js

    rb175394 r14d494f  
    440440  this.command = function(command, props, obj) 
    441441  { 
     442    var ret; 
     443 
    442444    if (obj && obj.blur) 
    443445      obj.blur(); 
     
    463465    // process external commands 
    464466    if (typeof this.command_handlers[command] === 'function') { 
    465       var ret = this.command_handlers[command](props, obj); 
     467      ret = this.command_handlers[command](props, obj); 
    466468      return ret !== undefined ? ret : (obj ? false : true); 
    467469    } 
    468470    else if (typeof this.command_handlers[command] === 'string') { 
    469       var ret = window[this.command_handlers[command]](props, obj); 
     471      ret = window[this.command_handlers[command]](props, obj); 
    470472      return ret !== undefined ? ret : (obj ? false : true); 
    471473    } 
     
    473475    // trigger plugin hooks 
    474476    this.triggerEvent('actionbefore', {props:props, action:command}); 
    475     var ret = this.triggerEvent('before'+command, props); 
     477    ret = this.triggerEvent('before'+command, props); 
    476478    if (ret !== undefined) { 
    477       // abort if one the handlers returned false 
     479      // abort if one of the handlers returned false 
    478480      if (ret === false) 
    479481        return false; 
     
    481483        props = ret; 
    482484    } 
     485 
     486    ret = undefined; 
    483487 
    484488    // process internal command 
     
    10461050      default: 
    10471051        var func = command.replace(/-/g, '_'); 
    1048         if (this[func] && typeof this[func] === 'function') 
    1049           this[func](props); 
    1050         break; 
    1051     } 
    1052  
    1053     this.triggerEvent('after'+command, props); 
     1052        if (this[func] && typeof this[func] === 'function') { 
     1053          ret = this[func](props); 
     1054        } 
     1055        break; 
     1056    } 
     1057 
     1058    if (this.triggerEvent('after'+command, props) === false) 
     1059      ret = false; 
    10541060    this.triggerEvent('actionafter', {props:props, action:command}); 
    10551061 
    1056     return obj ? false : true; 
     1062    return ret === false ? false : obj ? false : true; 
    10571063  }; 
    10581064 
  • program/js/editor.js

    r66df084 r14d494f  
    116116      flag.value = '1'; 
    117117  } 
    118   else { 
    119     if (!res && select.tagName == 'SELECT') 
    120       select.value = 'html'; 
     118  else if (res) { 
    121119    if (flagElement && (flag = rcube_find_object(flagElement))) 
    122120      flag.value = '0'; 
     
    125123      rcube_find_object(rcmail.env.composebody).focus(); 
    126124  } 
     125  else { // !res 
     126    if (select.tagName == 'SELECT') 
     127      select.value = 'html'; 
     128    else if (select.tagName == 'INPUT') 
     129      select.checked = true; 
     130  } 
    127131} 
Note: See TracChangeset for help on using the changeset viewer.