r60289 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60288‎ | r60289 | r60290 >
Date:02:02, 22 December 2009
Author:dale
Status:deferred
Tags:
Comment:
* sequencer fixes
Modified paths:
  • /branches/js2-work/phase3/js/editPage.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/jquery.simpleUploadForm.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/htmlEmbed.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/mw.EmbedPlayer.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/loader.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/mw.PlayList.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/mw.SeqRemoteSearchDriver.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/mw.Sequencer.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/skins/mvpcf/styles.css (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/skins/mvpcf/styles.css
@@ -459,9 +459,7 @@
460460
461461 .ui-dialog .ui-dialog-buttonpane button { float: left !important; }
462462
463 -.ui-widget-content a { text-decoration: underline; }
464463
465 -
466464 .vol_container{
467465 z-index:99;
468466 width:23px;
Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js
@@ -416,8 +416,7 @@
417417 * get the add text menu item:
418418 */
419419 getLiAddText: function(){
420 - var _this = this;
421 - return '';
 420+ var _this = this;
422421 return _this.getLi( gM( 'mwe-add-timed-text'), 'script', function(){
423422 _this.showTimedTextEditUI( 'add' );
424423 } )
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/jquery.simpleUploadForm.js
@@ -138,24 +138,26 @@
139139
140140 // Set up the binding per the config
141141 if ( options.enable_fogg ) {
142 - $j( "#wpUploadFile" ).firefogg( {
143 - // An api url (we won't submit directly to action of the form)
144 - 'api_url' : options.api_target,
145 -
146 - // If we should do a form rewrite
147 - 'form_rewrite': true,
148 -
149 - // MediaWiki API supports chunk uploads:
150 - 'enable_chunks' : true,
151 -
152 - 'edit_form_selector' : '#suf-upload',
153 - 'new_source_cb' : function( orgFilename, oggName ) {
154 - $j( "#wpDestFile" ).val( oggName ).doDestCheck( {
155 - warn_target: "#wpDestFile-warning"
156 - } );
157 - },
158 - 'done_upload_cb' : options.ondone_callback
159 - } );
 142+ mw.load( 'AddMedia.firefogg', function(){
 143+ $j( "#wpUploadFile" ).firefogg( {
 144+ // An api url (we won't submit directly to action of the form)
 145+ 'api_url' : options.api_target,
 146+
 147+ // If we should do a form rewrite
 148+ 'form_rewrite': true,
 149+
 150+ // MediaWiki API supports chunk uploads:
 151+ 'enable_chunks' : true,
 152+
 153+ 'edit_form_selector' : '#suf-upload',
 154+ 'new_source_cb' : function( orgFilename, oggName ) {
 155+ $j( "#wpDestFile" ).val( oggName ).doDestCheck( {
 156+ warn_target: "#wpDestFile-warning"
 157+ } );
 158+ },
 159+ 'done_upload_cb' : options.ondone_callback
 160+ } );
 161+ });
160162 }
161163 } );
162164 }
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/mw.EmbedPlayer.js
@@ -405,7 +405,7 @@
406406 case 'playlist':
407407 // Make sure we have the necessary playlist libs loaded:
408408 mw.load( [
409 - 'mvPlayList'
 409+ 'mw.PlayList'
410410 ], function() {
411411
412412 // Create playlist player interface
@@ -424,8 +424,8 @@
425425 '</div>'
426426 );
427427
428 - // Issue the checkPlayerSources call to the new playlist interface:
429 - $j( '#' + element_id ).get(0).showPlayer();
 428+ // Issue the checkPlayerSources call to the new playlist interface:
 429+ $j( '#' + playlistPlayer.id ).get(0).showPlayer();
430430 } );
431431 break;
432432 }
@@ -1186,7 +1186,7 @@
11871187 // Percent of the clip buffered:
11881188 'bufferedPercent' : 0,
11891189
1190 - // Holds the timmer interval function
 1190+ // Holds the timer interval function
11911191 'monitorTimerId' : null,
11921192
11931193 /**
@@ -1352,8 +1352,9 @@
13531353 },
13541354
13551355 /**
1356 - * Check player sources if we need to get media sources
1357 - * form an external file that request is issued here
 1356+ * Check player for sources.
 1357+ * If we need to get media sources form an external file
 1358+ * that request is issued here
13581359 */
13591360 checkPlayerSources: function() {
13601361 mw.log( 'f:checkPlayerSources' );
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/htmlEmbed.js
@@ -103,7 +103,6 @@
104104 var ct = new Date();
105105 this.currentTime = ( ( ct.getTime() - this.clockStartTime ) / 1000 ) + this.pauseTime;
106106 var ct = new Date();
107 - // mw.log('mvPlayList:monitor trueTime: '+ this.currentTime);
108107
109108 // Once currentTime is updated call parent_monitor
110109 this.parent_monitor();
Index: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/loader.js
@@ -13,8 +13,7 @@
1414 mw.getStyleSheet( mw.getMwEmbedPath() + 'skins/' + mw.getConfig( 'skinName' ) + '/mv_sequence.css' );
1515 // Make sure we have the required mwEmbed libs:
1616 mw.load( [
17 - [ // Load the EmbedPlayer Module ( includes lots of dependent classes )
18 - // ( we can't predictavly script-load it )
 17+ [ // Load the EmbedPlayer Module ( includes lots of dependent classes )
1918 'EmbedPlayer'
2019 ],
2120 [
Index: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/mw.SeqRemoteSearchDriver.js
@@ -27,7 +27,7 @@
2828
2929
3030 // Inherit the remoteSearchDriver properties:n
31 - var tmpRemoteSearchDriver = new remoteSearchDriver( options );
 31+ var tmpRemoteSearchDriver = new mw.RemoteSearchDriver( options );
3232 for ( var i in tmpRemoteSearchDriver ) {
3333 if ( this[i] ) {
3434 this['parent_' + i] = tmpRemoteSearchDriver[i];
Index: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/mw.Sequencer.js
@@ -79,7 +79,9 @@
8080
8181 instance_name:'mvSeq', // for now only one instance by name mvSeq is allowed
8282
83 - target_sequence_container:null,// text value (so that its a valid property)
 83+ // Target sequence container
 84+ target_sequence_container:null,
 85+
8486 target_form_text: null,
8587
8688 // what is our save mode:
@@ -176,10 +178,10 @@
177179 'js':function( this_seq ) {
178180 // Load the search interface with sequence tool targets
179181 mw.load( [
180 - 'remoteSearchDriver',
181 - 'seqRemoteSearchDriver'
 182+ 'mw.RemoteSearchDriver',
 183+ 'mw.SeqRemoteSearchDriver'
182184 ], function() {
183 - this_seq.mySearch = new seqRemoteSearchDriver( this_seq );
 185+ this_seq.mySearch = new mw.SeqRemoteSearchDriver( this_seq );
184186 this_seq.mySearch.createUI();
185187 } );
186188 }
@@ -216,7 +218,7 @@
217219 key_ctrl_down:false,
218220 inputFocus:false,
219221
220 - init:function( iObj ) {
 222+ init: function( iObj ) {
221223 // set up pointer to _this for current scope:
222224 var _this = this;
223225 // set the default values:
@@ -485,16 +487,21 @@
486488 }
487489 }
488490 },
489 - // once playlist is ready continue
 491+ // Once playlist is ready continue
490492 checkReadyPlObj: function() {
 493+ var _this = this;
491494 // set up pointers from sequencer to pl obj
492495 this.plObj = $j( '#' + this.plObj_id ).get( 0 );
 496+
493497 // & from seq obj to sequencer
494498 this.plObj.pSeq = this;
495499
496 - if ( this.plObj )
497 - if ( ! this.plObj.loading )
 500+ if ( this.plObj ){
 501+ if ( ! this.plObj.loading ){
498502 this.plReadyInit();
 503+ return ;
 504+ }
 505+ }
499506
500507 // else keep checking for the playlist to be ready
501508 if ( this.plObj.loading ) {
@@ -502,7 +509,9 @@
503510 mw.log( 'error playlist never ready' );
504511 } else {
505512 this.plReadyTimeout++;
506 - setTimeout( this.instance_name + '.checkReadyPlObj()', 25 );
 513+ setTimeout( function(){
 514+ _this.checkReadyPlObj();
 515+ }, 25 );
507516 }
508517 }
509518 },
@@ -513,10 +522,11 @@
514523 var _this = this;
515524 mw.log( 'plReadyInit' );
516525 mw.log( this.plObj );
517 - // give the playlist a pointer to its parent seq:
 526+
 527+ // Give the playlist a pointer to its parent seq:
518528 this.plObj['seqObj'] = this;
519529
520 - // update playlist (if its empty right now)
 530+ // Update playlist (if its empty right now)
521531 if ( this.plObj.getClipCount() == 0 ) {
522532 $j( '#' + this.plObj_id ).html( 'empty playlist' );
523533 }
@@ -800,7 +810,7 @@
801811 mw.loading_spinner( '#transitions_ic' );
802812 mw.load( [
803813 '$j.fn.ColorPicker',
804 - 'mvTimedEffectsEdit'
 814+ 'mw.TimedEffectsEdit'
805815 ], function() {
806816 // For some reason we lose scope in the options passed to mvTimedEffectsEdit
807817 // so we re refrence the sequence here:
@@ -823,7 +833,7 @@
824834
825835 // Load the clipEdit library if not already loaded:
826836 mw.load( [
827 - 'mvClipEdit'
 837+ 'mw.ClipEdit'
828838 ], function() {
829839 // Zero out the current editor:
830840 _this.myClipEditor = { };
@@ -1608,13 +1618,13 @@
16091619 }
16101620
16111621 }
1612 -/* extension to mvPlayList to support sequencer features properties */
1613 -var mvSeqPlayList = function( element ) {
 1622+/* extension to mw.PlayList to support sequencer features properties */
 1623+mw.SeqPlayList = function( element ) {
16141624 return this.init( element );
16151625 }
1616 -mvSeqPlayList.prototype = {
 1626+mw.SeqPlayList.prototype = {
16171627 init:function( element ) {
1618 - var myPlObj = new mvPlayList( element );
 1628+ var myPlObj = new mw.PlayList( element );
16191629
16201630 // inherit mvClip
16211631 for ( var method in myPlObj ) {
Index: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/mw.PlayList.js
@@ -179,7 +179,9 @@
180180 }
181181 this.cur_clip.embed.showShare( embed_code );
182182 },
183 -
 183+ isTimedTextSupported: function(){
 184+ return false;
 185+ },
184186 checkForTextSource: function() {
185187 return false;
186188 },
@@ -1296,7 +1298,7 @@
12971299 ve.setAttribute( i, vid_init[i] );
12981300 }
12991301 }
1300 - var videoInterface = new embedPlayer( ve );
 1302+ var videoInterface = new mw.EmbedPlayer( ve );
13011303 // inherit the videoInterface
13021304 for ( method in videoInterface ) {
13031305 if ( method != 'style' ) {
@@ -2008,8 +2010,8 @@
20092011 if ( clipObj ) {
20102012 // set up embed:
20112013 clipObj.setUpEmbedObj();
2012 - // inhreit embedObject (only called on "new media"
2013 - clipObj.embed.sourcesReadyInit();
 2014+ // Check for player sources:
 2015+ clipObj.embed.checkPlayerSources();
20142016 // add clip to track:
20152017 this.addCliptoTrack( clipObj , order );
20162018
Index: branches/js2-work/phase3/js/editPage.js
@@ -15,7 +15,7 @@
1616 'default_query': wgTitle,
1717 'target_title': wgPageName,
1818 // Here we can setup the content provider overrides
19 - 'enabled_providers':['wiki_commons'],
 19+ 'enabled_providers':['upload'],
2020 // The local wiki API URL:
2121 'local_wiki_api_url': wgServer + wgScriptPath + '/api.php'
2222 };

Status & tagging log