Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -1,4 +1,7 @@ |
2 | | -// MediaWiki JavaScript support functions |
| 2 | +/** |
| 3 | + * MediaWiki legacy wikibits |
| 4 | + */ |
| 5 | +(function(){ |
3 | 6 | |
4 | 7 | window.clientPC = navigator.userAgent.toLowerCase(); // Get client info |
5 | 8 | window.is_gecko = /gecko/.test( clientPC ) && |
— | — | @@ -47,7 +50,7 @@ |
48 | 51 | } |
49 | 52 | |
50 | 53 | // Global external objects used by this script. |
51 | | -/*extern ta, stylepath, skin */ |
| 54 | +/*extern ta */ |
52 | 55 | |
53 | 56 | // add any onload functions in this hook (please don't hard-code any events in the xhtml source) |
54 | 57 | window.doneOnloadHook = undefined; |
— | — | @@ -116,20 +119,20 @@ |
117 | 120 | }; |
118 | 121 | |
119 | 122 | // Special stylesheet links for Monobook only (see bug 14717) |
120 | | -if ( typeof stylepath != 'undefined' && skin == 'monobook' ) { |
| 123 | +var skinpath = mw.config.get( 'stylepath' ) + '/' + mw.config.get( 'skin' ); |
| 124 | +if ( mw.config.get( 'skin' ) === 'monobook' ) { |
121 | 125 | if ( opera6_bugs ) { |
122 | | - importStylesheetURI( stylepath + '/' + skin + '/Opera6Fixes.css' ); |
| 126 | + importStylesheetURI( skinpath + '/Opera6Fixes.css' ); |
123 | 127 | } else if ( opera7_bugs ) { |
124 | | - importStylesheetURI( stylepath + '/' + skin + '/Opera7Fixes.css' ); |
| 128 | + importStylesheetURI( skinpath + '/Opera7Fixes.css' ); |
125 | 129 | } else if ( opera95_bugs ) { |
126 | | - importStylesheetURI( stylepath + '/' + skin + '/Opera9Fixes.css' ); |
| 130 | + importStylesheetURI( skinpath + '/Opera9Fixes.css' ); |
127 | 131 | } else if ( ff2_bugs ) { |
128 | | - importStylesheetURI( stylepath + '/' + skin + '/FF2Fixes.css' ); |
| 132 | + importStylesheetURI( skinpath + '/FF2Fixes.css' ); |
129 | 133 | } |
130 | 134 | } |
131 | 135 | |
132 | | - |
133 | | -if ( 'wgBreakFrames' in window && window.wgBreakFrames ) { |
| 136 | +if ( mw.config.get( 'wgBreakFrames' ) ) { |
134 | 137 | // Un-trap us from framesets |
135 | 138 | if ( window.top != window ) { |
136 | 139 | window.top.location = window.location; |
— | — | @@ -581,7 +584,7 @@ |
582 | 585 | window.injectSpinner = function( element, id ) { |
583 | 586 | var spinner = document.createElement( 'img' ); |
584 | 587 | spinner.id = 'mw-spinner-' + id; |
585 | | - spinner.src = stylepath + '/common/images/spinner.gif'; |
| 588 | + spinner.src = mw.config.get( 'stylepath' ) + '/common/images/spinner.gif'; |
586 | 589 | spinner.alt = spinner.title = '...'; |
587 | 590 | if( element.nextSibling ) { |
588 | 591 | element.parentNode.insertBefore( spinner, element.nextSibling ); |
— | — | @@ -666,5 +669,7 @@ |
667 | 670 | hookEvent( 'load', runOnloadHook ); |
668 | 671 | |
669 | 672 | if ( ie6_bugs ) { |
670 | | - importScriptURI( stylepath + '/common/IEFixes.js' ); |
| 673 | + importScriptURI( mw.config.get( 'stylepath' ) + '/common/IEFixes.js' ); |
671 | 674 | } |
| 675 | + |
| 676 | +})(); |
Index: trunk/phase3/skins/common/IEFixes.js |
— | — | @@ -63,6 +63,12 @@ |
64 | 64 | } |
65 | 65 | }; |
66 | 66 | |
| 67 | +if( isMSIE55 ) { |
| 68 | + // Legacy modules are loaded from the bottom |
| 69 | + // No need to wait for DOMContentReady or window.onload |
| 70 | + fixalpha(); |
| 71 | +} |
| 72 | + |
67 | 73 | // fix ie6 disappering float bug |
68 | 74 | window.relativeforfloats = function() { |
69 | 75 | var bc = document.getElementById( 'bodyContent' ); |
Index: trunk/phase3/skins/Vector.php |
— | — | @@ -238,9 +238,6 @@ |
239 | 239 | <div style="clear:both"></div> |
240 | 240 | </div> |
241 | 241 | <!-- /footer --> |
242 | | - <!-- fixalpha --> |
243 | | - <script type="<?php $this->text( 'jsmimetype' ) ?>"> if ( window.isMSIE55 ) fixalpha(); </script> |
244 | | - <!-- /fixalpha --> |
245 | 242 | <?php $this->printTrail(); ?> |
246 | 243 | |
247 | 244 | </body> |
Index: trunk/phase3/skins/MonoBook.php |
— | — | @@ -109,7 +109,6 @@ |
110 | 110 | + Linker::tooltipAndAccesskeyAttribs('p-logo') ); ?> |
111 | 111 | |
112 | 112 | </div> |
113 | | - <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script> |
114 | 113 | <?php |
115 | 114 | $this->renderPortals( $this->data['sidebar'] ); |
116 | 115 | ?> |
Index: trunk/phase3/includes/installer/WebInstallerOutput.php |
— | — | @@ -232,7 +232,6 @@ |
233 | 233 | href="http://www.mediawiki.org/" |
234 | 234 | title="Main Page"></a> |
235 | 235 | </div> |
236 | | - <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script> |
237 | 236 | <div class="portal"><div class="body"> |
238 | 237 | <?php |
239 | 238 | echo $this->parent->parse( wfMsgNoTrans( 'config-sidebar' ), true ); |
Index: trunk/phase3/resources/Resources.php |
— | — | @@ -833,6 +833,7 @@ |
834 | 834 | 'localBasePath' => $GLOBALS['wgStyleDirectory'], |
835 | 835 | 'dependencies' => 'mediawiki.language', |
836 | 836 | 'messages' => array( 'showtoc', 'hidetoc' ), |
| 837 | + 'position' => 'bottom', |
837 | 838 | ), |
838 | 839 | 'mediawiki.legacy.wikiprintable' => array( |
839 | 840 | 'styles' => array( 'common/wikiprintable.css' => array( 'media' => 'print' ) ), |