Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js |
— | — | @@ -35,8 +35,8 @@ |
36 | 36 | mwUseScriptLoader = false; |
37 | 37 | } |
38 | 38 | |
39 | | -//mwReqParam['debug'] = false; |
40 | | -//mwUseScriptLoader = true; |
| 39 | +mwReqParam['debug'] = false; |
| 40 | +mwUseScriptLoader = true; |
41 | 41 | //mwRemoteVersion = Math.random(); |
42 | 42 | |
43 | 43 | // Setup up some globals to wrap mwEmbed mw.ready and mw.setConfig functions |
— | — | @@ -140,20 +140,24 @@ |
141 | 141 | if( wgAction == 'view' ){ |
142 | 142 | var orgBody = mwSetPageToLoading(); |
143 | 143 | //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 | + } ); |
156 | 160 | } ); |
157 | | - } ); |
| 161 | + }, 100 ); |
158 | 162 | return ; |
159 | 163 | } |
160 | 164 | } |
— | — | @@ -254,26 +258,29 @@ |
255 | 259 | if ( vidIdList.length > 0 ) { |
256 | 260 | // Reverse order the array so videos at the "top" get swapped first: |
257 | 261 | 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); |
278 | 285 | return ; |
279 | 286 | } |
280 | 287 | |