@ -53,6 +53,8 @@ MUI.extend({
ieSupport : 'excanvas' , // Makes it easier to switch between Excanvas and Moocanvas for testing
ieSupport : 'excanvas' , // Makes it easier to switch between Excanvas and Moocanvas for testing
ieLegacySupport : Browser . Engine . trident && Browser . version < 9 ,
/ *
/ *
Function : updateContent
Function : updateContent
@ -271,8 +273,8 @@ MUI.extend({
'frameBorder' : 0 ,
'frameBorder' : 0 ,
'scrolling' : 'auto' ,
'scrolling' : 'auto' ,
'styles' : {
'styles' : {
'height' : contentWrapperEl . offsetHeight - contentWrapperEl . getStyle ( 'border -top' ) . toInt ( ) - contentWrapperEl . getStyle ( 'border -bottom' ) . toInt ( ) ,
'height' : contentWrapperEl . offsetHeight - contentWrapperEl . getStyle ( 'margin -top' ) . toInt ( ) - contentWrapperEl . getStyle ( 'margin -bottom' ) . toInt ( ) ,
'width' : instance . panelEl ? contentWrapperEl . offsetWidth - contentWrapperEl . getStyle ( 'border -left' ) . toInt ( ) - contentWrapperEl . getStyle ( 'border -right' ) . toInt ( ) : '100%'
'width' : instance . panelEl ? contentWrapperEl . offsetWidth - contentWrapperEl . getStyle ( 'margin -left' ) . toInt ( ) - contentWrapperEl . getStyle ( 'margin -right' ) . toInt ( ) : '100%'
}
}
} ) . injectInside ( contentEl ) ;
} ) . injectInside ( contentEl ) ;
@ -533,7 +535,7 @@ Element.implement({
this . setStyle ( 'position' , 'relative' ) ;
this . setStyle ( 'position' , 'relative' ) ;
position = 'relative' ;
position = 'relative' ;
}
}
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
parent . setStyle ( 'height' , parent . getStyle ( 'height' ) ) ;
parent . setStyle ( 'height' , parent . getStyle ( 'height' ) ) ;
}
}
var coords = this . getPosition ( parent ) ;
var coords = this . getPosition ( parent ) ;
@ -794,7 +796,7 @@ $extend(Asset, {
script . addEvents ( {
script . addEvents ( {
load : load ,
load : load ,
readystatechange : function ( ) {
readystatechange : function ( ) {
if ( Browser . Engine . triden t && [ 'loaded' , 'complete' ] . contains ( this . readyState ) )
if ( MUI . ieLegacySuppor t && [ 'loaded' , 'complete' ] . contains ( this . readyState ) )
load ( ) ;
load ( ) ;
}
}
} ) . setProperties ( properties ) ;
} ) . setProperties ( properties ) ;
@ -1058,7 +1060,7 @@ MUI.Themes = {
} ) ;
} ) ;
// Delay gives the stylesheets time to take effect. IE6 needs more delay.
// Delay gives the stylesheets time to take effect. IE6 needs more delay.
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
this . redraw . delay ( 1250 , this ) ;
this . redraw . delay ( 1250 , this ) ;
}
}
else {
else {
@ -1620,17 +1622,8 @@ MUI.Window = new Class({
}
}
// Fix a mouseover issue with gauges in IE7
// Fix a mouseover issue with gauges in IE7
if ( Browser . Engine . trident && options . shape == 'gauge' ) {
if ( MUI . ieLegacySupport && options . shape == 'gauge' ) {
this . windowEl . setStyle ( 'backgroundImage' , 'url(../images/spacer.gif)' ) ;
this . windowEl . setStyle ( 'backgroundImage' , 'url(../images/skin/spacer.gif)' ) ;
}
if ( ( this . options . type == 'modal' || options . type == 'modal2' ) && Browser . Platform . mac && Browser . Engine . gecko ) {
if ( /Firefox[\/\s](\d+\.\d+)/ . test ( navigator . userAgent ) ) {
var ffversion = new Number ( RegExp . $1 ) ;
if ( ffversion < 3 ) {
this . windowEl . setStyle ( 'position' , 'fixed' ) ;
}
}
}
}
if ( options . loadMethod == 'iframe' ) {
if ( options . loadMethod == 'iframe' ) {
@ -1793,7 +1786,7 @@ MUI.Window = new Class({
'duration' : 350 ,
'duration' : 350 ,
transition : Fx . Transitions . Sine . easeInOut ,
transition : Fx . Transitions . Sine . easeInOut ,
onComplete : function ( ) {
onComplete : function ( ) {
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
this . drawWindow ( ) ;
this . drawWindow ( ) ;
}
}
} . bind ( this )
} . bind ( this )
@ -1883,7 +1876,7 @@ MUI.Window = new Class({
}
}
else {
else {
// IE cannot handle both element opacity and VML alpha at the same time.
// IE cannot handle both element opacity and VML alpha at the same time.
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
this . drawWindow ( false ) ;
this . drawWindow ( false ) ;
}
}
this . opacityMorph . start ( {
this . opacityMorph . start ( {
@ -1906,7 +1899,7 @@ MUI.Window = new Class({
if ( this . options . type == 'window' ) {
if ( this . options . type == 'window' ) {
windowEl . addEvent ( 'mousedown' , function ( e ) {
windowEl . addEvent ( 'mousedown' , function ( e ) {
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
new Event ( e ) . stop ( ) ;
new Event ( e ) . stop ( ) ;
}
}
MUI . focusWindow ( windowEl ) ;
MUI . focusWindow ( windowEl ) ;
@ -1940,7 +1933,7 @@ MUI.Window = new Class({
e = new Event ( e ) . stop ( ) ;
e = new Event ( e ) . stop ( ) ;
} . bind ( this ) ) ;
} . bind ( this ) ) ;
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
this . titleBarEl . addEvent ( 'mousedown' , function ( e ) {
this . titleBarEl . addEvent ( 'mousedown' , function ( e ) {
this . titleEl . setCapture ( ) ;
this . titleEl . setCapture ( ) ;
} . bind ( this ) ) ;
} . bind ( this ) ) ;
@ -1977,7 +1970,7 @@ MUI.Window = new Class({
$ ( 'windowUnderlay' ) . show ( ) ;
$ ( 'windowUnderlay' ) . show ( ) ;
}
}
if ( this . iframeEl ) {
if ( this . iframeEl ) {
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySuppor t) {
this . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
this . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
}
}
else {
else {
@ -1990,7 +1983,7 @@ MUI.Window = new Class({
$ ( 'windowUnderlay' ) . hide ( ) ;
$ ( 'windowUnderlay' ) . hide ( ) ;
}
}
if ( this . iframeEl ) {
if ( this . iframeEl ) {
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySuppor t) {
this . iframeEl . setStyle ( 'visibility' , 'visible' ) ;
this . iframeEl . setStyle ( 'visibility' , 'visible' ) ;
}
}
else {
else {
@ -2124,7 +2117,7 @@ MUI.Window = new Class({
resizeOnStart : function ( ) {
resizeOnStart : function ( ) {
$ ( 'windowUnderlay' ) . show ( ) ;
$ ( 'windowUnderlay' ) . show ( ) ;
if ( this . iframeEl ) {
if ( this . iframeEl ) {
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySuppor t) {
this . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
this . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
}
}
else {
else {
@ -2133,25 +2126,13 @@ MUI.Window = new Class({
}
}
} ,
} ,
resizeOnDrag : function ( ) {
resizeOnDrag : function ( ) {
// Fix for a rendering glitch in FF when resizing a window with panels in it
if ( Browser . Engine . gecko ) {
this . windowEl . getElements ( '.panel' ) . each ( function ( panel ) {
panel . store ( 'oldOverflow' , panel . getStyle ( 'overflow' ) ) ;
panel . setStyle ( 'overflow' , 'visible' ) ;
} ) ;
}
this . drawWindow ( ) ;
this . drawWindow ( ) ;
this . adjustHandles ( ) ;
this . adjustHandles ( ) ;
if ( Browser . Engine . gecko ) {
this . windowEl . getElements ( '.panel' ) . each ( function ( panel ) {
panel . setStyle ( 'overflow' , panel . retrieve ( 'oldOverflow' ) ) ; // Fix for a rendering bug in FF
} ) ;
}
} ,
} ,
resizeOnComplete : function ( ) {
resizeOnComplete : function ( ) {
$ ( 'windowUnderlay' ) . hide ( ) ;
$ ( 'windowUnderlay' ) . hide ( ) ;
if ( this . iframeEl ) {
if ( this . iframeEl ) {
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySupport ) {
this . iframeEl . setStyle ( 'visibility' , 'visible' ) ;
this . iframeEl . setStyle ( 'visibility' , 'visible' ) ;
}
}
else {
else {
@ -2360,7 +2341,7 @@ MUI.Window = new Class({
'class' : 'mochaContent'
'class' : 'mochaContent'
} ) . inject ( cache . contentWrapperEl ) ;
} ) . inject ( cache . contentWrapperEl ) ;
if ( this . options . useCanvas == true && Browser . Engine . trident != true ) {
if ( this . options . useCanvas == true && ! MUI . ieLegacySupport ) {
cache . canvasEl = new Element ( 'canvas' , {
cache . canvasEl = new Element ( 'canvas' , {
'id' : id + '_canvas' ,
'id' : id + '_canvas' ,
'class' : 'mochaCanvas' ,
'class' : 'mochaCanvas' ,
@ -2369,7 +2350,7 @@ MUI.Window = new Class({
} ) . inject ( this . windowEl ) ;
} ) . inject ( this . windowEl ) ;
}
}
if ( this . options . useCanvas == true && Browser . Engine . triden t) {
if ( this . options . useCanvas == true && MUI . ieLegacySuppor t) {
cache . canvasEl = new Element ( 'canvas' , {
cache . canvasEl = new Element ( 'canvas' , {
'id' : id + '_canvas' ,
'id' : id + '_canvas' ,
'class' : 'mochaCanvas' ,
'class' : 'mochaCanvas' ,
@ -2382,7 +2363,7 @@ MUI.Window = new Class({
}
}
} ) . inject ( this . windowEl ) ;
} ) . inject ( this . windowEl ) ;
if ( MUI . ieSupport == 'excanvas' ) {
if ( MUI . ieLegacySupport && MUI . ie Support == 'excanvas' ) {
G _vmlCanvasManager . initElement ( cache . canvasEl ) ;
G _vmlCanvasManager . initElement ( cache . canvasEl ) ;
cache . canvasEl = this . windowEl . getElement ( '.mochaCanvas' ) ;
cache . canvasEl = this . windowEl . getElement ( '.mochaCanvas' ) ;
}
}
@ -2401,7 +2382,7 @@ MUI.Window = new Class({
'height' : 14
'height' : 14
} ) . inject ( this . windowEl ) ;
} ) . inject ( this . windowEl ) ;
if ( Browser . Engine . triden t && MUI . ieSupport == 'excanvas' ) {
if ( MUI . ieLegacySuppor t && MUI . ieSupport == 'excanvas' ) {
G _vmlCanvasManager . initElement ( cache . canvasControlsEl ) ;
G _vmlCanvasManager . initElement ( cache . canvasControlsEl ) ;
cache . canvasControlsEl = this . windowEl . getElement ( '.mochaCanvasControls' ) ;
cache . canvasControlsEl = this . windowEl . getElement ( '.mochaCanvasControls' ) ;
}
}
@ -2448,26 +2429,16 @@ MUI.Window = new Class({
'height' : 26
'height' : 26
} ) . inject ( this . windowEl , 'bottom' ) ;
} ) . inject ( this . windowEl , 'bottom' ) ;
if ( Browser . Engine . triden t && MUI . ieSupport == 'excanvas' ) {
if ( MUI . ieLegacySuppor t && MUI . ieSupport == 'excanvas' ) {
G _vmlCanvasManager . initElement ( cache . canvasHeaderEl ) ;
G _vmlCanvasManager . initElement ( cache . canvasHeaderEl ) ;
cache . canvasHeaderEl = this . windowEl . getElement ( '.mochaCanvasHeader' ) ;
cache . canvasHeaderEl = this . windowEl . getElement ( '.mochaCanvasHeader' ) ;
}
}
}
}
if ( Browser . Engine . triden t ) {
if ( MUI . ieLegacySuppor t ) {
cache . overlayEl . setStyle ( 'zIndex' , 2 ) ;
cache . overlayEl . setStyle ( 'zIndex' , 2 ) ;
}
}
// For Mac Firefox 2 to help reduce scrollbar bugs in that browser
if ( Browser . Platform . mac && Browser . Engine . gecko ) {
if ( /Firefox[\/\s](\d+\.\d+)/ . test ( navigator . userAgent ) ) {
var ffversion = new Number ( RegExp . $1 ) ;
if ( ffversion < 3 ) {
cache . overlayEl . setStyle ( 'overflow' , 'auto' ) ;
}
}
}
if ( options . resizable ) {
if ( options . resizable ) {
cache . n = new Element ( 'div' , {
cache . n = new Element ( 'div' , {
'id' : id + '_resizeHandle_n' ,
'id' : id + '_resizeHandle_n' ,
@ -2678,9 +2649,9 @@ MUI.Window = new Class({
this . iframeEl . setStyle ( 'height' , this . contentWrapperEl . offsetHeight ) ;
this . iframeEl . setStyle ( 'height' , this . contentWrapperEl . offsetHeight ) ;
}
}
var borderHeight = this . contentBorderEl . getStyle ( 'border -top' ) . toInt ( ) + this . contentBorderEl . getStyle ( 'border -bottom' ) . toInt ( ) ;
var borderHeight = this . contentBorderEl . getStyle ( 'margin -top' ) . toInt ( ) + this . contentBorderEl . getStyle ( 'margin -bottom' ) . toInt ( ) ;
var toolbarHeight = this . toolbarWrapperEl ? this . toolbarWrapperEl . getStyle ( 'height' ) . toInt ( ) + this . toolbarWrapperEl . getStyle ( 'border -top' ) . toInt ( ) : 0 ;
var toolbarHeight = this . toolbarWrapperEl ? this . toolbarWrapperEl . getStyle ( 'height' ) . toInt ( ) + this . toolbarWrapperEl . getStyle ( 'margin -top' ) . toInt ( ) : 0 ;
var toolbar2Height = this . toolbar2WrapperEl ? this . toolbar2WrapperEl . getStyle ( 'height' ) . toInt ( ) + this . toolbar2WrapperEl . getStyle ( 'border -top' ) . toInt ( ) : 0 ;
var toolbar2Height = this . toolbar2WrapperEl ? this . toolbar2WrapperEl . getStyle ( 'height' ) . toInt ( ) + this . toolbar2WrapperEl . getStyle ( 'margin -top' ) . toInt ( ) : 0 ;
this . headerFooterShadow = options . headerHeight + options . footerHeight + shadowBlur2x ;
this . headerFooterShadow = options . headerHeight + options . footerHeight + shadowBlur2x ;
var height = this . contentWrapperEl . getStyle ( 'height' ) . toInt ( ) + this . headerFooterShadow + toolbarHeight + toolbar2Height + borderHeight ;
var height = this . contentWrapperEl . getStyle ( 'height' ) . toInt ( ) + this . headerFooterShadow + toolbarHeight + toolbar2Height + borderHeight ;
@ -2697,7 +2668,7 @@ MUI.Window = new Class({
} ) ;
} ) ;
if ( this . options . useCanvas == true ) {
if ( this . options . useCanvas == true ) {
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
this . canvasEl . height = 20000 ;
this . canvasEl . height = 20000 ;
this . canvasEl . width = 50000 ;
this . canvasEl . width = 50000 ;
}
}
@ -2754,7 +2725,7 @@ MUI.Window = new Class({
}
}
// Invisible dummy object. The last element drawn is not rendered consistently while resizing in IE6 and IE7
// Invisible dummy object. The last element drawn is not rendered consistently while resizing in IE6 and IE7
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
MUI . triangle ( ctx , 0 , 0 , 10 , 10 , options . resizableColor , 0 ) ;
MUI . triangle ( ctx , 0 , 0 , 10 , 10 , options . resizableColor , 0 ) ;
}
}
}
}
@ -2825,7 +2796,7 @@ MUI.Window = new Class({
}
}
// Invisible dummy object. The last element drawn is not rendered consistently while resizing in IE6 and IE7
// Invisible dummy object. The last element drawn is not rendered consistently while resizing in IE6 and IE7
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
MUI . triangle ( ctx , 0 , 0 , 10 , 10 , options . resizableColor , 0 ) ;
MUI . triangle ( ctx , 0 , 0 , 10 , 10 , options . resizableColor , 0 ) ;
}
}
}
}
@ -2894,7 +2865,7 @@ MUI.Window = new Class({
) ;
) ;
}
}
// Invisible dummy object. The last element drawn is not rendered consistently while resizing in IE6 and IE7
// Invisible dummy object. The last element drawn is not rendered consistently while resizing in IE6 and IE7
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
MUI . circle ( ctx2 , 0 , 0 , 3 , this . options . resizableColor , 0 ) ;
MUI . circle ( ctx2 , 0 , 0 , 3 , this . options . resizableColor , 0 ) ;
}
}
@ -3326,7 +3297,7 @@ MUI.extend({
}
}
else {
else {
// Redraws IE windows without shadows since IE messes up canvas alpha when you change element opacity
// Redraws IE windows without shadows since IE messes up canvas alpha when you change element opacity
if ( Browser . Engine . triden t) instance . drawWindow ( false ) ;
if ( MUI . ieLegacySuppor t) instance . drawWindow ( false ) ;
if ( instance . options . type == 'modal' || instance . options . type == 'modal2' ) {
if ( instance . options . type == 'modal' || instance . options . type == 'modal2' ) {
MUI . Modal . modalOverlayCloseMorph . start ( {
MUI . Modal . modalOverlayCloseMorph . start ( {
'opacity' : 0
'opacity' : 0
@ -3351,7 +3322,7 @@ MUI.extend({
var instance = instances . get ( windowEl . id ) ;
var instance = instances . get ( windowEl . id ) ;
windowEl . setStyle ( 'visibility' , 'hidden' ) ;
windowEl . setStyle ( 'visibility' , 'hidden' ) ;
// Destroy throws an error in IE8
// Destroy throws an error in IE8
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
windowEl . dispose ( ) ;
windowEl . dispose ( ) ;
}
}
else {
else {
@ -3650,7 +3621,7 @@ MUI.extend({
instance . drawWindow ( ) ;
instance . drawWindow ( ) ;
// Show iframe
// Show iframe
if ( instance . iframeEl ) {
if ( instance . iframeEl ) {
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySuppor t) {
instance . iframeEl . setStyle ( 'visibility' , 'visible' ) ;
instance . iframeEl . setStyle ( 'visibility' , 'visible' ) ;
}
}
else {
else {
@ -4266,8 +4237,8 @@ MUI.Desktop = {
}
}
var coordinates = document . getCoordinates ( ) ;
var coordinates = document . getCoordinates ( ) ;
var borderHeight = instance . contentBorderEl . getStyle ( 'border -top' ) . toInt ( ) + instance . contentBorderEl . getStyle ( 'border -bottom' ) . toInt ( ) ;
var borderHeight = instance . contentBorderEl . getStyle ( 'margin -top' ) . toInt ( ) + instance . contentBorderEl . getStyle ( 'margin -bottom' ) . toInt ( ) ;
var toolbarHeight = instance . toolbarWrapperEl ? instance . toolbarWrapperEl . getStyle ( 'height' ) . toInt ( ) + instance . toolbarWrapperEl . getStyle ( 'border -top' ) . toInt ( ) : 0 ;
var toolbarHeight = instance . toolbarWrapperEl ? instance . toolbarWrapperEl . getStyle ( 'height' ) . toInt ( ) + instance . toolbarWrapperEl . getStyle ( 'margin -top' ) . toInt ( ) : 0 ;
instance . contentWrapperEl . setStyles ( {
instance . contentWrapperEl . setStyles ( {
'height' : coordinates . height - instance . options . headerHeight - instance . options . footerHeight - borderHeight - toolbarHeight ,
'height' : coordinates . height - instance . options . headerHeight - instance . options . footerHeight - borderHeight - toolbarHeight ,
'width' : coordinates . width
'width' : coordinates . width
@ -4300,8 +4271,8 @@ MUI.Desktop = {
if ( this . pageWrapper ) {
if ( this . pageWrapper ) {
var dockOffset = MUI . dockVisible ? dockWrapper . offsetHeight : 0 ;
var dockOffset = MUI . dockVisible ? dockWrapper . offsetHeight : 0 ;
var pageWrapperHeight = windowDimensions . height ;
var pageWrapperHeight = windowDimensions . height ;
pageWrapperHeight -= this . pageWrapper . getStyle ( 'border -top' ) . toInt ( ) ;
pageWrapperHeight -= this . pageWrapper . getStyle ( 'margin -top' ) . toInt ( ) ;
pageWrapperHeight -= this . pageWrapper . getStyle ( 'border -bottom' ) . toInt ( ) ;
pageWrapperHeight -= this . pageWrapper . getStyle ( 'margin -bottom' ) . toInt ( ) ;
if ( this . desktopHeader ) { pageWrapperHeight -= this . desktopHeader . offsetHeight ; }
if ( this . desktopHeader ) { pageWrapperHeight -= this . desktopHeader . offsetHeight ; }
if ( this . desktopFooter ) { pageWrapperHeight -= this . desktopFooter . offsetHeight ; }
if ( this . desktopFooter ) { pageWrapperHeight -= this . desktopFooter . offsetHeight ; }
pageWrapperHeight -= dockOffset ;
pageWrapperHeight -= dockOffset ;
@ -4377,7 +4348,7 @@ MUI.Desktop = {
// Hide iframe
// Hide iframe
// Iframe should be hidden when minimizing, maximizing, and moving for performance and Flash issues
// Iframe should be hidden when minimizing, maximizing, and moving for performance and Flash issues
if ( instance . iframeEl ) {
if ( instance . iframeEl ) {
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySuppor t) {
instance . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
instance . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
}
}
else {
else {
@ -4390,9 +4361,9 @@ MUI.Desktop = {
var shadowBlur = options . shadowBlur ;
var shadowBlur = options . shadowBlur ;
var shadowOffset = options . shadowOffset ;
var shadowOffset = options . shadowOffset ;
var newHeight = windowDimensions . height - options . headerHeight - options . footerHeight ;
var newHeight = windowDimensions . height - options . headerHeight - options . footerHeight ;
newHeight -= instance . contentBorderEl . getStyle ( 'border -top' ) . toInt ( ) ;
newHeight -= instance . contentBorderEl . getStyle ( 'margin -top' ) . toInt ( ) ;
newHeight -= instance . contentBorderEl . getStyle ( 'border -bottom' ) . toInt ( ) ;
newHeight -= instance . contentBorderEl . getStyle ( 'margin -bottom' ) . toInt ( ) ;
newHeight -= ( instance . toolbarWrapperEl ? instance . toolbarWrapperEl . getStyle ( 'height' ) . toInt ( ) + instance . toolbarWrapperEl . getStyle ( 'border -top' ) . toInt ( ) : 0 ) ;
newHeight -= ( instance . toolbarWrapperEl ? instance . toolbarWrapperEl . getStyle ( 'height' ) . toInt ( ) + instance . toolbarWrapperEl . getStyle ( 'margin -top' ) . toInt ( ) : 0 ) ;
MUI . resizeWindow ( windowEl , {
MUI . resizeWindow ( windowEl , {
width : windowDimensions . width ,
width : windowDimensions . width ,
@ -4440,7 +4411,7 @@ MUI.Desktop = {
// Hide iframe
// Hide iframe
// Iframe should be hidden when minimizing, maximizing, and moving for performance and Flash issues
// Iframe should be hidden when minimizing, maximizing, and moving for performance and Flash issues
if ( instance . iframeEl ) {
if ( instance . iframeEl ) {
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySuppor t) {
instance . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
instance . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
}
}
else {
else {
@ -5253,7 +5224,10 @@ MUI.extend({
panelsToResize . each ( function ( panel ) {
panelsToResize . each ( function ( panel ) {
var ratio = this . panelsTotalHeight / panel . offsetHeight . toInt ( ) ;
var ratio = this . panelsTotalHeight / panel . offsetHeight . toInt ( ) ;
var newPanelHeight = panel . getStyle ( 'height' ) . toInt ( ) + ( remainingHeight / ratio ) ;
var panelHeight = panel . getStyle ( 'height' ) . toInt ( ) ;
var newPanelHeight = remainingHeight / ratio ;
if ( ! isNaN ( panelHeight ) )
newPanelHeight += panelHeight ;
if ( newPanelHeight < 1 ) {
if ( newPanelHeight < 1 ) {
newPanelHeight = 0 ;
newPanelHeight = 0 ;
}
}
@ -5288,7 +5262,7 @@ MUI.extend({
parent . getChildren ( '.columnHandle' ) . each ( function ( handle ) {
parent . getChildren ( '.columnHandle' ) . each ( function ( handle ) {
var parent = handle . getParent ( ) ;
var parent = handle . getParent ( ) ;
if ( parent . getStyle ( 'height' ) . toInt ( ) < 1 ) return ; // Keeps IE7 and 8 from throwing an error when collapsing a panel within a panel
if ( parent . getStyle ( 'height' ) . toInt ( ) < 1 ) return ; // Keeps IE7 and 8 from throwing an error when collapsing a panel within a panel
var handleHeight = parent . getStyle ( 'height' ) . toInt ( ) - handle . getStyle ( 'border -top' ) . toInt ( ) - handle . getStyle ( 'border -bottom' ) . toInt ( ) ;
var handleHeight = parent . getStyle ( 'height' ) . toInt ( ) - handle . getStyle ( 'margin -top' ) . toInt ( ) - handle . getStyle ( 'margin -bottom' ) . toInt ( ) ;
if ( Browser . Engine . trident4 && parent == MUI . Desktop . pageWrapper ) {
if ( Browser . Engine . trident4 && parent == MUI . Desktop . pageWrapper ) {
handleHeight -= 1 ;
handleHeight -= 1 ;
}
}
@ -5307,10 +5281,10 @@ MUI.extend({
var contentWrapperEl = instance . contentWrapperEl ;
var contentWrapperEl = instance . contentWrapperEl ;
if ( instance . iframeEl ) {
if ( instance . iframeEl ) {
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySuppor t) {
instance . iframeEl . setStyles ( {
instance . iframeEl . setStyles ( {
'height' : contentWrapperEl . getStyle ( 'height' ) ,
'height' : contentWrapperEl . getStyle ( 'height' ) ,
'width' : contentWrapperEl . offsetWidth - contentWrapperEl . getStyle ( 'border -left' ) . toInt ( ) - contentWrapperEl . getStyle ( 'border -right' ) . toInt ( )
'width' : contentWrapperEl . offsetWidth - contentWrapperEl . getStyle ( 'margin -left' ) . toInt ( ) - contentWrapperEl . getStyle ( 'margin -right' ) . toInt ( )
} ) ;
} ) ;
}
}
else {
else {
@ -5318,10 +5292,10 @@ MUI.extend({
// when only the vertical dimension is changed.
// when only the vertical dimension is changed.
instance . iframeEl . setStyles ( {
instance . iframeEl . setStyles ( {
'height' : contentWrapperEl . getStyle ( 'height' ) ,
'height' : contentWrapperEl . getStyle ( 'height' ) ,
'width' : contentWrapperEl . offsetWidth - contentWrapperEl . getStyle ( 'border -left' ) . toInt ( ) - contentWrapperEl . getStyle ( 'border -right' ) . toInt ( ) - 1
'width' : contentWrapperEl . offsetWidth - contentWrapperEl . getStyle ( 'margin -left' ) . toInt ( ) - contentWrapperEl . getStyle ( 'margin -right' ) . toInt ( ) - 1
} ) ;
} ) ;
instance . iframeEl . setStyles ( {
instance . iframeEl . setStyles ( {
'width' : contentWrapperEl . offsetWidth - contentWrapperEl . getStyle ( 'border -left' ) . toInt ( ) - contentWrapperEl . getStyle ( 'border -right' ) . toInt ( )
'width' : contentWrapperEl . offsetWidth - contentWrapperEl . getStyle ( 'margin -left' ) . toInt ( ) - contentWrapperEl . getStyle ( 'margin -right' ) . toInt ( )
} ) ;
} ) ;
}
}
}
}
@ -5334,9 +5308,8 @@ MUI.extend({
}
}
container . getElements ( '.rWidth' ) . each ( function ( column ) {
container . getElements ( '.rWidth' ) . each ( function ( column ) {
var currentWidth = column . offsetWidth . toInt ( ) ;
var currentWidth = column . offsetWidth . toInt ( ) ;
currentWidth -= column . getStyle ( 'border-left' ) . toInt ( ) ;
currentWidth -= column . getStyle ( 'margin-left' ) . toInt ( ) ;
currentWidth -= column . getStyle ( 'border-right' ) . toInt ( ) ;
currentWidth -= column . getStyle ( 'margin-right' ) . toInt ( ) ;
var parent = column . getParent ( ) ;
var parent = column . getParent ( ) ;
this . width = 0 ;
this . width = 0 ;
@ -5353,7 +5326,7 @@ MUI.extend({
if ( newWidth < 1 ) newWidth = 0 ;
if ( newWidth < 1 ) newWidth = 0 ;
column . setStyle ( 'width' , newWidth ) ;
column . setStyle ( 'width' , newWidth ) ;
column . getChildren ( '.panel' ) . each ( function ( panel ) {
column . getChildren ( '.panel' ) . each ( function ( panel ) {
panel . setStyle ( 'width' , newWidth - panel . getStyle ( 'border -left' ) . toInt ( ) - panel . getStyle ( 'border -right' ) . toInt ( ) ) ;
panel . setStyle ( 'width' , newWidth - panel . getStyle ( 'margin -left' ) . toInt ( ) - panel . getStyle ( 'margin -right' ) . toInt ( ) ) ;
MUI . resizeChildren ( panel ) ;
MUI . resizeChildren ( panel ) ;
} . bind ( this ) ) ;
} . bind ( this ) ) ;
@ -5373,7 +5346,7 @@ function addResizeRight(element, min, max){
handle . setStyle ( 'cursor' , Browser . Engine . webkit ? 'col-resize' : 'e-resize' ) ;
handle . setStyle ( 'cursor' , Browser . Engine . webkit ? 'col-resize' : 'e-resize' ) ;
if ( ! min ) min = 50 ;
if ( ! min ) min = 50 ;
if ( ! max ) max = 250 ;
if ( ! max ) max = 250 ;
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
handle . addEvents ( {
handle . addEvents ( {
'mousedown' : function ( ) {
'mousedown' : function ( ) {
handle . setCapture ( ) ;
handle . setCapture ( ) ;
@ -5397,22 +5370,12 @@ function addResizeRight(element, min, max){
element . getNext ( '.column' ) . getElements ( 'iframe' ) . setStyle ( 'visibility' , 'hidden' ) ;
element . getNext ( '.column' ) . getElements ( 'iframe' ) . setStyle ( 'visibility' , 'hidden' ) ;
} . bind ( this ) ,
} . bind ( this ) ,
onDrag : function ( ) {
onDrag : function ( ) {
if ( Browser . Engine . gecko ) {
$$ ( '.panel' ) . each ( function ( panel ) {
if ( panel . getElements ( '.mochaIframe' ) . length == 0 ) {
panel . hide ( ) ; // Fix for a rendering bug in FF
}
} ) ;
}
MUI . rWidth ( element . getParent ( ) ) ;
MUI . rWidth ( element . getParent ( ) ) ;
if ( Browser . Engine . gecko ) {
$$ ( '.panel' ) . show ( ) ; // Fix for a rendering bug in FF
}
if ( Browser . Engine . trident4 ) {
if ( Browser . Engine . trident4 ) {
element . getChildren ( ) . each ( function ( el ) {
element . getChildren ( ) . each ( function ( el ) {
var width = $ ( element ) . getStyle ( 'width' ) . toInt ( ) ;
var width = $ ( element ) . getStyle ( 'width' ) . toInt ( ) ;
width -= el . getStyle ( 'border -right' ) . toInt ( ) ;
width -= el . getStyle ( 'margin-right' ) . toInt ( ) ;
width -= el . getStyle ( 'border -left' ) . toInt ( ) ;
width -= el . getStyle ( 'margin-left' ) . toInt ( ) ;
width -= el . getStyle ( 'padding-right' ) . toInt ( ) ;
width -= el . getStyle ( 'padding-right' ) . toInt ( ) ;
width -= el . getStyle ( 'padding-left' ) . toInt ( ) ;
width -= el . getStyle ( 'padding-left' ) . toInt ( ) ;
el . setStyle ( 'width' , width ) ;
el . setStyle ( 'width' , width ) ;
@ -5440,7 +5403,7 @@ function addResizeLeft(element, min, max){
var partner = element . getPrevious ( '.column' ) ;
var partner = element . getPrevious ( '.column' ) ;
if ( ! min ) min = 50 ;
if ( ! min ) min = 50 ;
if ( ! max ) max = 250 ;
if ( ! max ) max = 250 ;
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
handle . addEvents ( {
handle . addEvents ( {
'mousedown' : function ( ) {
'mousedown' : function ( ) {
handle . setCapture ( ) ;
handle . setCapture ( ) ;
@ -5485,7 +5448,7 @@ function addResizeBottom(element){
return element . getStyle ( 'height' ) . toInt ( ) + partner . getStyle ( 'height' ) . toInt ( ) ;
return element . getStyle ( 'height' ) . toInt ( ) + partner . getStyle ( 'height' ) . toInt ( ) ;
} . bind ( this ) ;
} . bind ( this ) ;
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
handle . addEvents ( {
handle . addEvents ( {
'mousedown' : function ( ) {
'mousedown' : function ( ) {
handle . setCapture ( ) ;
handle . setCapture ( ) ;
@ -5507,7 +5470,7 @@ function addResizeBottom(element){
} . bind ( this ) ,
} . bind ( this ) ,
onStart : function ( ) {
onStart : function ( ) {
if ( instance . iframeEl ) {
if ( instance . iframeEl ) {
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySuppor t) {
instance . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
instance . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
partner . getElements ( 'iframe' ) . setStyle ( 'visibility' , 'hidden' ) ;
partner . getElements ( 'iframe' ) . setStyle ( 'visibility' , 'hidden' ) ;
}
}
@ -5544,7 +5507,7 @@ function addResizeBottom(element){
MUI . panelHeight ( column ) ;
MUI . panelHeight ( column ) ;
} ) ;
} ) ;
if ( instance . iframeEl ) {
if ( instance . iframeEl ) {
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySuppor t) {
instance . iframeEl . setStyle ( 'visibility' , 'visible' ) ;
instance . iframeEl . setStyle ( 'visibility' , 'visible' ) ;
partner . getElements ( 'iframe' ) . setStyle ( 'visibility' , 'visible' ) ;
partner . getElements ( 'iframe' ) . setStyle ( 'visibility' , 'visible' ) ;
}
}
@ -5600,7 +5563,7 @@ MUI.extend({
MUI . closePanel ( $ ( panel . id ) ) ;
MUI . closePanel ( $ ( panel . id ) ) ;
} . bind ( this ) ) ;
} . bind ( this ) ) ;
if ( Browser . Engine . triden t) {
if ( MUI . ieLegacySuppor t) {
columnEl . dispose ( ) ;
columnEl . dispose ( ) ;
if ( instance . handleEl != null ) {
if ( instance . handleEl != null ) {
instance . handleEl . dispose ( ) ;
instance . handleEl . dispose ( ) ;
@ -5795,7 +5758,7 @@ MUI.Dock = {
} ) . inject ( this . dock ) ;
} ) . inject ( this . dock ) ;
// Dynamically initialize canvas using excanvas. This is only required by IE
// Dynamically initialize canvas using excanvas. This is only required by IE
if ( Browser . Engine . triden t && MUI . ieSupport == 'excanvas' ) {
if ( MUI . ieLegacySuppor t && MUI . ieSupport == 'excanvas' ) {
G _vmlCanvasManager . initElement ( canvas ) ;
G _vmlCanvasManager . initElement ( canvas ) ;
}
}
}
}
@ -6053,7 +6016,7 @@ MUI.Dock = {
// Iframe should be hidden when minimizing, maximizing, and moving for performance and Flash issues
// Iframe should be hidden when minimizing, maximizing, and moving for performance and Flash issues
if ( instance . iframeEl ) {
if ( instance . iframeEl ) {
// Some elements are still visible in IE8 in the iframe when the iframe's visibility is set to hidden.
// Some elements are still visible in IE8 in the iframe when the iframe's visibility is set to hidden.
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySuppor t) {
instance . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
instance . iframeEl . setStyle ( 'visibility' , 'hidden' ) ;
}
}
else {
else {
@ -6068,16 +6031,6 @@ MUI.Dock = {
}
}
windowEl . setStyle ( 'visibility' , 'hidden' ) ;
windowEl . setStyle ( 'visibility' , 'hidden' ) ;
// Fixes a scrollbar issue in Mac FF2
if ( Browser . Platform . mac && Browser . Engine . gecko ) {
if ( /Firefox[\/\s](\d+\.\d+)/ . test ( navigator . userAgent ) ) {
var ffversion = new Number ( RegExp . $1 ) ;
if ( ffversion < 3 ) {
instance . contentWrapperEl . setStyle ( 'overflow' , 'hidden' ) ;
}
}
}
MUI . Desktop . setDesktopSize ( ) ;
MUI . Desktop . setDesktopSize ( ) ;
// Have to use timeout because window gets focused when you click on the minimize button
// Have to use timeout because window gets focused when you click on the minimize button
@ -6119,7 +6072,7 @@ MUI.Dock = {
// Show iframe
// Show iframe
if ( instance . iframeEl ) {
if ( instance . iframeEl ) {
if ( ! Browser . Engine . triden t) {
if ( ! MUI . ieLegacySuppor t) {
instance . iframeEl . setStyle ( 'visibility' , 'visible' ) ;
instance . iframeEl . setStyle ( 'visibility' , 'visible' ) ;
}
}
else {
else {