Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js |
— | — | @@ -292,8 +292,10 @@ |
293 | 293 | this.doControlBindings(); |
294 | 294 | }, |
295 | 295 | getEditForm:function(){ |
296 | | - js_log('get form: action=' + $j(this.selector).parents().find("form").attr('action')); |
297 | | - return $j(this.selector).parents().find("form").get(0); |
| 296 | + if( this.target_edit_from ) |
| 297 | + return this.pe_getEditForm(); |
| 298 | + //else try to get the parent "from" of the file selector: |
| 299 | + return $j(this.selector).parents('form:first').get(0); |
298 | 300 | }, |
299 | 301 | selectFogg:function(){ |
300 | 302 | var _this = this; |
— | — | @@ -413,7 +415,7 @@ |
414 | 416 | }, |
415 | 417 | doUploadSwitch:function(){ |
416 | 418 | var _this = this; |
417 | | - js_log("firefogg: doUploadSwitch:: " + this.fogg_enabled); |
| 419 | + js_log("firefogg: doUploadSwitch:: " + this.fogg_enabled + ' up mode:' + _this.upload_mode); |
418 | 420 | //make sure firefogg is enabled otherwise do parent UploadSwich: |
419 | 421 | if( !this.fogg_enabled || !this.firefogg_form_action ) |
420 | 422 | return _this.pe_doUploadSwitch(); |
— | — | @@ -429,9 +431,9 @@ |
430 | 432 | }, |
431 | 433 | //doChunkUpload does both uploading and encoding at the same time and uploads one meg chunks as they are ready |
432 | 434 | doChunkUpload : function(){ |
| 435 | + js_log('doChunkUpload::'); |
433 | 436 | var _this = this; |
434 | | - _this.action_done = false; |
435 | | - |
| 437 | + _this.action_done = false; |
436 | 438 | //extension should already be ogg but since its user editable, |
437 | 439 | //check again |
438 | 440 | //we are transcoding so we know it will be an ogg |
— | — | @@ -449,17 +451,17 @@ |
450 | 452 | |
451 | 453 | //build the api url: |
452 | 454 | var aReq ={ |
453 | | - 'action' : 'upload', |
454 | | - 'format' : 'json', |
455 | | - 'filename' : _this.formData['wpDestFile'], |
456 | | - 'comment' : _this.formData['wpUploadDescription'], |
457 | | - 'enablechunks': true |
| 455 | + 'action' : 'upload', |
| 456 | + 'format' : 'json', |
| 457 | + 'filename' : _this.formData['wpDestFile'], |
| 458 | + 'comment' : _this.formData['wpUploadDescription'], |
| 459 | + 'enablechunks' : 'true' |
458 | 460 | }; |
459 | 461 | //check for editToken: |
460 | 462 | if(!this.etoken) |
461 | 463 | this.etoken = _this.formData['wpEditToken']; |
462 | 464 | |
463 | | - if(this.etoken) |
| 465 | + if( this.etoken ) |
464 | 466 | aReq['token'] = this.etoken; |
465 | 467 | |
466 | 468 | if( _this.formData['wpWatchthis'] ) |
— | — | @@ -634,7 +636,7 @@ |
635 | 637 | var sstring = 'var wgTitle = "' + this.formData['wpDestFile'].replace('_',' '); |
636 | 638 | |
637 | 639 | if(wgArticlePath){ |
638 | | - var result_txt = gM('mv_upload_done', wgArticlePath.replace(/\$1/, 'File:' + this.formData['wpDestFile'] ) ); |
| 640 | + var result_txt = gM('mv_upload_done', wgArticlePath.replace(/\$1/, 'File:' + _this.formData['wpDestFile'] ) ); |
639 | 641 | }else{ |
640 | 642 | result_txt = 'File has uploaded but api "done" url was provided. Check the log for result page output'; |
641 | 643 | } |
— | — | @@ -646,7 +648,7 @@ |
647 | 649 | js_log( 'upload done got redirect found: ' + sstring + ' r:' + _this.upload_done_action ); |
648 | 650 | if( _this.upload_done_action == 'redirect' ){ |
649 | 651 | $j( '#dlbox-centered' ).html( '<h3>Upload Completed:</h3>' + result_txt + '<br>' + form_txt); |
650 | | - window.location = wgArticlePath.replace( /\$1/, 'File:' + formData['wpDestFile'] ); |
| 652 | + window.location = wgArticlePath.replace( /\$1/, 'File:' + _this.formData['wpDestFile'] ); |
651 | 653 | }else{ |
652 | 654 | //check if the add_done_action is a callback: |
653 | 655 | if( typeof _this.upload_done_action == 'function' ) |
Index: trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js |
— | — | @@ -160,7 +160,7 @@ |
161 | 161 | //ie8 does not play well with the jQuery video,audio,playlist selector use native: |
162 | 162 | if($j.browser.msie && $j.browser.version >= 8){ |
163 | 163 | jtags = j_selector.split(','); |
164 | | - for(var i=0;i<jtags.length;i++){ |
| 164 | + for( var i=0; i < jtags.length; i++){ |
165 | 165 | $j( document.getElementsByTagName( jtags[i] )).each(function(){ |
166 | 166 | eAction(this); |
167 | 167 | }); |
— | — | @@ -2094,12 +2094,11 @@ |
2095 | 2095 | return false; |
2096 | 2096 | }); |
2097 | 2097 | }); |
2098 | | - }, |
2099 | | - /*download list is too complicated ... rewrite for clarity: */ |
| 2098 | + }, |
2100 | 2099 | showVideoDownload:function(){ |
2101 | 2100 | //load the roe if available (to populate out download options: |
2102 | 2101 | //js_log('f:showVideoDownload '+ this.roe + ' ' + this.media_element.addedROEData); |
2103 | | - if(this.roe && this.media_element.addedROEData==false){ |
| 2102 | + if(this.roe && this.media_element.addedROEData == false){ |
2104 | 2103 | var _this = this; |
2105 | 2104 | this.displayHTML(gM('loading_txt')); |
2106 | 2105 | do_request(this.roe, function(data) |
Index: trunk/phase3/js2/uploadPage.js |
— | — | @@ -89,7 +89,6 @@ |
90 | 90 | }, |
91 | 91 | /** |
92 | 92 | * doDestCheck checks the destination |
93 | | - * @@todo we should be able to configure its "targets" via parent config |
94 | 93 | */ |
95 | 94 | doDestCheck:function(){ |
96 | 95 | var _this = this; |
— | — | @@ -135,7 +134,7 @@ |
136 | 135 | '<div class="magnify">' + |
137 | 136 | '<a title="' + gM('thumbnail-more') + '" class="internal" ' + |
138 | 137 | 'href="' + img.descriptionurl +'"><img width="15" height="11" alt="" ' + |
139 | | - 'src="' + stylepath +"/>" + |
| 138 | + 'src="' + stylepath + "/common/images/magnify-clip.png\" />" + |
140 | 139 | '</a>'+ |
141 | 140 | '</div>'+ |
142 | 141 | gM('fileexists-thumb') + |
— | — | @@ -151,7 +150,6 @@ |
152 | 151 | }, |
153 | 152 | /** |
154 | 153 | * doDestinationFill fills in a destination file-name based on a source asset name. |
155 | | - * @@todo we should be able to configure its "targets" via parent config |
156 | 154 | */ |
157 | 155 | doDestinationFill:function( targetElm ){ |
158 | 156 | js_log("doDestinationFill") |