r73646 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73645‎ | r73646 | r73647 >
Date:21:39, 23 September 2010
Author:dale
Status:deferred
Tags:
Comment:
fixed size of pop-up videos in gallery / categories
Modified paths:
  • /branches/MwEmbedStandAlone/remotes/mediaWiki.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js
@@ -4,7 +4,7 @@
55 */
66 var urlparts = getRemoteEmbedPath();
77 var mwEmbedHostPath = urlparts[0];
8 -var mwRemoteVersion = 'r151';
 8+var mwRemoteVersion = 'r152';
99 var mwUseScriptLoader = true;
1010
1111 // Log the mwRemote version makes it easy to debug cache issues
@@ -397,11 +397,11 @@
398398
399399 // If in a gallery box or filehistory we will be displaying the video larger in a lightbox
400400 if( $j( '#' + vidId ).parents( '.gallerybox,.filehistory' ).length ){
401 - // Update the width to 420 and keep scale
402401 pwidth = 400;
 402+ // Update the width to 400 and keep scale
403403 if( pheight != 0 ) {
404 - pheight = pwidth * ( $j( '#' + vidId ).height() / $j( '#' + vidId ).width() );
405 - }
 404+ pheight = pwidth * ( $j( '#' + vidId + ' img' ).height() / $j( '#' + vidId + ' img' ).width() );
 405+ }
406406 }
407407
408408 if ( src ) {
@@ -459,10 +459,9 @@
460460 .addClass( 'play-btn-large' )
461461 .buttonHover()
462462 .click( function(){
463 - var _this = this;
464 -
 463+ var _this = this;
465464 var dialogHeight = ( pheight == 0 )? 175 :
466 - ( pheight + 30 );
 465+ ( pheight + 130 );
467466 var buttons = {};
468467 buttons[ gM( 'mwe-ok' ) ] = function(){
469468 var embedPlayer = $j( '#mwe_' + $j( _this ).data( 'playerId' ) ).get(0);
@@ -482,9 +481,8 @@
483482 })
484483
485484 // Update the embed code to use the mwEmbed player:
486 - $j( '#mwe_' + vidId ).embedPlayer( function(){
487 - var embedPlayer = $j( '#mwe_' + vidId ).get(0);
488 - embedPlayer.play();
 485+ $j( '#mwe_' + vidId ).embedPlayer( { 'autoplay' : true }, function(){
 486+ var embedPlayer = $j( '#mwe_' + vidId ).get(0);
489487 // Show the control bar for two seconds (auto play is confusing without it )
490488 embedPlayer.controlBuilder.showControlBar();
491489 // hide the controls if they should they are overlayed on the video

Status & tagging log