All pastes #1671334 Raw Edit

Stuff

public text v1 · immutable
#1671334 ·published 2009-11-14 17:53 UTC
rendered paste body
### Eclipse Workspace Patch 1.0
#P wiki_trunk
Index: js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
===================================================================
--- js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js	(revision 59004)
+++ js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js	(working copy)
@@ -105,7 +105,6 @@
 				}
 				// Put into a try catch so we are sure to return false:
 				try{
-					debugger;
 					// Get a clean loader:
 					_this.dispProgressOverlay();
 
@@ -163,16 +162,17 @@
 			_this.doUploadSwitch();
 		}
 	},
-	//@@NOTE this could probably be deprecated in favor of automated input
+	//@@NOTE this could probably be deprecated in favor of creating new form with values from the old one. 
+	// the problem is you have to do this before the user browser for a file since that value is 
+	// non transferable 
 	doRemapFormToApi:function(){
 		var _this = this;
 		if( !_this.api_url )
 			return false;
 			
 		//add the action api 
-		//$j(_this.editForm).attr('action', _this.api_url);
+		$j(_this.editForm).attr('action', _this.api_url);
 		
-		//add api url 
 		//add api action:
 		if( $j(_this.editForm).find("[name='action']").length == 0)
 			$j(_this.editForm).append('<input type="hidden" name="action" value="upload">');
@@ -193,7 +193,7 @@
 	setWgUploadSelect: function(){
 		if( $j('#wpSourceTypeFile').length ==  0 || $j('#wpSourceTypeFile').get(0).checked ){
 			this.http_copy_upload = false;
-		}else if(  $j('#wpSourceTypeUrl').get(0).checked ){
+		}else if(  $j('#wpSourceTypeURL,#wpSourceTypeUrl').get(0).checked ){
 			this.http_copy_upload = true;
 		}
 	},
@@ -222,8 +222,7 @@
 			//set the action to the api url:
 			$j(_this.editForm).attr('action', _this.api_url );
 			
-			js_log('do iframe form submit to: ' +  $j(_this.editForm).attr('target') );
-			js_log(' destName:' + $j(_this.editForm).find("[name='filename']").val() );					
+			js_log('do iframe form submit to: ' +  $j(_this.editForm).attr('target') );								
 			
 			
 			//do post override
@@ -372,8 +371,8 @@
 					//special case update the file progress where we have data size:
 					$j('#up-status-container').html(
 						gM('mwe-upload-stats-fileprogres', [
-							$mw.lang.formatSize( data.upload['loaded'] ),
-							$mw.lang.formatSize( data.upload['content_length'] )
+							mw.lang.formatSize( data.upload['loaded'] ),
+							mw.lang.formatSize( data.upload['content_length'] )
 							]
 						)
 					);
@@ -383,7 +382,7 @@
 					//for lack of content-length requests:
 					$j('#up-status-container').html(
 						gM('mwe-upload-stats-fileprogres', [
-							$mw.lang.formatSize( data.upload['loaded'] ),
+							mw.lang.formatSize( data.upload['loaded'] ),
 							gM('mwe-upload-unknown-size')
 							]
 						)
Index: js2/mwEmbed/libAddMedia/mvAdvFirefogg.js
===================================================================
--- js2/mwEmbed/libAddMedia/mvAdvFirefogg.js	(revision 59004)
+++ js2/mwEmbed/libAddMedia/mvAdvFirefogg.js	(working copy)
@@ -2,8 +2,6 @@
  * Adds advanced firefogg support (let you control and structure advanced controls over many aspects of video encoding)
  */
 
-//@@todo put all msg text into loadGM json
-
 loadGM({
 	"fogg-help-sticky" : "Help (click to stick)",
 	"fogg-cg-preset" : "Preset: <strong>$1<\/strong>",
@@ -794,16 +792,16 @@
 		$j.each(this.default_encoder_config, function(inx, val){
 			if($j(_this.selector + ' ._'+inx).length!=0){
 				if(typeof val.range != 'undefined'){
-					//udate slider range
+					// Update slider range
 					var new_max = (val.range.local_max)?val.range.local_max: val.range.max
 					$j( _this.selector + ' .slider_'+inx).slider('option', 'max', new_max);
 
-					//update slider/input value:
+					// Update slider/input value:
 					_this.updateInterfaceValue(inx, _this.local_settings.pSet['custom']['conf'][inx]);
 				}
 			}
 		});
-		//update values
+		// Update values
 		this.updateValuesInHtml();
 	},
 	doEncode:function(){
@@ -825,14 +823,14 @@
 			}
 		});
 	},
-	//restors settings from a cookie if you have them)
+	// Restores settings from a cookie if you have them)
 	loadEncSettings:function( force ){
-		if($j.cookie('fogg_encoder_config')){
+		if( $j.cookie('fogg_encoder_config') ){
 			js_log("load:fogg_encoder_config from cookie ");
 			this.local_settings = JSON.parse( $j.cookie('fogg_settings') );
 		}
 		//set to default if not loaded yet:
-		if( this.local_settings &&  this.local_settings.pSet && this.local_settings.pSet['custom']['conf']){
+		if( this.local_settings &&  this.local_settings.pSet && this.local_settings.pSet['custom']['conf'] ){
 			js_log('local settings already populated');
 		}else{
 			this.local_settings  = this.default_local_settings;