http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72515
Revision: 72515
Author: dale
Date: 2010-09-07 03:25:46 +0000 (Tue, 07 Sep 2010)
Log Message:
-----------
fix for local sequences
* added render to disk option
* hide publish option when no server is configured
Modified Paths:
--------------
branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.core.js
branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.tabs.js
branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js
branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerMenu.js
branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js
branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js
branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js
branches/MwEmbedStandAlone/remotes/mediaWiki.js
Modified:
branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.core.js
===================================================================
--- branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.core.js
2010-09-07 03:11:50 UTC (rev 72514)
+++ branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.core.js
2010-09-07 03:25:46 UTC (rev 72515)
@@ -24,7 +24,7 @@
// $.ui.plugin is deprecated. Use the proxy pattern instead.
plugin: {
add: function( module, option, set ) {
- var proto = $.ui[ module ].prototype;
+ var proto = $.ui[ module ].prototype;
for ( var i in set ) {
proto.plugins[ i ] = proto.plugins[ i ] || [];
proto.plugins[ i ].push( [ option, set[ i ] ] );
Modified:
branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.tabs.js
===================================================================
--- branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.tabs.js
2010-09-07 03:11:50 UTC (rev 72514)
+++ branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.tabs.js
2010-09-07 03:25:46 UTC (rev 72515)
@@ -603,7 +603,7 @@
return this;
},
- load: function( index ) {
+ load: function( index ) {
index = this._getIndex( index );
var self = this,
o = this.options,
Modified: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
===================================================================
--- branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
2010-09-07 03:11:50 UTC (rev 72514)
+++ branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
2010-09-07 03:25:46 UTC (rev 72515)
@@ -3022,7 +3022,7 @@
// update the mute state from the player element
if( _this.muted != _this.getPlayerElementMuted() ){
- mw.log("monitor:: muted does not mach embed player" );
+ mw.log("monitor:: muted does not match embed player" );
_this.toggleMute();
// Make sure they match:
_this.muted = _this.getPlayerElementMuted();
@@ -3083,7 +3083,7 @@
}, this.monitorRate )
}
} else {
- mw.log("EmbedPlayer::monitor: player is stoped, stop
monitor")
+ //mw.log("EmbedPlayer::monitor: player is stoped, stop
monitor")
// If stopped "stop" monitor:
clearInterval( this.monitorInterval );
}
Modified:
branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js
===================================================================
---
branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js
2010-09-07 03:11:50 UTC (rev 72514)
+++
branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js
2010-09-07 03:25:46 UTC (rev 72515)
@@ -240,6 +240,22 @@
// give the input focus
.find('input').focus()
},
+ renderToDisk: function(){
+ var _this = this;
+ // add a loading dialog
+ var $dialog = mw.addDialog({
+ 'resizable':'true',
+ 'title' :
gM('mwe-sequencer-menu-sequence-publish-desc'),
+ 'content' : gM('mwe-sequencer-loading-publish-render'),
+ 'width' : 450,
+ 'height' : 470,
+ 'draggable' : false,
+ 'resizable' : false
+ });
+ mw.load( ['AddMedia.firefogg','FirefoggRender'], function(){
+ _this.doPublish( $dialog, true );
+ });
+ },
/**
* Display the publish dialog
* ( confirm the user has firefogg and rights to save a new version of
the file )
@@ -252,7 +268,9 @@
'title' :
gM('mwe-sequencer-menu-sequence-publish-desc'),
'content' : gM('mwe-sequencer-loading-publish-render'),
'width' : 450,
- 'height' : 470
+ 'height' : 470,
+ 'draggable' : false,
+ 'resizable' : false
});
// Check if we have unsaved changes ( don't publish unsaved
changes )
@@ -287,11 +305,8 @@
}
});
},
- doPublish: function( $dialog ){
+ doPublish: function( $dialog, localFile ){
var _this = this;
- // disable drag and resize
- $dialog.dialog("option", "draggable", false )
- $dialog.dialog( "option", "resizable", false );
// Get a Firefogg object to check if firefogg is installed
var myFogg = new mw.Firefogg( {
@@ -344,7 +359,7 @@
// Start up the render
var foggRender =
$j('#publishVideoTarget').firefoggRender({
'statusTarget' : '#firefoggStatusTarget',
- 'saveToLocalFile' : false,
+ 'saveToLocalFile' : localFile,
'onProgress' : function( progress ){
var progressPrecent = ( Math.round(
progress * 10000 ) / 100 );
$j('#firefoggPercentDone').text(
@@ -358,7 +373,11 @@
$j("#firefoggProgressbar
.ui-progressbar-value").css('width', Math.round( progress * 10000 ) / 100 +
'%');
},
'doneRenderCallback': function( fogg ){
- _this.uploadRenderedVideo( $dialog,
fogg );
+ if( localFile ){
+ $dialog.html(
gM('mwe-sequencer-save_done') );
+ } else {
+ _this.uploadRenderedVideo(
$dialog, fogg );
+ }
}
});
var buttons = {};
@@ -368,7 +387,10 @@
}
// Add cancel button
$dialog.dialog( "option", "buttons", buttons );
- foggRender.doRender();
+ if( !foggRender.doRender() ){
+ // do render returns false on firefox gui
cancel close the dialog:
+ $dialog.dialog("close");
+ }
});
},
Modified: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerMenu.js
===================================================================
--- branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerMenu.js
2010-09-07 03:11:50 UTC (rev 72514)
+++ branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerMenu.js
2010-09-07 03:25:46 UTC (rev 72515)
@@ -43,16 +43,24 @@
_this.sequencer.getActionsSequence().save();
}
},
- /*'renderdisk' : {
+ 'renderdisk' : {
'icon' : 'gear',
'action' : function( _this ){
-
_this.sequencer.getRender().renderDialog();
+
_this.sequencer.getActionsSequence().renderToDisk();
+ },
+ 'condition': function( _this ){
+ // Only display if no server is defined:
+ return !(
_this.sequencer.getServer().isConfigured() )
}
- },*/
+ },
'publish': {
'icon' : 'gear',
'action' : function( _this ){
_this.sequencer.getActionsSequence().publish();
+ },
+ 'condition': function( _this ){
+ // Only display if publishing server is
present
+ return (
_this.sequencer.getServer().isConfigured() )
}
},
'exit_divider': 'divider',
@@ -120,7 +128,7 @@
$menuTarget.empty().disableSelection();
for( var menuKey in this.menuConfig ){
- // Create a function to preserve menuKey binding scope
+ // Create a closure to preserve menuKey binding scope
function drawTopMenu( menuKey ){
// Add the menu target
$menuTarget
@@ -147,12 +155,14 @@
}
drawTopMenu( menuKey );
}
+
// Add any menuWidgets
for( var widgetKey in this.menuWidgets ){
$menuTarget.append(
this.menuWidgets[widgetKey]( this )
);
}
+
// Append close button to the upper right
$menuTarget.append(
$j.button({
@@ -227,12 +237,22 @@
$j('<li />')
.addClass('divider')
.append( $j('<hr />').css('width',
'80%') )
- );
- } else {
- $menu.append(
- _this.getMenuItem( menuKey, menuItemKey
)
- )
+ );
+ continue;
+ }
+
+ // Check if we have a conditional include
+ if( menuItem.condition &&
+ typeof menuItem.condition == 'function' &&
+ !menuItem.condition( _this )
+ ){
+ continue;
}
+
+ // Do a normal menu item include:
+ $menu.append(
+ _this.getMenuItem( menuKey, menuItemKey )
+ )
}
return $menu;
},
Modified: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js
===================================================================
--- branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js
2010-09-07 03:11:50 UTC (rev 72514)
+++ branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js
2010-09-07 03:25:46 UTC (rev 72515)
@@ -30,7 +30,7 @@
},
'duration':{
'editableAttributes' : [ 'dur' ],
- 'contentTypes': ['img', 'mwtemplate']
+ 'contentTypes': ['img', 'cdata_html', 'mwtemplate']
},
'panzoom' : {
'editWidgets' : ['panzoom'],
Modified: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
===================================================================
--- branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
2010-09-07 03:11:50 UTC (rev 72514)
+++ branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
2010-09-07 03:25:46 UTC (rev 72515)
@@ -65,7 +65,7 @@
},
/**
- * set the virtual smil volume ( will key all underling assets against
this volume )
+ * Set the virtual smil volume ( will key all underling assets against
this volume )
* ( we can't presently "normalize" across clips )
*/
setPlayerElementVolume: function( percent ){
Modified: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js
===================================================================
--- branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js
2010-09-07 03:11:50 UTC (rev 72514)
+++ branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js
2010-09-07 03:25:46 UTC (rev 72515)
@@ -83,7 +83,7 @@
*/
renderTime: function( time, deltaTime ){
var _this = this;
- mw.log( "SmilBody::renderTime:: " + time + ' delta: '+
deltaTime);
+ //mw.log( "SmilBody::renderTime:: " + time + ' delta: '+
deltaTime);
// Get all the draw elements from the body this time:
this.getElementsForTime( time ,
Modified: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js
===================================================================
--- branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js
2010-09-07 03:11:50 UTC (rev 72514)
+++ branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js
2010-09-07 03:25:46 UTC (rev 72515)
@@ -682,6 +682,7 @@
// xxx height domination here may be confused refactor this
check
if( natrualAspect >= targetAspect ){
transformCss.width = parseFloat( transformPercent ) +
'%';
+ transformCss.height = null;
/*transformCss.height = ( parseFloat( transformPercent
) * (
( natrualSize.height /
natrualSize.width ) /
( targetSize.height /
targetSize.width )
@@ -692,6 +693,7 @@
// Fit vertically
if(! transformCss.height || natrualAspect < targetAspect ){
transformCss.height = parseFloat( transformPercent ) +
'%';
+ transformCss.width = null;
/*transformCss.width = ( parseFloat( transformPercent )
*
( natrualSize.height /
natrualSize.width ) /
( targetSize.width / targetSize.height )
Modified: branches/MwEmbedStandAlone/remotes/mediaWiki.js
===================================================================
--- branches/MwEmbedStandAlone/remotes/mediaWiki.js 2010-09-07 03:11:50 UTC
(rev 72514)
+++ branches/MwEmbedStandAlone/remotes/mediaWiki.js 2010-09-07 03:25:46 UTC
(rev 72515)
@@ -4,7 +4,7 @@
*/
var urlparts = getRemoteEmbedPath();
var mwEmbedHostPath = urlparts[0];
-var mwRemoteVersion = 'r143';
+var mwRemoteVersion = 'r144';
var mwUseScriptLoader = true;
// Log the mwRemote version makes it easy to debug cache issues
@@ -35,6 +35,8 @@
mwUseScriptLoader = false;
}
+//mwReqParam['debug'] =false;
+//mwUseScriptLoader = true;
// Setup up some globals to wrap mwEmbed mw.ready and mw.setConfig functions
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs