Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | */ |
85 | 85 | renderTime: function( time, deltaTime ){ |
86 | 86 | var _this = this; |
87 | | - mw.log( "SmilBody::renderTime:: " + time + ' delta: '+ deltaTime); |
| 87 | + //mw.log( "SmilBody::renderTime:: " + time + ' delta: '+ deltaTime); |
88 | 88 | |
89 | 89 | // Get all the draw elements from the body this time: |
90 | 90 | this.getElementsForTime( time , |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js |
— | — | @@ -682,6 +682,7 @@ |
683 | 683 | // xxx height domination here may be confused refactor this check |
684 | 684 | if( natrualAspect >= targetAspect ){ |
685 | 685 | transformCss.width = parseFloat( transformPercent ) + '%'; |
| 686 | + transformCss.height = null; |
686 | 687 | /*transformCss.height = ( parseFloat( transformPercent ) * ( |
687 | 688 | ( natrualSize.height / natrualSize.width ) / |
688 | 689 | ( targetSize.height / targetSize.width ) |
— | — | @@ -692,6 +693,7 @@ |
693 | 694 | // Fit vertically |
694 | 695 | if(! transformCss.height || natrualAspect < targetAspect ){ |
695 | 696 | transformCss.height = parseFloat( transformPercent ) + '%'; |
| 697 | + transformCss.width = null; |
696 | 698 | /*transformCss.width = ( parseFloat( transformPercent ) * |
697 | 699 | ( natrualSize.height / natrualSize.width ) / |
698 | 700 | ( targetSize.width / targetSize.height ) |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | }, |
67 | 67 | |
68 | 68 | /** |
69 | | - * set the virtual smil volume ( will key all underling assets against this volume ) |
| 69 | + * Set the virtual smil volume ( will key all underling assets against this volume ) |
70 | 70 | * ( we can't presently "normalize" across clips ) |
71 | 71 | */ |
72 | 72 | setPlayerElementVolume: function( percent ){ |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -3022,7 +3022,7 @@ |
3023 | 3023 | |
3024 | 3024 | // update the mute state from the player element |
3025 | 3025 | if( _this.muted != _this.getPlayerElementMuted() ){ |
3026 | | - mw.log("monitor:: muted does not mach embed player" ); |
| 3026 | + mw.log("monitor:: muted does not match embed player" ); |
3027 | 3027 | _this.toggleMute(); |
3028 | 3028 | // Make sure they match: |
3029 | 3029 | _this.muted = _this.getPlayerElementMuted(); |
— | — | @@ -3083,7 +3083,7 @@ |
3084 | 3084 | }, this.monitorRate ) |
3085 | 3085 | } |
3086 | 3086 | } else { |
3087 | | - mw.log("EmbedPlayer::monitor: player is stoped, stop monitor") |
| 3087 | + //mw.log("EmbedPlayer::monitor: player is stoped, stop monitor") |
3088 | 3088 | // If stopped "stop" monitor: |
3089 | 3089 | clearInterval( this.monitorInterval ); |
3090 | 3090 | } |
Index: branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js |
— | — | @@ -240,6 +240,22 @@ |
241 | 241 | // give the input focus |
242 | 242 | .find('input').focus() |
243 | 243 | }, |
| 244 | + renderToDisk: function(){ |
| 245 | + var _this = this; |
| 246 | + // add a loading dialog |
| 247 | + var $dialog = mw.addDialog({ |
| 248 | + 'resizable':'true', |
| 249 | + 'title' : gM('mwe-sequencer-menu-sequence-publish-desc'), |
| 250 | + 'content' : gM('mwe-sequencer-loading-publish-render'), |
| 251 | + 'width' : 450, |
| 252 | + 'height' : 470, |
| 253 | + 'draggable' : false, |
| 254 | + 'resizable' : false |
| 255 | + }); |
| 256 | + mw.load( ['AddMedia.firefogg','FirefoggRender'], function(){ |
| 257 | + _this.doPublish( $dialog, true ); |
| 258 | + }); |
| 259 | + }, |
244 | 260 | /** |
245 | 261 | * Display the publish dialog |
246 | 262 | * ( confirm the user has firefogg and rights to save a new version of the file ) |
— | — | @@ -252,7 +268,9 @@ |
253 | 269 | 'title' : gM('mwe-sequencer-menu-sequence-publish-desc'), |
254 | 270 | 'content' : gM('mwe-sequencer-loading-publish-render'), |
255 | 271 | 'width' : 450, |
256 | | - 'height' : 470 |
| 272 | + 'height' : 470, |
| 273 | + 'draggable' : false, |
| 274 | + 'resizable' : false |
257 | 275 | }); |
258 | 276 | |
259 | 277 | // Check if we have unsaved changes ( don't publish unsaved changes ) |
— | — | @@ -287,11 +305,8 @@ |
288 | 306 | } |
289 | 307 | }); |
290 | 308 | }, |
291 | | - doPublish: function( $dialog ){ |
| 309 | + doPublish: function( $dialog, localFile ){ |
292 | 310 | var _this = this; |
293 | | - // disable drag and resize |
294 | | - $dialog.dialog("option", "draggable", false ) |
295 | | - $dialog.dialog( "option", "resizable", false ); |
296 | 311 | |
297 | 312 | // Get a Firefogg object to check if firefogg is installed |
298 | 313 | var myFogg = new mw.Firefogg( { |
— | — | @@ -344,7 +359,7 @@ |
345 | 360 | // Start up the render |
346 | 361 | var foggRender = $j('#publishVideoTarget').firefoggRender({ |
347 | 362 | 'statusTarget' : '#firefoggStatusTarget', |
348 | | - 'saveToLocalFile' : false, |
| 363 | + 'saveToLocalFile' : localFile, |
349 | 364 | 'onProgress' : function( progress ){ |
350 | 365 | var progressPrecent = ( Math.round( progress * 10000 ) / 100 ); |
351 | 366 | $j('#firefoggPercentDone').text( |
— | — | @@ -358,7 +373,11 @@ |
359 | 374 | $j("#firefoggProgressbar .ui-progressbar-value").css('width', Math.round( progress * 10000 ) / 100 + '%'); |
360 | 375 | }, |
361 | 376 | 'doneRenderCallback': function( fogg ){ |
362 | | - _this.uploadRenderedVideo( $dialog, fogg ); |
| 377 | + if( localFile ){ |
| 378 | + $dialog.html( gM('mwe-sequencer-save_done') ); |
| 379 | + } else { |
| 380 | + _this.uploadRenderedVideo( $dialog, fogg ); |
| 381 | + } |
363 | 382 | } |
364 | 383 | }); |
365 | 384 | var buttons = {}; |
— | — | @@ -368,7 +387,10 @@ |
369 | 388 | } |
370 | 389 | // Add cancel button |
371 | 390 | $dialog.dialog( "option", "buttons", buttons ); |
372 | | - foggRender.doRender(); |
| 391 | + if( !foggRender.doRender() ){ |
| 392 | + // do render returns false on firefox gui cancel close the dialog: |
| 393 | + $dialog.dialog("close"); |
| 394 | + } |
373 | 395 | }); |
374 | 396 | }, |
375 | 397 | |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | }, |
32 | 32 | 'duration':{ |
33 | 33 | 'editableAttributes' : [ 'dur' ], |
34 | | - 'contentTypes': ['img', 'mwtemplate'] |
| 34 | + 'contentTypes': ['img', 'cdata_html', 'mwtemplate'] |
35 | 35 | }, |
36 | 36 | 'panzoom' : { |
37 | 37 | 'editWidgets' : ['panzoom'], |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerMenu.js |
— | — | @@ -43,16 +43,24 @@ |
44 | 44 | _this.sequencer.getActionsSequence().save(); |
45 | 45 | } |
46 | 46 | }, |
47 | | - /*'renderdisk' : { |
| 47 | + 'renderdisk' : { |
48 | 48 | 'icon' : 'gear', |
49 | 49 | 'action' : function( _this ){ |
50 | | - _this.sequencer.getRender().renderDialog(); |
| 50 | + _this.sequencer.getActionsSequence().renderToDisk(); |
| 51 | + }, |
| 52 | + 'condition': function( _this ){ |
| 53 | + // Only display if no server is defined: |
| 54 | + return !( _this.sequencer.getServer().isConfigured() ) |
51 | 55 | } |
52 | | - },*/ |
| 56 | + }, |
53 | 57 | 'publish': { |
54 | 58 | 'icon' : 'gear', |
55 | 59 | 'action' : function( _this ){ |
56 | 60 | _this.sequencer.getActionsSequence().publish(); |
| 61 | + }, |
| 62 | + 'condition': function( _this ){ |
| 63 | + // Only display if publishing server is present |
| 64 | + return ( _this.sequencer.getServer().isConfigured() ) |
57 | 65 | } |
58 | 66 | }, |
59 | 67 | 'exit_divider': 'divider', |
— | — | @@ -120,7 +128,7 @@ |
121 | 129 | $menuTarget.empty().disableSelection(); |
122 | 130 | |
123 | 131 | for( var menuKey in this.menuConfig ){ |
124 | | - // Create a function to preserve menuKey binding scope |
| 132 | + // Create a closure to preserve menuKey binding scope |
125 | 133 | function drawTopMenu( menuKey ){ |
126 | 134 | // Add the menu target |
127 | 135 | $menuTarget |
— | — | @@ -147,12 +155,14 @@ |
148 | 156 | } |
149 | 157 | drawTopMenu( menuKey ); |
150 | 158 | } |
| 159 | + |
151 | 160 | // Add any menuWidgets |
152 | 161 | for( var widgetKey in this.menuWidgets ){ |
153 | 162 | $menuTarget.append( |
154 | 163 | this.menuWidgets[widgetKey]( this ) |
155 | 164 | ); |
156 | 165 | } |
| 166 | + |
157 | 167 | // Append close button to the upper right |
158 | 168 | $menuTarget.append( |
159 | 169 | $j.button({ |
— | — | @@ -227,12 +237,22 @@ |
228 | 238 | $j('<li />') |
229 | 239 | .addClass('divider') |
230 | 240 | .append( $j('<hr />').css('width', '80%') ) |
231 | | - ); |
232 | | - } else { |
233 | | - $menu.append( |
234 | | - _this.getMenuItem( menuKey, menuItemKey ) |
235 | | - ) |
| 241 | + ); |
| 242 | + continue; |
| 243 | + } |
| 244 | + |
| 245 | + // Check if we have a conditional include |
| 246 | + if( menuItem.condition && |
| 247 | + typeof menuItem.condition == 'function' && |
| 248 | + !menuItem.condition( _this ) |
| 249 | + ){ |
| 250 | + continue; |
236 | 251 | } |
| 252 | + |
| 253 | + // Do a normal menu item include: |
| 254 | + $menu.append( |
| 255 | + _this.getMenuItem( menuKey, menuItemKey ) |
| 256 | + ) |
237 | 257 | } |
238 | 258 | return $menu; |
239 | 259 | }, |
Index: branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.core.js |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | // $.ui.plugin is deprecated. Use the proxy pattern instead. |
26 | 26 | plugin: { |
27 | 27 | add: function( module, option, set ) { |
28 | | - var proto = $.ui[ module ].prototype; |
| 28 | + var proto = $.ui[ module ].prototype; |
29 | 29 | for ( var i in set ) { |
30 | 30 | proto.plugins[ i ] = proto.plugins[ i ] || []; |
31 | 31 | proto.plugins[ i ].push( [ option, set[ i ] ] ); |
Index: branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.tabs.js |
— | — | @@ -603,7 +603,7 @@ |
604 | 604 | return this; |
605 | 605 | }, |
606 | 606 | |
607 | | - load: function( index ) { |
| 607 | + load: function( index ) { |
608 | 608 | index = this._getIndex( index ); |
609 | 609 | var self = this, |
610 | 610 | o = this.options, |
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | */ |
6 | 6 | var urlparts = getRemoteEmbedPath(); |
7 | 7 | var mwEmbedHostPath = urlparts[0]; |
8 | | -var mwRemoteVersion = 'r143'; |
| 8 | +var mwRemoteVersion = 'r144'; |
9 | 9 | var mwUseScriptLoader = true; |
10 | 10 | |
11 | 11 | // Log the mwRemote version makes it easy to debug cache issues |
— | — | @@ -35,6 +35,8 @@ |
36 | 36 | mwUseScriptLoader = false; |
37 | 37 | } |
38 | 38 | |
| 39 | +//mwReqParam['debug'] =false; |
| 40 | +//mwUseScriptLoader = true; |
39 | 41 | |
40 | 42 | // Setup up some globals to wrap mwEmbed mw.ready and mw.setConfig functions |
41 | 43 | |