r61485 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61484‎ | r61485 | r61486 >
Date:10:05, 25 January 2010
Author:dale
Status:deferred
Tags:
Comment:
* fixed the extra space for audio clips
Modified paths:
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/loader.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/loader.js
@@ -33,7 +33,7 @@
3434 //Setup the addMediaWizard module
3535 mw.addModuleLoader( 'AddMedia.addMediaWizard', function( callback ){
3636 // Load all the required libs:
37 - var libReq = [
 37+ var request = [
3838 [ 'mw.RemoteSearchDriver',
3939 '$j.cookie',
4040 '$j.fn.textSelection',
@@ -47,7 +47,7 @@
4848 '$j.ui.sortable'
4949 ]
5050 ];
51 - mw.load( libReq , function() {
 51+ mw.load( request , function() {
5252 callback( 'AddMedia.addMediaWizard' );
5353 } );
5454 });
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js
@@ -1887,22 +1887,23 @@
18881888 }
18891889 );
18901890 mw.log( 'append html: ' + embedHtml );
1891 - $j( '#clip_edit_disp' ).html( embedHtml );
 1891+ $j( '#clip_edit_disp' ).html( embedHtml );
18921892
1893 - // Add extra space at the top if the resource is 'audio' bug 22189
1894 - if( _this.getMediaType( resource ) == 'audio' ){
1895 - $j( '#clip_edit_disp' ).prepend(
1896 - $j( '<span />' )
1897 - .css({
1898 - 'height': '90px',
1899 - 'display': 'block'
1900 - })
1901 - );
1902 - }
1903 -
19041893 mw.log( "about to call $j.embedPlayer::embed_vid" );
19051894 // Rewrite by id
19061895 $j( '#embed_vid').embedPlayer ( function() {
 1896+
 1897+ // Add extra space at the top if the embed player is less than 90px high
 1898+ // bug 22189
 1899+ if( $j('#embed_vid').get(0).getPlayerHeight() < 90 ){
 1900+ $j( '#clip_edit_disp' ).prepend(
 1901+ $j( '<span />' )
 1902+ .css({
 1903+ 'height': '90px',
 1904+ 'display': 'block'
 1905+ })
 1906+ );
 1907+ }
19071908
19081909 // Grab information available from the embed instance
19091910 resource.pSobj.addEmbedInfo( resource, 'embed_vid' );

Status & tagging log