Index: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/includes/resourceloader/ResourceLoaderFileModule.php |
— | — | @@ -214,15 +214,20 @@ |
215 | 215 | self::tryForKey( $this->skinScripts, $context->getSkin(), 'default' ) |
216 | 216 | ); |
217 | 217 | if ( $context->getDebug() ) { |
218 | | - $files = array_merge( $files, $this->debugScripts ); |
| 218 | + $files = array_merge( $files, $this->debugScripts ); |
219 | 219 | if ( $this->debugRaw ) { |
220 | | - $script = ''; |
| 220 | + // temporary hack to load raw script files in right order |
| 221 | + $script = 'var rawScriptSet = ['; |
| 222 | + $coma = ''; |
221 | 223 | foreach ( $files as $file ) { |
222 | 224 | $path = $wgServer . $this->getRemotePath( $file ); |
223 | | - $script .= "\n\t" . Xml::encodeJsCall( 'mediaWiki.loader.load', array( $path ) ); |
| 225 | + $script .= $coma . array( $path ) ; |
| 226 | + $coma=','; |
224 | 227 | } |
| 228 | + $script .='];'; |
| 229 | + $script = 'rawScriptSet, function(na, path){ $.getScript} ' |
225 | 230 | return $script; |
226 | | - } |
| 231 | + } |
227 | 232 | } |
228 | 233 | return $this->readScriptFiles( $files ); |
229 | 234 | } |
Index: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/AdSupport/mw.AdTimeline.js |
— | — | @@ -432,6 +432,20 @@ |
433 | 433 | .css( layout ) |
434 | 434 | .html( nonLinearConf.html ) |
435 | 435 | .fadeIn('fast') |
| 436 | + .append( |
| 437 | + // Add a absolute positioned close button: |
| 438 | + $('<span />') |
| 439 | + .css({ |
| 440 | + 'top' : 0, |
| 441 | + 'right' : 0, |
| 442 | + 'position': 'absolute', |
| 443 | + 'cursor' : 'pointer' |
| 444 | + }) |
| 445 | + .addClass("ui-icon ui-icon-closethick") |
| 446 | + .click(function(){ |
| 447 | + $(this).parent().fadeOut('fast') |
| 448 | + }) |
| 449 | + ); |
436 | 450 | |
437 | 451 | |
438 | 452 | // Bind control bar display hide / show |
Index: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/AdSupport/mw.VastAdParser.js |
— | — | @@ -118,6 +118,21 @@ |
119 | 119 | } |
120 | 120 | }); |
121 | 121 | |
| 122 | + // Check for attribute based static resource: |
| 123 | + if( $( resourceNode ).attr('creativeType') && $( resourceNode ).attr('resourceType') == 'static' ){ |
| 124 | + var link = _this.getURLFromNode ( $( resourceNode ).find('NonLinearClickThrough') ); |
| 125 | + resourceObj.$html = $j('<a />') |
| 126 | + .attr({ |
| 127 | + 'href' : link |
| 128 | + }).append( |
| 129 | + $( '<img/>').attr({ |
| 130 | + 'src': _this.getURLFromNode ( resourceNode ), |
| 131 | + 'width' : resourceObj['width'], |
| 132 | + 'height' : resourceObj['height'] |
| 133 | + }) |
| 134 | + ); |
| 135 | + }; |
| 136 | + |
122 | 137 | // Check for companion type: |
123 | 138 | if( $( resourceNode ).find( 'StaticResource' ).length ) { |
124 | 139 | if( $( resourceNode ).find( 'StaticResource' ).attr('creativeType') ) { |
Index: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/MediaWikiSupport/resources/MediaWikiSupportPlayer.js |
— | — | @@ -147,7 +147,13 @@ |
148 | 148 | /** |
149 | 149 | * Issues a request to populate the credits box |
150 | 150 | */ |
| 151 | + var $creditsCache = false; |
151 | 152 | function getCredits( $target, callback ){ |
| 153 | + if( ! $creditsCache ){ |
| 154 | + $target.html( $creditsCache ); |
| 155 | + callback( true ); |
| 156 | + return; |
| 157 | + } |
152 | 158 | // Setup shortcuts: |
153 | 159 | var apiUrl = mw.getApiProviderURL( apiProvider ); |
154 | 160 | var fileTitle = 'File:' + unescape( apiTitleKey).replace(/File:|Image:/, ''); |
— | — | @@ -165,10 +171,9 @@ |
166 | 172 | var imageProps = data.query.pages[i]; |
167 | 173 | // Check properties for "missing" |
168 | 174 | if( imageProps.imageinfo && imageProps.imageinfo[0] && imageProps.imageinfo[0].descriptionurl ){ |
| 175 | + $creditsCache = doCreditLine( imageProps.imageinfo[0].descriptionurl ); |
169 | 176 | // Found page |
170 | | - $target.html( |
171 | | - doCreditLine( imageProps.imageinfo[0].descriptionurl ) |
172 | | - ); |
| 177 | + $target.html($creditsCache); |
173 | 178 | callback( true ); |
174 | 179 | return ; |
175 | 180 | } |
Index: branches/MwEmbedStandAloneRL1_17/MwEmbedStandAlone/modules/TimedText/TimedText.loader.js |
— | — | @@ -42,19 +42,20 @@ |
43 | 43 | if( mw.getConfig( 'TimedText.ShowInterface' ) == 'always' ) { |
44 | 44 | return true; |
45 | 45 | } |
46 | | - // Check for timed text sources or api |
47 | | - if ( |
48 | | - ( |
49 | | - $( embedPlayer ).attr('apititlekey') |
50 | | - || |
51 | | - $( embedPlayer ).attr('apiTitleKey' ) |
52 | | - ) |
53 | | - || |
54 | | - ( embedPlayer.mediaElement && embedPlayer.mediaElement.textSourceExists() ) |
55 | | - || |
56 | | - $( embedPlayer ).find( 'track' ).length != 0 |
57 | | - ) { |
| 46 | + // Do a module check for timed Text support |
| 47 | + var supportsTimedText = false; |
| 48 | + $( embedPlayer ).trigger('SupportsTimedText', function( moduleSupportsTimedText) { |
| 49 | + if( moduleSupportsTimedText ){ |
| 50 | + supportsTimedText = true; |
| 51 | + } |
| 52 | + }); |
| 53 | + |
| 54 | + if( supportsTimedText ){ |
58 | 55 | return true; |
| 56 | + } |
| 57 | + // Check for standard 'track' attribute: |
| 58 | + if ( $( embedPlayer ).find( 'track' ).length != 0 ) { |
| 59 | + return true; |
59 | 60 | } else { |
60 | 61 | return false; |
61 | 62 | } |