r63802 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63801‎ | r63802 | r63803 >
Date:05:13, 16 March 2010
Author:dale
Status:deferred
Tags:
Comment:
* removed other noConflict call
Modified paths:
  • /branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/javaEmbed.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/loader.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/mwEmbed.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js
@@ -567,20 +567,27 @@
568568 * Hide the control bar.
569569 */
570570 hideControlBar : function(){
 571+ var animateDuration = 'slow'
571572 // Else hide the control bar ( if checkOverlayControls is still true )
572 - this.embedPlayer.$interface.find( '.control-bar').fadeOut( 'slow' );
573 - // Move down itext if present
574 - $j( '.itext' ).animate( {'bottom' : 10 } );
 573+ this.embedPlayer.$interface.find( '.control-bar').fadeOut( animateDuration );
 574+ this.embedPlayer.$interface.find( '.itext' ).animate( {
 575+ 'bottom' : 10
 576+ }, animateDuration );
 577+
575578 },
576579
577580 /**
578581 * Show the control bar
579582 */
580583 showControlBar : function(){
 584+ var animateDuration = 'slow'
581585 // Show controls
582 - this.embedPlayer.$interface.find( '.control-bar').fadeIn( 'slow' );
 586+ this.embedPlayer.$interface.find( '.control-bar').fadeIn( animateDuration );
583587 // Move up itext if present
584 - $j( '.itext' ).animate( { 'bottom' : this.getHeight() + 10 } );
 588+ this.embedPlayer.$interface.find( '.itext' ).animate( {
 589+ 'bottom' : this.getHeight() + 10
 590+ }, animateDuration );
 591+
585592 },
586593
587594 /**
Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js
@@ -1244,8 +1244,8 @@
12451245 'prop':'revisions'
12461246 };
12471247 mw.getJSON( this.apiUrl, request, function( sourcePages ) {
1248 - //If "timedText" is not a valid namespace try "just" with prefix:
1249 - if ( sourcePages.error && sourcePages.error.code == 'apunknown_apnamespace' ) {
 1248+ // If "timedText" is not a valid namespace try "just" with prefix:
 1249+ if ( sourcePages.error && sourcePages.error.code == 'apunknown_apnamespace' ) {
12501250 var request = {
12511251 'list' : 'allpages',
12521252 'apprefix' : _this.getCanonicalTimedTextNS() + ':' + _this.embedPlayer.apiTitleKey
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/loader.js
@@ -64,8 +64,6 @@
6565 *
6666 * NOTE: this function can be part of setup can run prior to jQuery being ready
6767 */
68 -
69 -
7068 mw.documentHasPlayerTags = function() {
7169 var rewriteTags = mw.getConfig( 'rewritePlayerTags' );
7270 if( rewriteTags ) {
@@ -100,8 +98,6 @@
10199
102100 // Tell mwEmbed to run setup
103101 mw.setConfig( 'runSetupMwEmbed', true );
104 -
105 - mw.log(" run setup is: " + mw.getConfig( 'runSetupMwEmbed' ) );
106102 }
107103 });
108104
@@ -129,9 +125,6 @@
130126 '$j.ui.slider'
131127 ]
132128 ];
133 -
134 -
135 -
136129
137130 var addTimedTextReqFlag = false;
138131
@@ -177,14 +170,14 @@
178171 }
179172
180173 // Add PNG fix code needed:
181 - if ( $j.browser.msie || $j.browser.version < 7 ) {
 174+ if ( $j.browser.msie && $j.browser.version < 7 ) {
182175 dependencyRequest[0].push( '$j.fn.pngFix' );
183176 }
184177
185178 // Do short detection, to avoid extra player library request in ~most~ cases.
186179 //( If browser is firefox include native, if browser is IE include java )
187180 if( $j.browser.msie ) {
188 - dependencyRequest[0].push( 'javaEmbed' )
 181+ dependencyRequest[0].push( 'javaEmbed' )
189182 }
190183
191184 // Safari gets slower load since we have to detect ogg support
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/javaEmbed.js
@@ -7,8 +7,8 @@
88
99 var javaEmbed = {
1010
11 - // instance name:
12 - instanceOf:'javaEmbed',
 11+ // Instance name:
 12+ instanceOf: 'javaEmbed',
1313
1414 // Supported feature set of the cortado applet:
1515 supports: {
Index: branches/js2-work/phase3/js/mwEmbed/mwEmbed.js
@@ -2901,7 +2901,10 @@
29022902 mwCheckBody();
29032903 }, 250);
29042904
2905 -// If window.jQuery is already avaliable set no conflict before setup
 2905+// If window.jQuery is already avaliable set mapping before setup
 2906+// ( we don't use noConflict since other pages that include
 2907+// mwEmbed may depend on $ = jQuery, with a simple
 2908+// alias we should be fine
29062909 if( window.jQuery ){
2907 - window['$j'] = jQuery.noConflict();
 2910+ window['$j'] = jQuery();
29082911 }
\ No newline at end of file

Status & tagging log