r52583 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52582‎ | r52583 | r52584 >
Date:21:39, 29 June 2009
Author:dale
Status:deferred
Tags:
Comment:
include remoteSearchDriver in callback for application based invocation
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/mv_embed.js (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/mv_embed.js
@@ -112,10 +112,12 @@
113113 path = '';
114114 if(gClasses.length){
115115 //do array loop:
116 - for(var i=0;i<gClasses.length;i++){
117 - //setup normal replacement of j with jquery
118 - var jsName = ( gClasses[i].substr(0,3) == '$j.' ) ? opt['j_replace'] + gClasses[i].substr(3) : gClasses[i];
119 - mvClassPaths[ gClasses[i] ] = path + jsName + '.js';
 116+ for(var i=0; i<gClasses.length; i++){
 117+ if(typeof gClasses[i] != 'undefined'){
 118+ //setup normal replacement of j with jquery
 119+ var jsName = ( gClasses[i].substr(0,3) == '$j.' ) ? opt['j_replace'] + gClasses[i].substr(3) : gClasses[i];
 120+ mvClassPaths[ gClasses[i] ] = path + jsName + '.js';
 121+ }
120122 }
121123 }else{
122124 //do object loop:
@@ -773,8 +775,9 @@
774776 ], function(){
775777 iObj['instance_name']= 'rsdMVRS';
776778 _global['rsdMVRS'] = new remoteSearchDriver( iObj );
777 - if( callback )
778 - callback();
 779+ if( callback ){
 780+ callback( _global['rsdMVRS'] );
 781+ }
779782 });
780783 });
781784 }
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js
@@ -2404,10 +2404,8 @@
24052405 this.default_players['video/h264'] = ['flash', 'vlc'];
24062406
24072407 this.default_players['video/ogg'] = ['native','vlc','java', 'generic'];
2408 - this.default_players['application/ogg'] = ['native','vlc','java', 'generic'];
2409 -
2410 - this.default_players['audio/ogg'] = ['native','vlc', 'omtk', 'java' ];
2411 -
 2408+ this.default_players['application/ogg'] = ['native','vlc','java', 'generic'];
 2409+ this.default_players['audio/ogg'] = ['native','vlc', 'java', 'omtk' ];
24122410 this.default_players['video/mp4'] = ['vlc'];
24132411
24142412 this.default_players['text/html'] = ['html'];
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
@@ -340,7 +340,7 @@
341341
342342 //set up the target invocation:
343343 if( $j(this.target_invocation).length==0 ){
344 - js_log("RemoteSearchDriver:: no target invocation provided")
 344+ js_log("RemoteSearchDriver:: no target invocation provided (will have to run your own doInitDisplay() )");
345345 }else{
346346 $j(this.target_invocation).css('cursor','pointer').attr('title', gM('add_media_wizard')).click(function(){
347347 _this.doInitDisplay();

Status & tagging log