r58713 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58712‎ | r58713 | r58714 >
Date:15:25, 7 November 2009
Author:dale
Status:deferred
Tags:
Comment:
* fixed wpSourceTypeURL rename to wpSourceTypeUrl
Modified paths:
  • /trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js (modified) (history)
  • /trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js (modified) (history)
  • /trunk/phase3/js2/remoteMwEmbed.js (modified) (history)
  • /trunk/phase3/js2/uploadPage.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js
@@ -182,7 +182,7 @@
183183 //hide all targets:
184184 var hide_target_list='';
185185 var coma='';
186 - $j.each(default_firefogg_options, function(target, na){
 186+ $j.each( default_firefogg_options, function(target, na) {
187187 if(target.substring(0, 6)=='target'){
188188 hide_target_list+=coma + _this[target];
189189 coma=',';
@@ -190,7 +190,7 @@
191191 });
192192 $j( hide_target_list ).hide();
193193 //now that the proper set of items has been hiiden show:
194 - $j( this.selector ).show();
 194+ $j( _this.selector ).show();
195195
196196
197197 //hide all but check-for-fogg
@@ -199,7 +199,7 @@
200200
201201 //if rewriting the form lets keep the text input around:
202202 if( _this.form_rewrite )
203 - $j(this.target_input_file_name).show();
 203+ $j( _this.target_input_file_name ).show();
204204
205205 //show select file:
206206 $j( this.target_btn_select_file ).unbind(
@@ -547,7 +547,7 @@
548548 return gM('mwe-upload-transcode-in-progress');
549549 },
550550 doUploadSwitch:function(){
551 - var _this = this;
 551+ var _this = this;
552552 js_log("firefogg: doUploadSwitch:: " + this.fogg_enabled + ' up mode:' + _this.upload_mode);
553553 //make sure firefogg is enabled otherwise do parent UploadSwich:
554554 if( !this.fogg_enabled || !this.firefogg_form_action )
Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
@@ -62,24 +62,26 @@
6363 js_log( "init mvBaseUploadInterface:: " + this.api_url);
6464 },
6565 setupForm:function(){
 66+ js_log("Base::setupForm::");
6667 var _this = this;
6768 //set up the local pointer to the edit form:
68 - _this.editForm = _this.getEditForm();
 69+ _this.editForm = _this.getEditForm();
6970 if( _this.editForm ){
70 -
 71+
7172 //if in api re-map the upload form to api: (we have to do this BEFORE the users selects a file)
72 - if(_this.upload_mode == 'api'){
 73+ if( _this.upload_mode == 'api'){
7374 _this.doRemapFormToApi();
74 - }
 75+ }
7576
7677 //set up the org_onsubmit if not set:
7778 if( typeof( _this.org_onsubmit ) == 'undefined' && _this.editForm.onsubmit )
78 - _this.org_onsubmit = _this.editForm.onsubmit;
79 -
 79+ _this.org_onsubmit = _this.editForm.onsubmit;
 80+
 81+
8082 //set up the submit action:
8183 $j( _this.editForm ).submit( function(){
8284 js_log('setupForm.onSubmit:');
83 -
 85+
8486 //set the upload mode:
8587 _this.setWgUploadSelect();
8688
@@ -104,6 +106,7 @@
105107 }
106108 //put into a try catch so we are sure to return false:
107109 try{
 110+ debugger;
108111 //get a clean loader:
109112 _this.dispProgressOverlay();
110113
@@ -119,8 +122,10 @@
120123 //don't submit the form we will do the post in ajax
121124 return false;
122125 });
123 - }
124 -
 126+ }
 127+ $j('#testcat').click(function(){
 128+ $j( _this.editForm ).submit();
 129+ });
125130 },
126131 detectUploadMode:function( callback ){
127132 var _this = this;
@@ -167,7 +172,7 @@
168173 return false;
169174
170175 //add the action api
171 - $j(_this.editForm).attr('action', _this.api_url);
 176+ //$j(_this.editForm).attr('action', _this.api_url);
172177
173178 //add api url
174179 //add api action:
@@ -185,15 +190,12 @@
186191 $j(_this.editForm).find("[name='wpEditToken']").attr('name', 'token');
187192 $j(_this.editForm).find("[name='wpIgnoreWarning']").attr('name', 'ignorewarnings');
188193 $j(_this.editForm).find("[name='wpWatchthis']").attr('name', 'watch');
189 -
190 - //update the status to 100% progress bar (no status in iframe submit)
191 - $j('#up-progressbar' ).progressbar( 'value', parseInt( 100 ) );
192 - $j('#up-status-container').html( gM('mwe-upload-in-progress') );
 194+
193195 },
194196 setWgUploadSelect: function(){
195197 if( $j('#wpSourceTypeFile').length == 0 || $j('#wpSourceTypeFile').get(0).checked ){
196198 this.http_copy_upload = false;
197 - }else if( $j('#wpSourceTypeURL').get(0).checked ){
 199+ }else if( $j('#wpSourceTypeUrl').get(0).checked ){
198200 this.http_copy_upload = true;
199201 }
200202 },
@@ -242,7 +244,6 @@
243245 return false;
244246 }else if( _this.upload_mode == 'api' ){
245247 js_log('doHttpUpload (no form submit) ');
246 -
247248 //if the api is supported.. && source type is http do upload with http status updates
248249 var httpUpConf ={
249250 'url' : $j('#wpUploadFileURL').val(),
Index: trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js
@@ -1,11 +1,10 @@
22
33 loadGM({
4 - "mwe-select_transcript_set" : "Select layers",
 4+ "mwe-select_transcript_set" : "Select subtitles",
55 "mwe-auto_scroll" : "auto scroll",
66 "mwe-close" : "close",
77 "mwe-improve_transcript" : "Improve",
8 - "mwe-no_text_tracks_found" : "No text tracks were found",
9 - "mwe-subtitles" : "$1 subtitles"
 8+ "mwe-no_text_tracks_found" : "No text tracks were found"
109 })
1110 // text interface object (for inline display captions)
1211 var mvTextInterface = function( parentEmbed ){
@@ -86,7 +85,7 @@
8786 'category' : 'SUB',
8887 'lang' : langKey,
8988 'type' : mimeTypes[ extension ],
90 - 'title' : gM('mwe-subtitles', langData[ langKey]),
 89+ 'title' : langData[ langKey],
9190 'src' : wgServer + wgScript + '?title=' + subPage.title + '&action=raw'
9291 });
9392 _this.pe.media_element.tryAddSource( textElm );
Index: trunk/phase3/js2/remoteMwEmbed.js
@@ -17,7 +17,7 @@
1818 function doPageSpecificRewrite() {
1919 // Add media wizard
2020 if( wgAction == 'edit' || wgAction == 'submit' ) {
21 - load_mv_embed( function() {
 21+ load_mv_embed( function() {
2222 loadExternalJs( mwEmbedHostPath + '/editPage.js' + reqAguments );
2323 } );
2424 }
Index: trunk/phase3/js2/uploadPage.js
@@ -4,7 +4,6 @@
55 */
66
77 js2AddOnloadHook( function() {
8 - js_log("never ran js2hook");
98 mwUploadHelper.init();
109 });
1110

Status & tagging log