Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.Firefogg.js |
— | — | @@ -906,7 +906,7 @@ |
907 | 907 | */ |
908 | 908 | doChunkUploadWithFormData: function() { |
909 | 909 | var _this = this; |
910 | | - mw.log( "firefogg::doChunkUploadWithFormData" + _this.editToken ); |
| 910 | + mw.log( "firefogg::doChunkUploadWithFormData: " + _this.editToken ); |
911 | 911 | // Build the API URL |
912 | 912 | var aReq = { |
913 | 913 | 'action': 'upload', |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.BaseUploadInterface.js |
— | — | @@ -90,7 +90,7 @@ |
91 | 91 | if ( typeof( this.orig_onsubmit ) == 'undefined' && this.form.onsubmit ) { |
92 | 92 | this.orig_onsubmit = this.form.onsubmit; |
93 | 93 | } |
94 | | - |
| 94 | + |
95 | 95 | // Set up the submit action: |
96 | 96 | $j( this.form ).submit( function() { |
97 | 97 | return _this.onSubmit(); |
— | — | @@ -121,9 +121,16 @@ |
122 | 122 | var data = $j( this.form ).serializeArray(); |
123 | 123 | this.formData = {}; |
124 | 124 | for ( var i = 0; i < data.length; i++ ) { |
125 | | - if ( data[i]['name'] ) |
126 | | - this.formData[ data[i]['name'] ] = data[i]['value']; |
127 | | - } |
| 125 | + if ( data[i]['name'] ){ |
| 126 | + // Special case of upload.js commons hack: |
| 127 | + if( data[i]['name'] == 'wpUploadDescription' ){ |
| 128 | + this.formData[ 'comment' ] = data[i]['value']; |
| 129 | + }else{ |
| 130 | + this.formData[ data[i]['name'] ] = data[i]['value']; |
| 131 | + } |
| 132 | + } |
| 133 | + } |
| 134 | + |
128 | 135 | // Put into a try catch so we are sure to return false: |
129 | 136 | try { |
130 | 137 | |
— | — | @@ -319,10 +326,17 @@ |
320 | 327 | doApiCopyUpload: function() { |
321 | 328 | mw.log( 'mvBaseUploadInterface.doApiCopyUpload' ); |
322 | 329 | mw.log( 'doHttpUpload (no form submit) ' ); |
| 330 | + |
| 331 | + //Special case of upload.js commons hack: |
| 332 | + var comment_value = $j( '#wpUploadDescription' ).val(); |
| 333 | + if( comment_value == '' ){ |
| 334 | + comment_value = $j( "[name='wpUploadDescription']").val(); |
| 335 | + } |
| 336 | + |
323 | 337 | var httpUpConf = { |
324 | 338 | 'url' : $j( '#wpUploadFileURL' ).val(), |
325 | 339 | 'filename' : $j( '#wpDestFile' ).val(), |
326 | | - 'comment' : $j( '#wpUploadDescription' ).val(), |
| 340 | + 'comment' : comment_value, |
327 | 341 | 'watch' : ( $j( '#wpWatchthis' ).is( ':checked' ) ) ? 'true' : 'false', |
328 | 342 | 'ignorewarnings': ($j('#wpIgnoreWarning' ).is( ':checked' ) ) ? 'true' : 'false' |
329 | 343 | } |
Index: branches/js2-work/phase3/js/mwEmbed/remotes/mediaWiki.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | */ |
6 | 6 | var urlparts = getRemoteEmbedPath(); |
7 | 7 | var mwEmbedHostPath = urlparts[0]; |
8 | | -var mwRemoteVersion = 'r73'; |
| 8 | +var mwRemoteVersion = 'r74'; |
9 | 9 | var mwUseScriptLoader = true; |
10 | 10 | |
11 | 11 | // Setup up request Params: |
— | — | @@ -115,7 +115,7 @@ |
116 | 116 | } |
117 | 117 | } |
118 | 118 | if ( vidIdList.length > 0 ) { |
119 | | - // Reverse order the array so videos at the "top" get swaped first: |
| 119 | + // Reverse order the array so videos at the "top" get swapped first: |
120 | 120 | vidIdList = vidIdList.reverse(); |
121 | 121 | mwLoadPlayer(function(){ |
122 | 122 | //Load the "EmbedPlayer" module: |