r73650 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73649‎ | r73650 | r73651 >
Date:00:21, 24 September 2010
Author:dale
Status:deferred
Tags:
Comment:
keep categories displayed on sequence remote page
Modified paths:
  • /branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js (modified) (history)
  • /branches/MwEmbedStandAlone/remotes/mediaWiki.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js
@@ -216,6 +216,7 @@
217217 this.action = options.action;
218218 this.titleKey = options.titleKey;
219219 this.target = options.target;
 220+ this.catLinks = options.catLinks;
220221 },
221222
222223 drawUI: function() {
@@ -310,7 +311,7 @@
311312 displayPlayerEmbed: function(){
312313 var _this = this;
313314 // load the embedPlayer module:
314 - mw.load('EmbedPlayer', function(){
 315+ mw.load( 'EmbedPlayer', function(){
315316 // Check if the sequence has been flattened and is up to date:
316317 var request = {
317318 'action': 'query',
@@ -394,6 +395,9 @@
395396 }
396397 }
397398 var width = ( imageinfo && imageinfo.thumbwidth )?imageinfo.thumbwidth : '400px';
 399+
 400+ // Copy the category links if present
 401+
398402 // Display embed sequence
399403 $j( _this.target ).empty().append(
400404 $j('<div />')
@@ -437,7 +441,15 @@
438442
439443 // Add a clear both to give content body height
440444 $j('<div />').css( { 'clear': 'both' } )
 445+
441446 )
 447+ // add cat links if set;
 448+ if( _this.catLinks ){
 449+ $j( _this.target ).append(
 450+ $j('<div />').html( _this.catLinks )
 451+ );
 452+ }
 453+
442454 // Rewrite the player
443455 $j('#embedSequencePlayer').embedPlayer();
444456 }); // load json player data
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js
@@ -153,6 +153,7 @@
154154 document.URL.indexOf('&diff=') == -1
155155 ){
156156 if( wgAction == 'view' ){
 157+ var catLinksHtml = document.getElementById('catlinks');
157158 mwSetPageToLoading();
158159 }
159160 if( wgAction == 'edit' ){
@@ -171,7 +172,8 @@
172173 window.mwSequencerRemote = new mw.MediaWikiRemoteSequencer({
173174 'action': wgAction,
174175 'titleKey' : wgPageName,
175 - 'target' : '#bodyContent'
 176+ 'target' : '#bodyContent',
 177+ 'catLinks' : catLinksHtml
176178 });
177179 window.mwSequencerRemote.drawUI();
178180
@@ -272,7 +274,7 @@
273275 */
274276 function mwSetPageToLoading(){
275277 mwAddCommonStyleSheet();
276 - var body = document.getElementById('bodyContent');
 278+ var body = document.getElementById( 'bodyContent' );
277279 var oldBodyHTML = body.innerHTML;
278280 body.innerHTML = '<div class="loadingSpinner"></div>';
279281 return oldBodyHTML;

Status & tagging log