http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73650
Revision: 73650
Author: dale
Date: 2010-09-24 00:21:57 +0000 (Fri, 24 Sep 2010)
Log Message:
-----------
keep categories displayed on sequence remote page
Modified Paths:
--------------
branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js
branches/MwEmbedStandAlone/remotes/mediaWiki.js
Modified:
branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js
===================================================================
---
branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js
2010-09-23 23:56:55 UTC (rev 73649)
+++
branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js
2010-09-24 00:21:57 UTC (rev 73650)
@@ -216,6 +216,7 @@
this.action = options.action;
this.titleKey = options.titleKey;
this.target = options.target;
+ this.catLinks = options.catLinks;
},
drawUI: function() {
@@ -310,7 +311,7 @@
displayPlayerEmbed: function(){
var _this = this;
// load the embedPlayer module:
- mw.load('EmbedPlayer', function(){
+ mw.load( 'EmbedPlayer', function(){
// Check if the sequence has been flattened and is up
to date:
var request = {
'action': 'query',
@@ -394,6 +395,9 @@
}
}
var width = ( imageinfo && imageinfo.thumbwidth
)?imageinfo.thumbwidth : '400px';
+
+ // Copy the category links if present
+
// Display embed sequence
$j( _this.target ).empty().append(
$j('<div />')
@@ -437,7 +441,15 @@
// Add a clear both to give content
body height
$j('<div />').css( { 'clear': 'both' } )
+
)
+ // add cat links if set;
+ if( _this.catLinks ){
+ $j( _this.target ).append(
+ $j('<div />').html(
_this.catLinks )
+ );
+ }
+
// Rewrite the player
$j('#embedSequencePlayer').embedPlayer();
}); // load json player data
Modified: branches/MwEmbedStandAlone/remotes/mediaWiki.js
===================================================================
--- branches/MwEmbedStandAlone/remotes/mediaWiki.js 2010-09-23 23:56:55 UTC
(rev 73649)
+++ branches/MwEmbedStandAlone/remotes/mediaWiki.js 2010-09-24 00:21:57 UTC
(rev 73650)
@@ -153,6 +153,7 @@
document.URL.indexOf('&diff=') == -1
){
if( wgAction == 'view' ){
+ var catLinksHtml =
document.getElementById('catlinks');
mwSetPageToLoading();
}
if( wgAction == 'edit' ){
@@ -171,7 +172,8 @@
window.mwSequencerRemote = new
mw.MediaWikiRemoteSequencer({
'action': wgAction,
'titleKey' : wgPageName,
- 'target' : '#bodyContent'
+ 'target' : '#bodyContent',
+ 'catLinks' : catLinksHtml
});
window.mwSequencerRemote.drawUI();
@@ -272,7 +274,7 @@
*/
function mwSetPageToLoading(){
mwAddCommonStyleSheet();
- var body = document.getElementById('bodyContent');
+ var body = document.getElementById( 'bodyContent' );
var oldBodyHTML = body.innerHTML;
body.innerHTML = '<div class="loadingSpinner"></div>';
return oldBodyHTML;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs