r51672 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51671‎ | r51672 | r51673 >
Date:01:08, 10 June 2009
Author:dale
Status:deferred
Tags:
Comment:
fixes to add Media Wiz
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
@@ -1214,10 +1214,10 @@
12151215 doImportAPI:function(rObj, cir_callback){
12161216 var _this = this;
12171217 //baseUploadInterface
1218 - mvJsLoader.doLoad( {
1219 - 'mvBaseUploadInterface': 'libAddMedia/mvBaseUploadInterface.js',
1220 - '$j.ui.progressbar' : 'jquery/' + jQueryUiVN + '/ui/ui.progressbar.js'
1221 - },function(){
 1218+ mvJsLoader.doLoad([
 1219+ 'mvBaseUploadInterface',
 1220+ '$j.ui.progressbar'
 1221+ ],function(){
12221222 //initicate a download similar to url copy:
12231223 myUp = new mvBaseUploadInterface({
12241224 'api_url' : _this.local_wiki_api_url,
@@ -1401,15 +1401,14 @@
14021402 _this.updatePreviewText( rObj );
14031403 $j(_this.target_textbox).val( _this.preview_wtext );
14041404
1405 - //also update the render area:
 1405+ //update the render area (if present)
14061406 if(_this.target_render_area && _this.cur_embed_code){
14071407 //output with some padding:
14081408 $j(_this.target_render_area).append( _this.cur_embed_code + '<div style="clear:both;height:10px">')
14091409 //update if its
1410 - mv_video_embed(function(){
1411 - _this.closeAll();
1412 - });
 1410+ mv_video_embed();
14131411 }
 1412+ _this.closeAll();
14141413 });
14151414 },
14161415 closeAll:function(){
Index: branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js
@@ -9,7 +9,7 @@
1010 * @url http://metavid.org
1111 *
1212 * @further developed in open source collaboration with kaltura.
13 - * more info at http://kaltura.com
 13+ * more info at http://kaltura.com & http://kaltura.org
1414 *
1515 * mv_sequencer.js
1616 * is a basic embeddeble sequencer.
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js
@@ -108,10 +108,8 @@
109109 if(swap_done_callback)
110110 mvEmbed.flist.push( swap_done_callback );
111111 //get mv_embed location if it has not been set
112 - js_log('mv_embed ' + MV_EMBED_VERSION);
 112+ js_log('mv_embed ' + MV_EMBED_VERSION);
113113
114 - this.swap_done_callback = swap_done_callback;
115 -
116114 var loadPlaylistLib=false;
117115 //set up the jQuery selector:
118116
@@ -126,13 +124,13 @@
127125 //if video doSwap
128126 switch( this_elm.tagName.toLowerCase()){
129127 case 'video':
130 - var videoInterface = new embedVideo(this_elm);
131 - mvEmbed.swapEmbedVideoElement( this_elm, videoInterface );
 128+ var videoInterface = new embedVideo(this_elm);
 129+ mvEmbed.swapEmbedVideoElement( this_elm, videoInterface );
132130 break;
133131 case 'audio':
134132 var videoInterface = new embedVideo(this_elm);
135133 videoInterface.type ='audio';
136 - mvEmbed.swapEmbedVideoElement( this_elm, videoInterface );
 134+ mvEmbed.swapEmbedVideoElement( this_elm, videoInterface );
137135 break;
138136 case 'playlist':
139137 loadPlaylistLib=true;
@@ -149,7 +147,7 @@
150148 //ie8 does not play well with the jQuery video,audio,playlist selector use native:
151149 if($j.browser.msie && $j.browser.version >= 8){
152150 jtags = j_selector.split(',');
153 - for(var i=0;i<jtags.length;i++){
 151+ for(var i=0;i<jtags.length;i++){
154152 $j( document.getElementsByTagName( jtags[i] )).each(function(){
155153 eAction(this);
156154 });
@@ -239,6 +237,7 @@
240238 },
241239 //this should not be needed.
242240 checkClipsReady : function(){
 241+ js_log('checkClipsReady');
243242 var is_ready=true;
244243 for(var i=0; i < global_player_list.length; i++){
245244 if( $j('#'+global_player_list[i]).length !=0){
@@ -254,12 +253,15 @@
255254 mvEmbed.allClipsReady = true;
256255 // run queued functions
257256 //js_log('run queded functions:' + mvEmbed.flist[0]);
258 - while (mvEmbed.flist.length){
259 - mvEmbed.flist.shift()();
260 - }
 257+ mvEmbed.runFlist();
261258 }else{
262259 setTimeout( 'mvEmbed.checkClipsReady()', 25 );
263260 }
 261+ },
 262+ runFlist:function(){
 263+ while (this.flist.length){
 264+ this.flist.shift()();
 265+ }
264266 }
265267 }
266268

Status & tagging log