Changeset 1267


Ignore:
Timestamp:
06/18/10 00:23:58 (9 years ago)
Author:
wymsy
Message:

Hide media objects behind div-type dialogs. Ticket #1526

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r1266 r1267  
    864864   this.convertUrlsToLinks = true; 
    865865 
     866 /** Set to true to hide media objects when a div-type dialog box is open, to prevent show-through 
     867  *  Default: <code>false</code> 
     868  *  @type Boolean 
     869  */ 
     870  this.hideObjectsBehindDialogs = false; 
    866871 
    867872 /** Size of color picker cells<br /> 
  • trunk/modules/Dialogs/XinhaDialog.js

    r1238 r1267  
    538538      } 
    539539    }); 
     540    //hide object & embed tags in document so they won't show through 
     541    if (this.editor.config.hideObjectsBehindDialogs) 
     542    { 
     543      this.objTags = this.editor._doc.getElementsByTagName('object'); 
     544      this.embedTags = this.editor._doc.getElementsByTagName('embed'); 
     545      for (var j=0; j<this.objTags.length; j++) 
     546      { 
     547        this.objTags[j].__object_hidden = this.objTags[j].style.visibility; 
     548        this.objTags[j].style.visibility = 'hidden'; 
     549      } 
     550      for (j=0; j<this.embedTags.length; j++) 
     551      { 
     552        this.embedTags[j].__embed_hidden = this.embedTags[j].style.visibility; 
     553        this.embedTags[j].style.visibility = 'hidden'; 
     554      } 
     555    } 
     556 
    540557    var dialogHeight = rootElem.offsetHeight; 
    541558    var dialogWidth = rootElem.offsetWidth; 
     
    639656      this.editor._iframe.style.visibility   = this._restoreTo[1]; 
    640657      this.editor.showPanels(this._restoreTo[2]); 
     658    } 
     659 
     660    //restore visibility of object & embed tags in document 
     661    if (this.editor.config.hideObjectsBehindDialogs) 
     662    { 
     663      for (var j=0; j<this.objTags.length; j++) 
     664      { 
     665        this.objTags[j].style.visibility = this.objTags[j].__object_hidden; 
     666      } 
     667      for (j=0; j<this.embedTags.length; j++) 
     668      { 
     669        this.embedTags[j].style.visibility = this.embedTags[j].__embed_hidden; 
     670      } 
    641671    } 
    642672 
Note: See TracChangeset for help on using the changeset viewer.