Index: branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js |
— | — | @@ -216,6 +216,7 @@ |
217 | 217 | this.action = options.action; |
218 | 218 | this.titleKey = options.titleKey; |
219 | 219 | this.target = options.target; |
| 220 | + this.catLinks = options.catLinks; |
220 | 221 | }, |
221 | 222 | |
222 | 223 | drawUI: function() { |
— | — | @@ -310,7 +311,7 @@ |
311 | 312 | displayPlayerEmbed: function(){ |
312 | 313 | var _this = this; |
313 | 314 | // load the embedPlayer module: |
314 | | - mw.load('EmbedPlayer', function(){ |
| 315 | + mw.load( 'EmbedPlayer', function(){ |
315 | 316 | // Check if the sequence has been flattened and is up to date: |
316 | 317 | var request = { |
317 | 318 | 'action': 'query', |
— | — | @@ -394,6 +395,9 @@ |
395 | 396 | } |
396 | 397 | } |
397 | 398 | var width = ( imageinfo && imageinfo.thumbwidth )?imageinfo.thumbwidth : '400px'; |
| 399 | + |
| 400 | + // Copy the category links if present |
| 401 | + |
398 | 402 | // Display embed sequence |
399 | 403 | $j( _this.target ).empty().append( |
400 | 404 | $j('<div />') |
— | — | @@ -437,7 +441,15 @@ |
438 | 442 | |
439 | 443 | // Add a clear both to give content body height |
440 | 444 | $j('<div />').css( { 'clear': 'both' } ) |
| 445 | + |
441 | 446 | ) |
| 447 | + // add cat links if set; |
| 448 | + if( _this.catLinks ){ |
| 449 | + $j( _this.target ).append( |
| 450 | + $j('<div />').html( _this.catLinks ) |
| 451 | + ); |
| 452 | + } |
| 453 | + |
442 | 454 | // Rewrite the player |
443 | 455 | $j('#embedSequencePlayer').embedPlayer(); |
444 | 456 | }); // load json player data |
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js |
— | — | @@ -153,6 +153,7 @@ |
154 | 154 | document.URL.indexOf('&diff=') == -1 |
155 | 155 | ){ |
156 | 156 | if( wgAction == 'view' ){ |
| 157 | + var catLinksHtml = document.getElementById('catlinks'); |
157 | 158 | mwSetPageToLoading(); |
158 | 159 | } |
159 | 160 | if( wgAction == 'edit' ){ |
— | — | @@ -171,7 +172,8 @@ |
172 | 173 | window.mwSequencerRemote = new mw.MediaWikiRemoteSequencer({ |
173 | 174 | 'action': wgAction, |
174 | 175 | 'titleKey' : wgPageName, |
175 | | - 'target' : '#bodyContent' |
| 176 | + 'target' : '#bodyContent', |
| 177 | + 'catLinks' : catLinksHtml |
176 | 178 | }); |
177 | 179 | window.mwSequencerRemote.drawUI(); |
178 | 180 | |
— | — | @@ -272,7 +274,7 @@ |
273 | 275 | */ |
274 | 276 | function mwSetPageToLoading(){ |
275 | 277 | mwAddCommonStyleSheet(); |
276 | | - var body = document.getElementById('bodyContent'); |
| 278 | + var body = document.getElementById( 'bodyContent' ); |
277 | 279 | var oldBodyHTML = body.innerHTML; |
278 | 280 | body.innerHTML = '<div class="loadingSpinner"></div>'; |
279 | 281 | return oldBodyHTML; |