Changeset 1057
- Timestamp:
- 11/01/07 10:23:27 (6 years ago)
- Location:
- FCKeditor/branches/features/floating_dialog/editor/_source/internals
- Files:
-
- 3 edited
-
fck.js (modified) (2 diffs)
-
fckdialog.js (modified) (6 diffs)
-
fckdomtools.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/branches/features/floating_dialog/editor/_source/internals/fck.js
r1056 r1057 784 784 { 785 785 var parentDivPosition = FCKTools.GetDocumentPosition( this.Window.parent, editorParentElement ) ; 786 var positionedAncestor = FCKDomTools.GetPositionedAncestor( this.Window.parent, editorParentElement.parentNode ) ; 787 var positionedAncestorPosition = positionedAncestor ? 788 FCKTools.GetDocumentPosition( this.Window.parent, positionedAncestor ) : 789 {'x' : 0, 'y' : 0} ; 786 790 FCKDomTools.SetElementStyles( this.EditorBlocker, 787 791 { 788 792 'width' : editorFrame.offsetWidth + 'px', 789 793 'height' : editorFrame.offsetHeight + 'px', 790 'left' : parentDivPosition.x+ 'px',791 'top' : parentDivPosition.y+ 'px',794 'left' : ( parentDivPosition.x - positionedAncestorPosition.x ) + 'px', 795 'top' : ( parentDivPosition.y - positionedAncestorPosition.y ) + 'px', 792 796 'display' : '' 793 797 } ) ; … … 796 800 'width' : Math.max( doc.documentElement.scrollWidth, doc.documentElement.clientWidth ) + 'px', 797 801 'height' : Math.max( doc.documentElement.scrollHeight, doc.documentElement.clientHeight ) + 'px', 798 'left' : '0px',799 'top' : '0px',802 'left' : ( -1 * positionedAncestorPosition.x ) + 'px', 803 'top' : ( -1 * positionedAncestorPosition.y ) + 'px', 800 804 'display' : '' 801 805 } ) ; -
FCKeditor/branches/features/floating_dialog/editor/_source/internals/fckdialog.js
r1056 r1057 25 25 { 26 26 BaseZIndex : 10000, 27 LastSelectionData : null 27 LastSelectionData : null, 28 DialogStack : [] 28 29 } ; 29 30 … … 84 85 // 1. The dialog iframe 85 86 // 2. The dialog shadow 87 // 3. The dialog blocker (visible only when the dialog is disabled) 86 88 var container = ownerDocument.createElement( 'div' ) ; 87 89 container.dialogId = dialogId ; … … 124 126 oWindow.focus() ; 125 127 this.Window = oWindow ; 126 FCK.SetDialogMode( true ) ; 128 129 // Keep record of the current dialog in the dialog stack, and enable dialog mode 130 // if this is the first dialog in the dialog stack. 131 if ( this.DialogStack.length == 0 ) 132 FCK.SetDialogMode( true ) ; 133 this.DialogStack.push( container ) ; 127 134 } 128 135 … … 186 193 'dialog.shadow.bottom.right.png' 187 194 ]; 195 var x = [ 0, 20, container.offsetWidth - 20 ] ; 196 var y = [ 0, 20, container.offsetHeight - 20 ] ; 188 197 for ( var i = 0 ; i < 9 ; i++ ) 189 198 { … … 201 210 d.style.height = ( container.offsetHeight - 40 ) + 'px' ; 202 211 FCKDomTools.LoadPNG( d, FCKConfig.SkinPath + 'images/' + partUrl[i] ) ; 203 var x = [ 0, 20, container.offsetWidth - 20 ] ;204 var y = [ 0, 20, container.offsetHeight - 20 ] ;205 212 FCKDomTools.SetElementStyles( d, 206 213 { … … 223 230 container.parentNode.removeChild( container ) ; 224 231 this.BaseZIndex -= 100 ; 225 FCK.SetDialogMode( false ) ; 226 } 232 233 // Pop the dialog from the dialog stack, and disable dialog mode if the stack is empty. 234 this.DialogStack.pop() ; 235 if ( this.DialogStack.length == 0) 236 FCK.SetDialogMode( false ) ; 237 } -
FCKeditor/branches/features/floating_dialog/editor/_source/internals/fckdomtools.js
r1056 r1057 914 914 else 915 915 element.style.opacity = opacity ; 916 }, 917 918 GetCurrentElementStyle : function( w, element, attrName ) 919 { 920 if ( FCKBrowserInfo.IsIE ) 921 return element.currentStyle[attrName] ; 922 else 923 return w.getComputedStyle( element, '' )[attrName] ; 924 }, 925 926 GetPositionedAncestor : function( w, element ) 927 { 928 var currentElement = element ; 929 while ( currentElement != currentElement.ownerDocument.documentElement ) 930 { 931 if ( this.GetCurrentElementStyle( w, currentElement, 'position' ) != 'static' ) 932 return currentElement ; 933 currentElement = currentElement.parentNode ; 934 } 935 return null ; 916 936 } 917 937 } ;
Note: See TracChangeset
for help on using the changeset viewer.
