Changeset 27acfd6 in github


Ignore:
Timestamp:
Dec 2, 2010 4:05:56 AM (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:
a5ee723
Parents:
1cca4fb
Message:
  • Fix preview window doesn't work when RC is in a frame (#1487314)
  • Add helper function is_framed()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/js/app.js

    reffdb3c r27acfd6  
    149149 
    150150    // tell parent window that this frame is loaded 
    151     if (this.env.framed && parent.rcmail && parent.rcmail.set_busy) { 
     151    if (this.is_framed()) { 
    152152      parent.rcmail.set_busy(false, null, parent.rcmail.env.frame_lock); 
    153153      parent.rcmail.env.frame_lock = null; 
     
    223223 
    224224          // make preview/message frame visible 
    225           if (this.env.action == 'preview' && this.env.framed && parent.rcmail) { 
     225          if (this.env.action == 'preview' && this.is_framed()) { 
    226226            this.enable_command('compose', 'add-contact', false); 
    227227            parent.rcmail.show_contentframe(true); 
     
    436436    if (!this.commands[command]) { 
    437437      // pass command to parent window 
    438       if (this.env.framed && parent.rcmail && parent.rcmail.command) 
     438      if (this.is_framed()) 
    439439        parent.rcmail.command(command, props); 
    440440 
     
    11211121  this.reload = function(delay) 
    11221122  { 
    1123     if (this.env.framed && parent.rcmail) 
     1123    if (this.is_framed()) 
    11241124      parent.rcmail.reload(delay); 
    11251125    else if (delay) 
     
    11491149      return url + '?' + name + '=' + value; 
    11501150  }; 
     1151 
     1152  this.is_framed = function() 
     1153  { 
     1154    return (this.env.framed && parent.rcmail); 
     1155  }; 
     1156 
    11511157 
    11521158  /*********************************************************/ 
     
    18241830    else { 
    18251831      if (!this.env.frame_lock) { 
    1826         (parent.rcmail ? parent.rcmail : this).env.frame_lock = this.set_busy(true, 'loading'); 
     1832        (this.is_framed() ? parent.rcmail : this).env.frame_lock = this.set_busy(true, 'loading'); 
    18271833      } 
    18281834      target.location.href = this.env.comm_path+url; 
     
    46004606  { 
    46014607    // pass command to parent window 
    4602     if (this.env.framed && parent.rcmail) 
     4608    if (this.is_framed()) 
    46034609      return parent.rcmail.display_message(msg, type); 
    46044610 
     
    46484654  { 
    46494655    // pass command to parent window 
    4650     if (this.env.framed && parent.rcmail) 
     4656    if (this.is_framed()) 
    46514657      return parent.rcmail.hide_message(obj, fade); 
    46524658 
Note: See TracChangeset for help on using the changeset viewer.