r52031 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52030‎ | r52031 | r52032 >
Date:09:22, 17 June 2009
Author:dale
Status:deferred
Tags:
Comment:
more remote usage fixes
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/styles.css (modified) (history)
  • /branches/new-upload/phase3/js2/uploadPage.js (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/uploadPage.js
@@ -9,6 +9,10 @@
1010 var mwUploadHelper = {
1111 init:function(){
1212 var _this = this;
 13+ //if not boolean false set to true:
 14+ if(typeof wgEnableFirefogg == 'undefined')
 15+ wgEnableFirefogg = true;
 16+
1317 if( wgEnableFirefogg ){
1418 //setup the upload handler to firefogg (supports our upload proccess) (should work with the http uploads too)
1519 $j('#wpUploadFile').firefogg({
Index: branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/styles.css
@@ -686,6 +686,11 @@
687687 background-image: url('images/pbar-ani.gif');
688688 }
689689
 690+ui-widget-overlay{
 691+ background: url("images/ui-bg_diagonals-thick_20_666666_40x40.png") repeat scroll 50% 50% #666666;
 692+ opacity:0.5;
 693+}
 694+
690695 /* Vertical Tabs
691696 ----------------------------------*/
692697 .ui-dialog-buttonpane { padding:10px !important; }
@@ -748,3 +753,4 @@
749754 -webkit-border-radius: 3px;
750755 }
751756
 757+
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js
@@ -320,14 +320,15 @@
321321 js_log(" should update: " + _this.target_input_file_name + ' to: ' + _this.fogg.sourceFilename );
322322 $j(_this.target_input_file_name).val(_this.fogg.sourceFilename).show();
323323
324 - if(_this.new_source_cb){
 324+ if(_this.new_source_cb){
325325 var oggExt = (_this.isSourceAudio())?'oga':'ogg';
326326 oggExt = (_this.isSourceVideo())?'ogv':oggExt;
 327+ oggExt = (_this.isUnknown())?'ogg':oggExt;
327328 oggName = _this.fogg.sourceFilename.substr(0,
328329 _this.fogg.sourceFilename.lastIndexOf('.'));
329330
330331 _this.new_source_cb( _this.fogg.sourceFilename , oggName +'.'+ oggExt);
331 - }
 332+ }
332333 }
333334 }else{
334335 //js_error("Firefogg error selecting file");
@@ -368,14 +369,18 @@
369370
370371 js_log('base autoEncoderSettings::' + _this.sourceFileInfo.contentType + ' passthrough:' + _this.encoder_settings['passthrough']);
371372 },
 373+ isUnknown:function(){
 374+ return (this.sourceFileInfo.contentType.indexOf("unknown") != -1);
 375+ },
372376 isSourceAudio:function(){
373377 return (this.sourceFileInfo.contentType.indexOf("audio/") != -1);
374378 },
375379 isSourceVideo:function(){
376380 return (this.sourceFileInfo.contentType.indexOf("video/") != -1);
377 - },
 381+ },
378382 isOggFormat:function(){
379 - return ( this.sourceFileInfo.contentType.indexOf("video/ogg") != -1);
 383+ return ( this.sourceFileInfo.contentType.indexOf("video/ogg") != -1 ||
 384+ this.sourceFileInfo.contentType.indexOf("application/ogg") != -1 );
380385 },
381386 getProgressTitle:function(){
382387 js_log("fogg:getProgressTitle f:" + this.fogg_enabled + ' rw:' + this.form_rewrite);
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
@@ -1512,7 +1512,7 @@
15131513 //update if its video or audio:
15141514 if( rObj.mime.indexOf('audio')!=-1 ||
15151515 rObj.mime.indexOf('video')!=-1 ||
1516 - rObj.mime.indexOf('/ogg')){
 1516+ rObj.mime.indexOf('/ogg') !=-1){
15171517 mvJsLoader.embedVideoCheck(function(){
15181518 mv_video_embed();
15191519 });

Status & tagging log