Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/loader.js |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | //Setup the addMediaWizard module |
35 | 35 | mw.addModuleLoader( 'AddMedia.addMediaWizard', function( callback ){ |
36 | 36 | // Load all the required libs: |
37 | | - var libReq = [ |
| 37 | + var request = [ |
38 | 38 | [ 'mw.RemoteSearchDriver', |
39 | 39 | '$j.cookie', |
40 | 40 | '$j.fn.textSelection', |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | '$j.ui.sortable' |
49 | 49 | ] |
50 | 50 | ]; |
51 | | - mw.load( libReq , function() { |
| 51 | + mw.load( request , function() { |
52 | 52 | callback( 'AddMedia.addMediaWizard' ); |
53 | 53 | } ); |
54 | 54 | }); |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js |
— | — | @@ -1887,22 +1887,23 @@ |
1888 | 1888 | } |
1889 | 1889 | ); |
1890 | 1890 | mw.log( 'append html: ' + embedHtml ); |
1891 | | - $j( '#clip_edit_disp' ).html( embedHtml ); |
| 1891 | + $j( '#clip_edit_disp' ).html( embedHtml ); |
1892 | 1892 | |
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 | | - |
1904 | 1893 | mw.log( "about to call $j.embedPlayer::embed_vid" ); |
1905 | 1894 | // Rewrite by id |
1906 | 1895 | $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 | + } |
1907 | 1908 | |
1908 | 1909 | // Grab information available from the embed instance |
1909 | 1910 | resource.pSobj.addEmbedInfo( resource, 'embed_vid' ); |