Index: branches/MwEmbedStandAlone/modules/AddMedia/loader.js |
— | — | @@ -58,9 +58,9 @@ |
59 | 59 | '$j.browserTest', // ( textSelection uses browserTest ) |
60 | 60 | '$j.ui' |
61 | 61 | ], [ |
62 | | - '$j.ui.resizable', |
| 62 | + '$j.widget', |
63 | 63 | '$j.ui.mouse', |
64 | | - '$j.widget', |
| 64 | + '$j.ui.resizable', |
65 | 65 | '$j.ui.position', |
66 | 66 | '$j.ui.draggable', |
67 | 67 | '$j.ui.dialog', |
Index: branches/MwEmbedStandAlone/modules/AddMedia/mw.RemoteSearchDriver.js |
— | — | @@ -2713,7 +2713,7 @@ |
2714 | 2714 | getTemplateDescription: function( resource ) { |
2715 | 2715 | // setup the resource description from resource description: |
2716 | 2716 | // FIXME: i18n, namespace |
2717 | | - var description = '{{Information ' + "\n"; |
| 2717 | + var description ='{{Information ' + "\n"; |
2718 | 2718 | |
2719 | 2719 | if ( resource.desc ) { |
2720 | 2720 | description += '|Description= ' + resource.desc + "\n"; |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js |
— | — | @@ -88,6 +88,9 @@ |
89 | 89 | $menuBar = $j( '<ul />' ) |
90 | 90 | .addClass( 'k-menu-bar' ); |
91 | 91 | |
| 92 | + // dont include about player menu item ( @@ should be moved to a init function ) |
| 93 | + delete ctrlObj.supportedMenuItems['aboutPlayerLibrary']; |
| 94 | + |
92 | 95 | // Output menu item containers: |
93 | 96 | for ( var menuItem in ctrlObj.supportedMenuItems ) { |
94 | 97 | $menuBar.append( |
Index: branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js |
— | — | @@ -356,41 +356,46 @@ |
357 | 357 | }, function(){ |
358 | 358 | // this should be depreciated ( hidden interface bug in mwEmbed ) |
359 | 359 | $j('#publishVideoTarget').parent().show(); |
360 | | - // Start up the render |
361 | | - var foggRender = $j('#publishVideoTarget').firefoggRender({ |
362 | | - 'statusTarget' : '#firefoggStatusTarget', |
363 | | - 'saveToLocalFile' : localFile, |
364 | | - 'onProgress' : function( progress ){ |
365 | | - var progressPrecent = ( Math.round( progress * 10000 ) / 100 ); |
366 | | - $j('#firefoggPercentDone').text( |
367 | | - progressPrecent + |
368 | | - '%' |
369 | | - ) |
370 | | - $j("#firefoggProgressbar").progressbar({ |
371 | | - "value" : Math.round( progress * 100 ) |
372 | | - }); |
373 | | - // xxx WTF? no idea why progressbar above is not working |
374 | | - $j("#firefoggProgressbar .ui-progressbar-value").css('width', Math.round( progress * 10000 ) / 100 + '%'); |
375 | | - }, |
376 | | - 'doneRenderCallback': function( fogg ){ |
377 | | - if( localFile ){ |
378 | | - $dialog.html( gM('mwe-sequencer-save_done') ); |
379 | | - } else { |
380 | | - _this.uploadRenderedVideo( $dialog, fogg ); |
| 360 | + |
| 361 | + // wait 100ms before starting the firefogg render ( avoids page lock |
| 362 | + // and ensures we don't get a loading spinner for first frame of render) |
| 363 | + setTimeout(function(){ |
| 364 | + // Start up the render |
| 365 | + var foggRender = $j('#publishVideoTarget').firefoggRender({ |
| 366 | + 'statusTarget' : '#firefoggStatusTarget', |
| 367 | + 'saveToLocalFile' : localFile, |
| 368 | + 'onProgress' : function( progress ){ |
| 369 | + var progressPrecent = ( Math.round( progress * 10000 ) / 100 ); |
| 370 | + $j('#firefoggPercentDone').text( |
| 371 | + progressPrecent + |
| 372 | + '%' |
| 373 | + ) |
| 374 | + $j("#firefoggProgressbar").progressbar({ |
| 375 | + "value" : Math.round( progress * 100 ) |
| 376 | + }); |
| 377 | + // xxx WTF? no idea why progressbar above is not working |
| 378 | + $j("#firefoggProgressbar .ui-progressbar-value").css('width', Math.round( progress * 10000 ) / 100 + '%'); |
| 379 | + }, |
| 380 | + 'doneRenderCallback': function( fogg ){ |
| 381 | + if( localFile ){ |
| 382 | + $dialog.html( gM('mwe-sequencer-save_done') ); |
| 383 | + } else { |
| 384 | + _this.uploadRenderedVideo( $dialog, fogg ); |
| 385 | + } |
381 | 386 | } |
| 387 | + }); |
| 388 | + var buttons = {}; |
| 389 | + buttons[ gM('mwe-cancel') ] = function(){ |
| 390 | + foggRender.stopRender(); |
| 391 | + $j( this ).dialog( 'close' ); |
382 | 392 | } |
383 | | - }); |
384 | | - var buttons = {}; |
385 | | - buttons[ gM('mwe-cancel') ] = function(){ |
386 | | - foggRender.stopRender(); |
387 | | - $j( this ).dialog( 'close' ); |
388 | | - } |
389 | | - // Add cancel button |
390 | | - $dialog.dialog( "option", "buttons", buttons ); |
391 | | - if( !foggRender.doRender() ){ |
392 | | - // do render returns false on firefox gui cancel close the dialog: |
393 | | - $dialog.dialog("close"); |
394 | | - } |
| 393 | + // Add cancel button |
| 394 | + $dialog.dialog( "option", "buttons", buttons ); |
| 395 | + if( !foggRender.doRender() ){ |
| 396 | + // do render returns false on firefox gui cancel close the dialog: |
| 397 | + $dialog.dialog("close"); |
| 398 | + } |
| 399 | + }, 100); |
395 | 400 | }); |
396 | 401 | }, |
397 | 402 | |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerServer.js |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | wrapSequencerWikiText : function( xmlString ){ |
120 | 120 | var _this = this; |
121 | 121 | if( !_this.currentSequencePage.pageStart ){ |
122 | | - _this.currentSequencePage.pageStart ="\nTo edit this sequence " + |
| 122 | + _this.currentSequencePage.pageStart ="\nTo edit or view this sequence " + |
123 | 123 | '[{{fullurl:{{FULLPAGENAME}}|withJS=MediaWiki:MwEmbed.js}} enable the sequencer] for this page'; |
124 | 124 | } |
125 | 125 | return _this.currentSequencePage.pageStart + |
— | — | @@ -313,7 +313,12 @@ |
314 | 314 | getCommonsDescriptionText: function(){ |
315 | 315 | var _this = this; |
316 | 316 | |
317 | | - var descText ="{{Information\n" + |
| 317 | + var descText = '<!-- ' + |
| 318 | + "Note: this is an automated file description for a published video sequence. \n" |
| 319 | + "Changes to this wikitext will be overwiten. Please add metadata and categories to\n" + |
| 320 | + _this.getTitleKey() + " instead --> \n"; |
| 321 | + |
| 322 | + descText += "{{Information\n" + |
318 | 323 | "|Description=" + _this.getBaseFileDescription() + "\n" + |
319 | 324 | "|Source= Sequence Sources assets include:\n"; |
320 | 325 | |
— | — | @@ -335,10 +340,11 @@ |
336 | 341 | pad2(dt.getMonth()+1) + '-' + |
337 | 342 | pad2(dt.getDate()) + "\n" + |
338 | 343 | "|Author=Last edit by [[User:" + _this.getUserName() + "]]\n" + |
339 | | - "|Permission= {{Cc-by-nc-sa-2.0-dual}}" + "\n" + |
| 344 | + "For full editor list see history page of [[" + _this.getTitleKey() + "]] \n" + |
| 345 | + "|Permission={{Cc-by-sa-3.0}} and {{GFDL|migration=redundant}}" + "\n" + |
340 | 346 | "}}"; |
341 | 347 | |
342 | | - // Add Published Sequence category ( for now ) |
| 348 | + // Add Published Sequence category ( for now ) |
343 | 349 | descText += "\n[[Category:Published Sequence]]\n"; |
344 | 350 | return descText; |
345 | 351 | }, |
Index: branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | * |
39 | 39 | * @param {String} url The url to be wrapped |
40 | 40 | */ |
41 | | -mw.getRemoteSequencerLink = function( url ){ |
| 41 | +mw.getRemoteSequencerLink = function( url ){ |
42 | 42 | if( mw.getConfig( 'Sequencer.WithJsMwEmbedUrlHelper' ) ){ |
43 | 43 | if( url.indexOf('?') == -1){ |
44 | 44 | url+='?' |
— | — | @@ -90,7 +90,7 @@ |
91 | 91 | || embedPlayer.instanceOf.toLowerCase() == 'smil' |
92 | 92 | || embedPlayer.getHeight() < 180 |
93 | 93 | || embedPlayer.getWidth() < 240 |
94 | | - // For now require that the video is a flat sequence special key: Sequence- |
| 94 | + // Require that the video is a flat sequence special key: Sequence- |
95 | 95 | || embedPlayer.apiTitleKey.indexOf('Sequence-') != 0 |
96 | 96 | ){ |
97 | 97 | return ; |
— | — | @@ -200,9 +200,12 @@ |
201 | 201 | * @param {Object} options RemoteMwSequencer options |
202 | 202 | */ |
203 | 203 | init: function( options ) { |
204 | | - this.action = ( options.action )? options.action : this.action; |
205 | | - this.title = ( options.title )? options.title : this.title; |
206 | | - this.target = ( options.target )? options.target : this.target; |
| 204 | + if( ! options.action || ! options.titleKey || ! options.target){ |
| 205 | + mw.log("Error sequence remote missing action, title or target"); |
| 206 | + } |
| 207 | + this.action = options.action; |
| 208 | + this.titleKey = options.titleKey; |
| 209 | + this.target = options.target; |
207 | 210 | }, |
208 | 211 | |
209 | 212 | drawUI: function() { |
— | — | @@ -251,6 +254,17 @@ |
252 | 255 | } |
253 | 256 | }, |
254 | 257 | |
| 258 | + showViewFlattenedFile: function(){ |
| 259 | + var _this = this; |
| 260 | + //just update the edit button: |
| 261 | + $j('#ca-edit a') |
| 262 | + .html( $j('<span />').text( gM('mwe-sequencer-edit-sequence' ) ) ) |
| 263 | + .click(function(){ |
| 264 | + _this.showEditor(); |
| 265 | + return false; |
| 266 | + }) |
| 267 | + }, |
| 268 | + |
255 | 269 | showEditUI: function(){ |
256 | 270 | var _this = this; |
257 | 271 | $j('#bodyContent').prepend( |
— | — | @@ -444,7 +458,7 @@ |
445 | 459 | |
446 | 460 | return '[[' + this.getSequenceFileKey() + "|thumb|400px|right|\n\n" + |
447 | 461 | "Sequence " + this.getTitle() + " \n\n" + |
448 | | - "<br/>Edit this sequence with the [" + |
| 462 | + "<br>Edit this sequence with the [" + |
449 | 463 | mw.getRemoteSequencerLink ( editLink ) + |
450 | 464 | ' kaltura editor] ]]'; |
451 | 465 | }, |
— | — | @@ -491,7 +505,7 @@ |
492 | 506 | server: { |
493 | 507 | 'type' : 'mediaWiki', |
494 | 508 | 'url' : _this.getApiUrl(), |
495 | | - 'titleKey' : wgPageName, |
| 509 | + 'titleKey' : _this.titleKey, |
496 | 510 | 'pagePathUrl' : wgServer + wgArticlePath, |
497 | 511 | 'userName' : wgUserName |
498 | 512 | }, |
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js |
— | — | @@ -72,11 +72,13 @@ |
73 | 73 | * Wikimedia specific config |
74 | 74 | ********************************/ |
75 | 75 | mw.setConfig( 'Sequencer.KalturaPlayerEditOverlay', true ); |
| 76 | +mw.setConfig( 'Sequencer.WithJsMwEmbedUrlHelper', true ); |
76 | 77 | mw.setConfig( 'EmbedPlayer.KalturaAttribution', true ); |
77 | 78 | mw.setConfig( 'SwarmTransport.Enable', true ); |
78 | 79 | mw.setConfig( 'SmilPlayer.AssetDomainWhiteList', ['upload.wikimedia.org'] ); |
79 | 80 | |
80 | 81 | |
| 82 | + |
81 | 83 | // Use wikibits onLoad hook: ( since we don't have js2 / mw object loaded ) |
82 | 84 | addOnloadHook( function() { |
83 | 85 | doPageSpecificRewrite(); |
— | — | @@ -135,8 +137,8 @@ |
136 | 138 | } ); |
137 | 139 | return ; |
138 | 140 | } |
139 | | - } |
140 | | - |
| 141 | + } |
| 142 | + |
141 | 143 | // Remote Sequencer |
142 | 144 | if( wgPageName.indexOf( "Sequence:" ) === 0 ){ |
143 | 145 | //console.log( 'spl: ' + typeof mwSetPageToLoading ); |
— | — | @@ -226,14 +228,25 @@ |
227 | 229 | if ( vidIdList.length > 0 ) { |
228 | 230 | // Reverse order the array so videos at the "top" get swapped first: |
229 | 231 | vidIdList = vidIdList.reverse(); |
230 | | - mwLoadPlayer( function(){ |
231 | | - //Load the "EmbedPlayer" module: |
232 | | - // All the actual code was requested in our single script-loader call |
233 | | - // but the "load" request applies the setup. |
234 | | - mw.load( 'EmbedPlayer', function() { |
235 | | - // Do utility rewrite of OggHandler content: |
236 | | - rewrite_for_OggHandler( vidIdList ); |
237 | | - } ); |
| 232 | + mwLoadPlayer( function(){ |
| 233 | + |
| 234 | + // Check for flat file page: |
| 235 | + var flatFilePretext = "File:Sequence-"; |
| 236 | + if( wgPageName.indexOf(flatFilePretext ) === 0 |
| 237 | + && |
| 238 | + wgPageName.indexOf('.ogv') !== -1 ) |
| 239 | + { |
| 240 | + var sequenceTitle = 'Sequence:' + wgPageName.substring( flatFilePretext.length, wgPageName.length - 4 ); |
| 241 | + window.mwSequencerRemote = new mw.MediaWikiRemoteSequencer({ |
| 242 | + 'action': wgAction, |
| 243 | + 'titleKey' : sequenceTitle, |
| 244 | + 'target' : '#bodyContent' |
| 245 | + }); |
| 246 | + window.mwSequencerRemote.showViewFlattenedFile() |
| 247 | + } |
| 248 | + |
| 249 | + // Do utility rewrite of OggHandler content: |
| 250 | + rewrite_for_OggHandler( vidIdList ); |
238 | 251 | } ); |
239 | 252 | return ; |
240 | 253 | } |