Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki-CVS

SVN: [58713] trunk/phase3/js2

 

 

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded


dale at svn

Nov 7, 2009, 7:25 AM

Post #1 of 1 (16 views)
Permalink
SVN: [58713] trunk/phase3/js2

http://www.mediawiki.org/wiki/Special:Code/MediaWiki/58713

Revision: 58713
Author: dale
Date: 2009-11-07 15:25:06 +0000 (Sat, 07 Nov 2009)

Log Message:
-----------
* fixed wpSourceTypeURL rename to wpSourceTypeUrl

Modified Paths:
--------------
trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js
trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js
trunk/phase3/js2/remoteMwEmbed.js
trunk/phase3/js2/uploadPage.js

Modified: trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
===================================================================
--- trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js 2009-11-07 15:13:38 UTC (rev 58712)
+++ trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js 2009-11-07 15:25:06 UTC (rev 58713)
@@ -62,24 +62,26 @@
js_log( "init mvBaseUploadInterface:: " + this.api_url);
},
setupForm:function(){
+ js_log("Base::setupForm::");
var _this = this;
//set up the local pointer to the edit form:
- _this.editForm = _this.getEditForm();
+ _this.editForm = _this.getEditForm();
if( _this.editForm ){
-
+
//if in api re-map the upload form to api: (we have to do this BEFORE the users selects a file)
- if(_this.upload_mode == 'api'){
+ if( _this.upload_mode == 'api'){
_this.doRemapFormToApi();
- }
+ }

//set up the org_onsubmit if not set:
if( typeof( _this.org_onsubmit ) == 'undefined' && _this.editForm.onsubmit )
- _this.org_onsubmit = _this.editForm.onsubmit;
-
+ _this.org_onsubmit = _this.editForm.onsubmit;
+
+
//set up the submit action:
$j( _this.editForm ).submit( function(){
js_log('setupForm.onSubmit:');
-
+
//set the upload mode:
_this.setWgUploadSelect();

@@ -104,6 +106,7 @@
}
//put into a try catch so we are sure to return false:
try{
+ debugger;
//get a clean loader:
_this.dispProgressOverlay();

@@ -119,8 +122,10 @@
//don't submit the form we will do the post in ajax
return false;
});
- }
-
+ }
+ $j('#testcat').click(function(){
+ $j( _this.editForm ).submit();
+ });
},
detectUploadMode:function( callback ){
var _this = this;
@@ -167,7 +172,7 @@
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:
@@ -185,15 +190,12 @@
$j(_this.editForm).find("[name='wpEditToken']").attr('name', 'token');
$j(_this.editForm).find("[name='wpIgnoreWarning']").attr('name', 'ignorewarnings');
$j(_this.editForm).find("[name='wpWatchthis']").attr('name', 'watch');
-
- //update the status to 100% progress bar (no status in iframe submit)
- $j('#up-progressbar' ).progressbar( 'value', parseInt( 100 ) );
- $j('#up-status-container').html( gM('mwe-upload-in-progress') );
+
},
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').get(0).checked ){
this.http_copy_upload = true;
}
},
@@ -242,7 +244,6 @@
return false;
}else if( _this.upload_mode == 'api' ){
js_log('doHttpUpload (no form submit) ');
-
//if the api is supported.. && source type is http do upload with http status updates
var httpUpConf ={
'url' : $j('#wpUploadFileURL').val(),

Modified: trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js
===================================================================
--- trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js 2009-11-07 15:13:38 UTC (rev 58712)
+++ trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js 2009-11-07 15:25:06 UTC (rev 58713)
@@ -182,7 +182,7 @@
//hide all targets:
var hide_target_list='';
var coma='';
- $j.each(default_firefogg_options, function(target, na){
+ $j.each( default_firefogg_options, function(target, na) {
if(target.substring(0, 6)=='target'){
hide_target_list+=coma + _this[target];
coma=',';
@@ -190,7 +190,7 @@
});
$j( hide_target_list ).hide();
//now that the proper set of items has been hiiden show:
- $j( this.selector ).show();
+ $j( _this.selector ).show();


//hide all but check-for-fogg
@@ -199,7 +199,7 @@

//if rewriting the form lets keep the text input around:
if( _this.form_rewrite )
- $j(this.target_input_file_name).show();
+ $j( _this.target_input_file_name ).show();

//show select file:
$j( this.target_btn_select_file ).unbind(
@@ -547,7 +547,7 @@
return gM('mwe-upload-transcode-in-progress');
},
doUploadSwitch:function(){
- var _this = this;
+ var _this = this;
js_log("firefogg: doUploadSwitch:: " + this.fogg_enabled + ' up mode:' + _this.upload_mode);
//make sure firefogg is enabled otherwise do parent UploadSwich:
if( !this.fogg_enabled || !this.firefogg_form_action )

Modified: trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js
===================================================================
--- trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js 2009-11-07 15:13:38 UTC (rev 58712)
+++ trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js 2009-11-07 15:25:06 UTC (rev 58713)
@@ -1,11 +1,10 @@

loadGM({
- "mwe-select_transcript_set" : "Select layers",
+ "mwe-select_transcript_set" : "Select subtitles",
"mwe-auto_scroll" : "auto scroll",
"mwe-close" : "close",
"mwe-improve_transcript" : "Improve",
- "mwe-no_text_tracks_found" : "No text tracks were found",
- "mwe-subtitles" : "$1 subtitles"
+ "mwe-no_text_tracks_found" : "No text tracks were found"
})
// text interface object (for inline display captions)
var mvTextInterface = function( parentEmbed ){
@@ -86,7 +85,7 @@
'category' : 'SUB',
'lang' : langKey,
'type' : mimeTypes[ extension ],
- 'title' : gM('mwe-subtitles', langData[ langKey]),
+ 'title' : langData[ langKey],
'src' : wgServer + wgScript + '?title=' + subPage.title + '&action=raw'
});
_this.pe.media_element.tryAddSource( textElm );

Modified: trunk/phase3/js2/remoteMwEmbed.js
===================================================================
--- trunk/phase3/js2/remoteMwEmbed.js 2009-11-07 15:13:38 UTC (rev 58712)
+++ trunk/phase3/js2/remoteMwEmbed.js 2009-11-07 15:25:06 UTC (rev 58713)
@@ -17,7 +17,7 @@
function doPageSpecificRewrite() {
// Add media wizard
if( wgAction == 'edit' || wgAction == 'submit' ) {
- load_mv_embed( function() {
+ load_mv_embed( function() {
loadExternalJs( mwEmbedHostPath + '/editPage.js' + reqAguments );
} );
}

Modified: trunk/phase3/js2/uploadPage.js
===================================================================
--- trunk/phase3/js2/uploadPage.js 2009-11-07 15:13:38 UTC (rev 58712)
+++ trunk/phase3/js2/uploadPage.js 2009-11-07 15:25:06 UTC (rev 58713)
@@ -4,7 +4,6 @@
*/

js2AddOnloadHook( function() {
- js_log("never ran js2hook");
mwUploadHelper.init();
});




_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.