Index: branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js |
— | — | @@ -211,6 +211,7 @@ |
212 | 212 | } |
213 | 213 | var offsetTop = ( targetHeight < fullHeight )? ( fullHeight- targetHeight ) / 2 : 0; |
214 | 214 | var offsetLeft = ( targetWidth < fullWidth )? ( fullWidth- targetWidth ) / 2 : 0; |
| 215 | + |
215 | 216 | //mw.log(" targetWidth: " + targetWidth + ' fullwidth: ' + fullWidth + ' :: ' + ( fullWidth- targetWidth ) / 2 ); |
216 | 217 | return { |
217 | 218 | 'height': targetHeight, |
— | — | @@ -301,10 +302,17 @@ |
302 | 303 | this.windowPositionStyle = $interface.css( 'position' ); |
303 | 304 | this.windowZindex = $interface.css( 'z-index' ); |
304 | 305 | |
| 306 | + // Get the base offset: |
| 307 | + this.windowOffset = $interface.offset(); |
| 308 | + this.windowOffset.top = this.windowOffset.top - $j(document).scrollTop(); |
| 309 | + this.windowOffset.left = this.windowOffset.left - $j(document).scrollLeft(); |
| 310 | + |
305 | 311 | // Change the z-index of the interface |
306 | 312 | $interface.css( { |
307 | 313 | 'position' : 'fixed', |
308 | | - 'z-index' : mw.getConfig( 'fullScreenIndex' ) + 1 |
| 314 | + 'z-index' : mw.getConfig( 'fullScreenIndex' ) + 1, |
| 315 | + 'top' : this.windowOffset.top, |
| 316 | + 'left' : this.windowOffset.left |
309 | 317 | } ); |
310 | 318 | |
311 | 319 | |
— | — | @@ -315,8 +323,7 @@ |
316 | 324 | // Hide the body scroll bar |
317 | 325 | $j('body').css( 'overflow', 'hidden' ); |
318 | 326 | |
319 | | - // Get the base offset: |
320 | | - this.windowOffset = $interface.offset(); |
| 327 | + |
321 | 328 | var topOffset = '0px'; |
322 | 329 | var leftOffset = '0px'; |
323 | 330 | |
Index: branches/js2-work/phase3/js/uploadPage.js |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | 'apiUrl': mw.getLocalApiUrl(), |
26 | 26 | |
27 | 27 | // MediaWiki API supports chunk uploads: |
28 | | - 'enable_chunks' : false, |
| 28 | + 'enable_chunks' : false, |
29 | 29 | |
30 | 30 | // Set the interface type |
31 | 31 | 'interface_type' : 'dialog', |
— | — | @@ -75,6 +75,7 @@ |
76 | 76 | .focus( function() { |
77 | 77 | _this.toggleUpType( this.id == 'wpUploadFile' ); |
78 | 78 | } ) |
| 79 | + |
79 | 80 | // Also setup the onChange event binding: |
80 | 81 | .change( function() { |
81 | 82 | if ( wgUploadAutoFill ) { |