r62964 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62963‎ | r62964 | r62965 >
Date:17:08, 25 February 2010
Author:dale
Status:deferred
Tags:
Comment:
* fixed java on firefox ( by commenting out iframe usage)
* removed refrence to old language path
Modified paths:
  • /branches/js2-work/phase3/js/apiProxyPage.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/includes/jsClassLoader.php (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/loader.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/javaEmbed.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/TimedText/jquery.menu/jquery.menu.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/tests/Player_Timed_Text.html (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/loader.js
@@ -78,7 +78,7 @@
7979 //If we are in debug mode ( results in fresh debug javascript includes )
8080 'debug' : false,
8181
82 - // Valid language codes ( has a file in /includes/languages/classes/Language{code}.js )
 82+ // Valid language codes ( has a file in /languages/classes/Language{code}.js )
8383 // TODO: mirror the mediaWiki language "fallback" system
8484 'languageCodeList': ['en', 'am', 'ar', 'bat_smg', 'be_tarak', 'be', 'bh',
8585 'bs', 'cs', 'cu', 'cy', 'dsb', 'fr', 'ga', 'gd', 'gv', 'he', 'hi',
Index: branches/js2-work/phase3/js/mwEmbed/tests/Player_Timed_Text.html
@@ -34,7 +34,7 @@
3535 </td>
3636 </tr>
3737
38 - <!--
 38+
3939 <tr>
4040 <td valign="top" width="410">
4141
@@ -42,7 +42,7 @@
4343 poster="http://www.annodex.net/~silvia/itext/elephants_dream/elephant.png"
4444 duration="10:53"
4545 linkback="http://www.annodex.net/~silvia/itext/elephant_no_skin_v2.html" >
46 - <source type="video/ogg" src="http://www.archive.org/download/ElephantsDream/ed_hd.ogv" ></source>
 46+ <source type="video/ogg" src="http://upload.wikimedia.org/wikipedia/commons/8/83/Elephants_Dream_%28high_quality%29.ogv" ></source>
4747 <source type="video/h264" src="http://www.archive.org/download/ElephantsDream/ed_1024_512kb.mp4"></source>
4848 <itextlist category="SUB" name="Subtitles A-F">
4949 <itext id="video_af" lang="af" charset="ISO-8859-1"
@@ -124,9 +124,10 @@
125125 <itext id="chapters" lang="en" charset="ISO-8859-1"
126126 src="media/elephants_dream/chapters.srt"></itext>
127127 </itextlist>
128 -
 128+
129129 </video>
130130 </td>
 131+
131132 <td valign="top">
132133 <h4>iText inline embed example</h4>
133134 see: <a href="http://www.annodex.net/~silvia/itext/elephant_no_skin_v2.html">Video Player Accessibility</a>
@@ -224,7 +225,7 @@
225226 </textarea>
226227 </td>
227228 </tr>
228 - -->
 229+
229230 <!--
230231
231232
Index: branches/js2-work/phase3/js/mwEmbed/includes/jsClassLoader.php
@@ -109,7 +109,7 @@
110110 */
111111 public static function getLanguageJs( $langKey = 'en' ){
112112 global $wgMwEmbedDirectory;
113 - $path = $wgMwEmbedDirectory . 'includes/languages/classes/Language' . ucfirst( $langKey ) . '.js';
 113+ $path = $wgMwEmbedDirectory . 'languages/classes/Language' . ucfirst( $langKey ) . '.js';
114114 if( is_file( $path ) ){
115115 $languageJs = file_get_contents( $path );
116116 return $languageJs;
Index: branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js
@@ -114,7 +114,7 @@
115115 } else {
116116 // Add some space to interface for the control bar ( if not overlaying controls )
117117 embedPlayer.$interface.css( {
118 - 'height' : parseInt( embedPlayer.height ) + parseInt( this.height ) +2
 118+ 'height' : parseInt( embedPlayer.height ) + parseInt( this.height ) + 2
119119 } );
120120 // update the control bar display to "block"
121121 $controlBar.css('display', 'block')
Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/jquery.menu/jquery.menu.js
@@ -173,7 +173,9 @@
174174 this.showMenu = function() {
175175 mw.log('$j.menu:: show menu' );
176176 killAllMenus();
177 - if (!menu.menuExists) { menu.create() };
 177+ if (!menu.menuExists) {
 178+ menu.create()
 179+ };
178180 caller
179181 .addClass('fg-menu-open')
180182 .addClass(options.callerOnState);
@@ -313,8 +315,8 @@
314316 },
315317 function() { $(this).removeClass(options.linkHoverSecondary); }
316318 );
317 - };
318 -
 319+ };
 320+
319321 menu.setPosition(container, caller, options);
320322 menu.menuExists = true;
321323 };
Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js
@@ -784,23 +784,30 @@
785785 // Setup the display text div:
786786 var layoutMode = this.getLayoutMode();
787787 if( layoutMode == 'ontop' ) {
788 - $playerTarget.append(
789 - $j('<div>').addClass( 'itext' + ' ' + 'itext_' + category )
790 - .css( {
791 - 'position':'absolute',
792 - 'bottom': ( this.embedPlayer.ctrlBuilder.getHeight() + 10 ),
793 - 'width': '100%',
794 - 'display': 'block',
795 - 'opacity': .8,
796 - 'text-align':'center'
797 - }).append(
798 - $j('<span>').css({
799 - 'color':'white',
800 - 'background-color':'#333'
801 - })
802 - )
803 - );
 788+ var $itext = $j('<div>')
 789+ .addClass( 'itext' + ' ' + 'itext_' + category )
 790+ .css( {
 791+ 'position':'absolute',
 792+ 'bottom': ( this.embedPlayer.ctrlBuilder.getHeight() + 10 ),
 793+ 'width': '100%',
 794+ 'display': 'block',
 795+ 'opacity': .8,
 796+ 'text-align':'center'
 797+ })
 798+ .append(
 799+ $j('<span>').css({
 800+ 'color':'white',
 801+ 'background-color':'#333'
 802+ })
 803+ )
804804
 805+ // If in fullscreen mode update the text size:
 806+ if( this.embedPlayer.ctrlBuilder.fullscreenMode ){
 807+ $itext.css(
 808+ this.embedPlayer.ctrlBuilder.getFullscreenTextCss()
 809+ );
 810+ }
 811+ $playerTarget.append( $itext );
805812 // Resize the interface for layoutMode == 'ontop' ( if not in fullscreen )
806813 // NOTE this shoudl be a call to ctrlBuilder not handled here inline
807814 if( ! this.embedPlayer.ctrlBuilder.fullscreenMode ){
@@ -833,8 +840,8 @@
834841 } )
835842 )
836843 );
837 - //
838 - var height = belowBarHeight + this.embedPlayer.getHeight() + this.embedPlayer.ctrlBuilder.getHeight();
 844+ // Add some height for the bar and interface
 845+ var height = ( belowBarHeight + 8 ) + this.embedPlayer.getHeight() + this.embedPlayer.ctrlBuilder.getHeight();
839846 // Resize the interface for layoutMode == 'below' ( if not in full screen)
840847 if( ! this.embedPlayer.ctrlBuilder.fullscreenMode ){
841848 this.embedPlayer.$interface.animate({
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/javaEmbed.js
@@ -53,7 +53,7 @@
5454
5555 // Wrap it in an iframe to avoid hanging the event thread in FF 2/3 and similar
5656 // Doesn't work in MSIE or Safari/Mac or Opera 9.5
57 - if ( $j.browser.mozilla ) {
 57+ /*if ( $j.browser.mozilla ) {
5858 var iframe = document.createElement( 'iframe' );
5959 iframe.setAttribute( 'width', this.getWidth() );
6060 iframe.setAttribute( 'height', this.getHeight() );
@@ -72,9 +72,9 @@
7373 newDoc.write( '<html><body>' + appletCode + '</body></html>' );
7474 // spurious error in some versions of FF, no workaround known
7575 newDoc.close();
76 - } else {
 76+ } else {*/
7777 $j( this ).html( appletCode );
78 - }
 78+ //}
7979
8080 // Start the monitor:
8181 this.monitor();
@@ -174,11 +174,11 @@
175175 * Update the playerElement instance with a pointer to the embed object
176176 */
177177 getPlayerElement:function() {
178 - if ( $j.browser.mozilla ) {
179 - this.playerElement = $j('#cframe_' + this.id).contents().find( '#' + this.pid );
180 - } else {
 178+ //if ( $j.browser.mozilla ) {
 179+ // this.playerElement = $j('#cframe_' + this.id).contents().find( '#' + this.pid );
 180+ //} else {
181181 this.playerElement = $j( '#' + this.pid ).get( 0 );
182 - }
 182+ //}
183183 },
184184
185185 /**
Index: branches/js2-work/phase3/js/apiProxyPage.js
@@ -19,16 +19,15 @@
2020 var mwApiProxyDefaultConfig = {
2121 'master_whitelist' : [ 'en.wikipedia.org', 'localhost', '127.1.1.100' ],
2222 'master_blacklist' : []
23 -};
 23+};
2424
25 -
2625 // User white_list should also be checked and configured at runtime.
2726 mw.ready( function() {
2827 // Build our configuration from the default and mwApiProxyConfig vars
2928 mwApiProxyConfig = $j.extend( true, mwApiProxyDefaultConfig, mwApiProxyConfig );
3029 mw.setConfig( 'apiProxyConfig', mwApiProxyConfig);
3130
32 - //Do a setTimeout to 0 to call after other zero delay async events
 31+ // Do a setTimeout to 0 to call after other zero delay async events
3332 // ( once everyone is doing buildout withthin mwsetup priror to .ready this won't be needed. )
3433 mw.load( 'ApiProxy', function(){
3534 //Clear out the page content ( not needed for iframe proxy )

Status & tagging log