Index: branches/js2-work/phase3/js/mwEmbed/mwEmbed.js |
— | — | @@ -2184,12 +2184,22 @@ |
2185 | 2185 | |
2186 | 2186 | // Set up mvEmbed utility jQuery bindings |
2187 | 2187 | mw.dojQueryBindings(); |
| 2188 | + var skinRequest = ['mw.style.mwCommon']; |
2188 | 2189 | |
| 2190 | + var includeUiCss = true; |
| 2191 | + // Load the jQuery ui skin if usability skin not set |
| 2192 | + $j( 'link' ).each( function( na, linkNode ){ |
| 2193 | + if( $j( linkNode ).attr( 'href' ).indexOf('jquery-ui-1.7.2.css') != -1 ) { |
| 2194 | + includeUiCss = false; |
| 2195 | + return false; |
| 2196 | + } |
| 2197 | + } ); |
| 2198 | + if( includeUiCss ){ |
| 2199 | + skinRequest.push( 'mw.style.' + mw.getConfig( 'jQueryUISkin' ) ); |
| 2200 | + } |
| 2201 | + |
2189 | 2202 | // Make sure style sheets are loaded: |
2190 | | - mw.load( [ |
2191 | | - 'mw.style.mwCommon', |
2192 | | - 'mw.style.' + mw.getConfig( 'jQueryUISkin' ) |
2193 | | - ], function(){ |
| 2203 | + mw.load( skinRequest , function(){ |
2194 | 2204 | |
2195 | 2205 | // Run all the setup function hooks |
2196 | 2206 | // NOTE: setup functions are added via addSetupHook calls |
Index: branches/js2-work/phase3/js/mwEmbed/jsScriptLoader.php |
— | — | @@ -132,7 +132,7 @@ |
133 | 133 | // Check that mwEmbed required style sheets are part of the request, |
134 | 134 | // if not include them here |
135 | 135 | // This is so mwEmbed requests gets basic interface css |
136 | | - foreach( array('mw.style.mwCommon', 'mw.style.jqueryUiRedmond') as $styleKey ){ |
| 136 | + foreach( array('mw.style.mwCommon' ) as $styleKey ){ |
137 | 137 | if( !isset( $this->namedFileList[ $styleKey ] ) ) { |
138 | 138 | $this->output .= $this->getScriptText( $styleKey ); |
139 | 139 | } |
Index: branches/js2-work/phase3/js/mwEmbed/remotes/mediaWiki.js |
— | — | @@ -171,7 +171,8 @@ |
172 | 172 | * ( front-loaded to avoid extra requests ) |
173 | 173 | */ |
174 | 174 | function mwLoadPlayer( callback ){ |
175 | | - // the jsPlayerRequest includes both javascript and style sheets for the embedPlayer |
| 175 | + |
| 176 | + // The jsPlayerRequest includes both javascript and style sheets for the embedPlayer |
176 | 177 | var jsPlayerRequest = [ |
177 | 178 | 'mw.EmbedPlayer', |
178 | 179 | '$j.ui', |
— | — | @@ -183,7 +184,8 @@ |
184 | 185 | '$j.fn.menu', |
185 | 186 | 'mw.style.jquerymenu', |
186 | 187 | 'mw.TimedText' |
187 | | - ]; |
| 188 | + ]; |
| 189 | + |
188 | 190 | // Quick sniff use java if IE and native if firefox |
189 | 191 | // ( other browsers will run detect and get on-demand ) |
190 | 192 | if (navigator.userAgent.indexOf("MSIE") != -1){ |
— | — | @@ -208,8 +210,7 @@ |
209 | 211 | // Don't process empty vids |
210 | 212 | if ( !vidId ){ |
211 | 213 | return ; |
212 | | - } |
213 | | - |
| 214 | + } |
214 | 215 | |
215 | 216 | tag_type = 'video'; |
216 | 217 | |
— | — | @@ -250,7 +251,7 @@ |
251 | 252 | offset = re.exec( rewriteHTML ); |
252 | 253 | var offset_attr = ( offset && offset[2] )? 'startOffset="' + offset[2] + '" ' : ''; |
253 | 254 | |
254 | | - // Check if file is from commons and therefore should explictly set apiProvider to commons: |
| 255 | + // Check if file is from commons and therefore should explicitly set apiProvider to commons: |
255 | 256 | var apiProviderAttr = ( src.indexOf( 'wikipedia\/commons' ) != -1 )?'apiProvider="commons" ': ''; |
256 | 257 | |
257 | 258 | if ( src ) { |
— | — | @@ -412,8 +413,7 @@ |
413 | 414 | //Gadget button already in dom |
414 | 415 | return false; |
415 | 416 | } |
416 | | - |
417 | | - |
| 417 | + |
418 | 418 | scripts = document.getElementsByTagName( 'script' ); |
419 | 419 | |
420 | 420 | // Check for document paramater withJS and ignore found gadget |