r55321 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55320‎ | r55321 | r55322 >
Date:11:58, 19 August 2009
Author:dale
Status:deferred
Tags:
Comment:
* don't wrap video player container if already in DOM
Modified paths:
  • /trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js
@@ -350,7 +350,7 @@
351351 $tp.find('.k-options').click(function(){
352352 if($j('#' + embedObj.id + ' .k-menu').length == 0 )
353353 addMvOptions();
354 -
 354+ //set up the text and menu:
355355 var $ktxt = $j(this).find('.ui-icon-k-menu');
356356 var $kmenu = $tp.find('.k-menu');
357357 if( $kmenu.is(':visible') ){
@@ -639,8 +639,8 @@
640640 }
641641 }
642642 //string -> boolean:
643 - if(embed_video[method]=="false")embed_video[method]=false;
644 - if(embed_video[method]=="true")embed_video[method]=true;
 643+ if( embed_video[method] == "false") embed_video[method] = false;
 644+ if( embed_video[method] == "true") embed_video[method] = true;
645645 }
646646 ///js_log('did vI style');
647647 //now swap out the video element for the embed_video obj:
@@ -1757,8 +1757,10 @@
17581758 html_code += this.getControlsHTML();
17591759 html_code +='</div>';
17601760 //block out some space by encapulating the top level div
1761 - $j(this).wrap('<div style="width:'+parseInt(this.width)+'px;height:'
 1761+ if($j(this).parents('.k-player').length==0){
 1762+ $j(this).wrap('<div style="width:'+parseInt(this.width)+'px;height:'
17621763 + (parseInt(this.height) + ctrlBuilder.height )+'px" id="k-player_' + this.id + '" class="k-player ui-widget"></div>');
 1764+ }
17631765 }
17641766
17651767 //js_log('should set: '+this.id);

Status & tagging log