Changeset 1098 for trunk/modules


Ignore:
Timestamp:
10/23/08 08:37:31 (11 years ago)
Author:
ray
Message:

#1311 new modals for "insert link" and "character map" appear behind parent modal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/Dialogs/XinhaDialog.js

    r1094 r1098  
    8787            styles += stylesheets[i].cssText; 
    8888        } 
    89         div.innerHTML = '<br><style type="text/css">\ņ'+styles+'\n</style>'; // strange way, but didn't work otherwise 
     89        div.innerHTML = '<br><style type="text/css">\n'+styles+'\n</style>'; // strange way, but didn't work otherwise 
    9090        doc.getElementsByTagName('body')[0].appendChild(div); 
    9191        doc.body.className = 'xinha_dialog_background'; 
     
    103103  if (this.modal) backG.className += ' modal'; 
    104104  if (this.greyout) backG.className += ' greyout'; 
     105  var z = 1000; 
     106  if (!Xinha.Dialog.initialZ) 
     107  { 
     108    var p = editor._htmlArea; 
     109    while (p) 
     110    { 
     111      if (p.style && parseInt(p.style.zIndex, 10) > z) z = parseInt(p.style.zIndex, 10); 
     112      p = p.parentNode; 
     113    } 
     114    Xinha.Dialog.initialZ = z; 
     115  } 
     116  z = Xinha.Dialog.initialZ; 
    105117  with (backG.style) 
    106118  { 
     
    111123    overflow = "hidden"; 
    112124    display = "none"; 
    113     zIndex = (this.modal ? 1025 : 1001 ) + this.layer; 
     125    zIndex = (this.modal ? z + 25 : z +1 ) + this.layer; 
    114126  } 
    115127  document.body.appendChild(backG); 
     
    123135  //rootElem.style.position = (Xinha.ie_version < 7 ||(Xinha.is_ie && document.compatMode == "BackCompat") || !this.modal) ? "absolute" : "fixed"; 
    124136  rootElem.style.position = (Xinha.is_ie || !this.modal) ? "absolute" : "fixed"; 
    125   rootElem.style.zIndex = (this.modal ? 1027 : 1003 ) + this.layer; 
     137  rootElem.style.zIndex = (this.modal ? z + 27 : z + 3 ) + this.layer; 
    126138  rootElem.style.display  = 'none'; 
    127139   
Note: See TracChangeset for help on using the changeset viewer.