r60067 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60066‎ | r60067 | r60068 >
Date:08:13, 15 December 2009
Author:dale
Status:deferred
Tags:
Comment:
* minor fixes to timed Text
Modified paths:
  • /branches/js2-work/phase3/js2/mwEmbed/libTimedText/mw.timedText.js (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js2/mwEmbed/libTimedText/mw.timedText.js
@@ -70,7 +70,7 @@
7171 /**
7272 * The list of enabled sources
7373 */
74 - enabledSources: { },
 74+ enabledSources: [ ],
7575
7676 /**
7777 * Text sources ( a set of textSource objects )
@@ -120,8 +120,8 @@
121121 embedPlayer.addHook( 'monitor', function(){
122122 _this.monitor();
123123 } )
124 - // Load cookie / page prefrences
125 - //
 124+ // @@TODO: Load cookie / page prefrences
 125+
126126 // Load textSources
127127 _this.loadTextSources( function(){
128128
@@ -153,7 +153,8 @@
154154 // make a new textSource:
155155 var source = new textSource( inlineSources[i] );
156156 this.textSources.push( source );
157 - }
 157+ }
 158+ callback();
158159 },
159160
160161 /**
@@ -178,7 +179,7 @@
179180 for(var i in this.enabledSources ){
180181 var enabledSource = this.enabledSources[ i ];
181182 if( ! enabledSource.loaded )
182 - this.loadAndParseSource( enabledSource );
 183+ enabledSource.load();
183184 }
184185 },
185186
@@ -312,7 +313,7 @@
313314 */
314315 getLayoutMenu: function(){
315316 var _this = this;
316 - var layoutOptions = [ 'ontop', 'off', 'below' ];
 317+ var layoutOptions = [ 'ontop', 'below', 'off' ];
317318 $ul = $j('<ul>');
318319 $j.each(layoutOptions, function( na, layoutMode ){
319320 var icon = ( _this.config.layout == layoutMode )? 'bullet' : 'radio-on';
@@ -415,11 +416,11 @@
416417 return ;
417418 }
418419 // Issue the load request ( if we can )
419 - if ( mw.parseUri( document.URL ).host != mw.parseUri( this.getSrc() ).host ){
420 - mw.log("Error can't load non-json src via jsonp:" + this.getSrc() )
421 - return ;
422 - }
423 - var XHR = $j.get( this.getSrc(), function(){
 420+ //if ( mw.parseUri( document.URL ).host != mw.parseUri( this.getSrc() ).host ){
 421+ // mw.log("Error can't load non-json src via jsonp:" + this.getSrc() )
 422+ // return ;
 423+ //}
 424+ $j.get( this.getSrc(), function(){
424425 // Parse and load captions:
425426 _this.captions = handler( data );
426427 // Update the loaded state:

Status & tagging log