r74730 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74729‎ | r74730 | r74731 >
Date:19:15, 13 October 2010
Author:dale
Status:deferred
Tags:
Comment:
added small delay to loading player to try and deal with jquery ui conflicts
Modified paths:
  • /branches/MwEmbedStandAlone/remotes/mediaWiki.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js
@@ -35,8 +35,8 @@
3636 mwUseScriptLoader = false;
3737 }
3838
39 -//mwReqParam['debug'] = false;
40 -//mwUseScriptLoader = true;
 39+mwReqParam['debug'] = false;
 40+mwUseScriptLoader = true;
4141 //mwRemoteVersion = Math.random();
4242
4343 // Setup up some globals to wrap mwEmbed mw.ready and mw.setConfig functions
@@ -140,20 +140,24 @@
141141 if( wgAction == 'view' ){
142142 var orgBody = mwSetPageToLoading();
143143 //load the "player" ( includes call to loadMwEmbed )
144 - mwLoadPlayer(function(){
145 - // Now load MediaWiki TimedText Remote:
146 - mw.load( 'RemoteMwTimedText',function(){
147 - //Setup the remote configuration
148 - var myRemote = new RemoteMwTimedText( {
149 - 'action': wgAction,
150 - 'title' : wgTitle,
151 - 'target': '#bodyContent',
152 - 'orgBody': orgBody
153 - });
154 - // Update the UI
155 - myRemote.updateUI();
 144+
 145+ // Add a timeout to give a chance for ui core to build out ( bug with replace jquery ui )
 146+ setTimeout(function(){
 147+ mwLoadPlayer(function(){
 148+ // Now load MediaWiki TimedText Remote:
 149+ mw.load( 'RemoteMwTimedText',function(){
 150+ //Setup the remote configuration
 151+ var myRemote = new RemoteMwTimedText( {
 152+ 'action': wgAction,
 153+ 'title' : wgTitle,
 154+ 'target': '#bodyContent',
 155+ 'orgBody': orgBody
 156+ });
 157+ // Update the UI
 158+ myRemote.updateUI();
 159+ } );
156160 } );
157 - } );
 161+ }, 100 );
158162 return ;
159163 }
160164 }
@@ -254,26 +258,29 @@
255259 if ( vidIdList.length > 0 ) {
256260 // Reverse order the array so videos at the "top" get swapped first:
257261 vidIdList = vidIdList.reverse();
258 - mwLoadPlayer( function(){
259 -
260 - // Check for flat file page:
261 - var flatFilePretext = "File:Sequence-";
262 - if( wgPageName.indexOf(flatFilePretext ) === 0
263 - &&
264 - wgPageName.indexOf('.ogv') !== -1 )
265 - {
266 - var sequenceTitle = 'Sequence:' + wgPageName.substring( flatFilePretext.length, wgPageName.length - 4 );
267 - window.mwSequencerRemote = new mw.MediaWikiRemoteSequencer({
268 - 'action': wgAction,
269 - 'titleKey' : sequenceTitle,
270 - 'target' : '#bodyContent'
271 - });
272 - window.mwSequencerRemote.showViewFlattenedFile();
273 - }
274 -
275 - // Do utility rewrite of OggHandler content:
276 - rewrite_for_OggHandler( vidIdList );
277 - } );
 262+ // Add a timeout to give a chance for ui core to build out ( bug with replace jquery ui )
 263+ setTimeout(function(){
 264+ mwLoadPlayer( function(){
 265+
 266+ // Check for flat file page:
 267+ var flatFilePretext = "File:Sequence-";
 268+ if( wgPageName.indexOf(flatFilePretext ) === 0
 269+ &&
 270+ wgPageName.indexOf('.ogv') !== -1 )
 271+ {
 272+ var sequenceTitle = 'Sequence:' + wgPageName.substring( flatFilePretext.length, wgPageName.length - 4 );
 273+ window.mwSequencerRemote = new mw.MediaWikiRemoteSequencer({
 274+ 'action': wgAction,
 275+ 'titleKey' : sequenceTitle,
 276+ 'target' : '#bodyContent'
 277+ });
 278+ window.mwSequencerRemote.showViewFlattenedFile();
 279+ }
 280+
 281+ // Do utility rewrite of OggHandler content:
 282+ rewrite_for_OggHandler( vidIdList );
 283+ } );
 284+ }, 100);
278285 return ;
279286 }
280287

Status & tagging log