Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | //hide all targets: |
184 | 184 | var hide_target_list=''; |
185 | 185 | var coma=''; |
186 | | - $j.each(default_firefogg_options, function(target, na){ |
| 186 | + $j.each( default_firefogg_options, function(target, na) { |
187 | 187 | if(target.substring(0, 6)=='target'){ |
188 | 188 | hide_target_list+=coma + _this[target]; |
189 | 189 | coma=','; |
— | — | @@ -190,7 +190,7 @@ |
191 | 191 | }); |
192 | 192 | $j( hide_target_list ).hide(); |
193 | 193 | //now that the proper set of items has been hiiden show: |
194 | | - $j( this.selector ).show(); |
| 194 | + $j( _this.selector ).show(); |
195 | 195 | |
196 | 196 | |
197 | 197 | //hide all but check-for-fogg |
— | — | @@ -199,7 +199,7 @@ |
200 | 200 | |
201 | 201 | //if rewriting the form lets keep the text input around: |
202 | 202 | if( _this.form_rewrite ) |
203 | | - $j(this.target_input_file_name).show(); |
| 203 | + $j( _this.target_input_file_name ).show(); |
204 | 204 | |
205 | 205 | //show select file: |
206 | 206 | $j( this.target_btn_select_file ).unbind( |
— | — | @@ -547,7 +547,7 @@ |
548 | 548 | return gM('mwe-upload-transcode-in-progress'); |
549 | 549 | }, |
550 | 550 | doUploadSwitch:function(){ |
551 | | - var _this = this; |
| 551 | + var _this = this; |
552 | 552 | js_log("firefogg: doUploadSwitch:: " + this.fogg_enabled + ' up mode:' + _this.upload_mode); |
553 | 553 | //make sure firefogg is enabled otherwise do parent UploadSwich: |
554 | 554 | if( !this.fogg_enabled || !this.firefogg_form_action ) |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js |
— | — | @@ -62,24 +62,26 @@ |
63 | 63 | js_log( "init mvBaseUploadInterface:: " + this.api_url); |
64 | 64 | }, |
65 | 65 | setupForm:function(){ |
| 66 | + js_log("Base::setupForm::"); |
66 | 67 | var _this = this; |
67 | 68 | //set up the local pointer to the edit form: |
68 | | - _this.editForm = _this.getEditForm(); |
| 69 | + _this.editForm = _this.getEditForm(); |
69 | 70 | if( _this.editForm ){ |
70 | | - |
| 71 | + |
71 | 72 | //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'){ |
73 | 74 | _this.doRemapFormToApi(); |
74 | | - } |
| 75 | + } |
75 | 76 | |
76 | 77 | //set up the org_onsubmit if not set: |
77 | 78 | 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 | + |
80 | 82 | //set up the submit action: |
81 | 83 | $j( _this.editForm ).submit( function(){ |
82 | 84 | js_log('setupForm.onSubmit:'); |
83 | | - |
| 85 | + |
84 | 86 | //set the upload mode: |
85 | 87 | _this.setWgUploadSelect(); |
86 | 88 | |
— | — | @@ -104,6 +106,7 @@ |
105 | 107 | } |
106 | 108 | //put into a try catch so we are sure to return false: |
107 | 109 | try{ |
| 110 | + debugger; |
108 | 111 | //get a clean loader: |
109 | 112 | _this.dispProgressOverlay(); |
110 | 113 | |
— | — | @@ -119,8 +122,10 @@ |
120 | 123 | //don't submit the form we will do the post in ajax |
121 | 124 | return false; |
122 | 125 | }); |
123 | | - } |
124 | | - |
| 126 | + } |
| 127 | + $j('#testcat').click(function(){ |
| 128 | + $j( _this.editForm ).submit(); |
| 129 | + }); |
125 | 130 | }, |
126 | 131 | detectUploadMode:function( callback ){ |
127 | 132 | var _this = this; |
— | — | @@ -167,7 +172,7 @@ |
168 | 173 | return false; |
169 | 174 | |
170 | 175 | //add the action api |
171 | | - $j(_this.editForm).attr('action', _this.api_url); |
| 176 | + //$j(_this.editForm).attr('action', _this.api_url); |
172 | 177 | |
173 | 178 | //add api url |
174 | 179 | //add api action: |
— | — | @@ -185,15 +190,12 @@ |
186 | 191 | $j(_this.editForm).find("[name='wpEditToken']").attr('name', 'token'); |
187 | 192 | $j(_this.editForm).find("[name='wpIgnoreWarning']").attr('name', 'ignorewarnings'); |
188 | 193 | $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 | + |
193 | 195 | }, |
194 | 196 | setWgUploadSelect: function(){ |
195 | 197 | if( $j('#wpSourceTypeFile').length == 0 || $j('#wpSourceTypeFile').get(0).checked ){ |
196 | 198 | this.http_copy_upload = false; |
197 | | - }else if( $j('#wpSourceTypeURL').get(0).checked ){ |
| 199 | + }else if( $j('#wpSourceTypeUrl').get(0).checked ){ |
198 | 200 | this.http_copy_upload = true; |
199 | 201 | } |
200 | 202 | }, |
— | — | @@ -242,7 +244,6 @@ |
243 | 245 | return false; |
244 | 246 | }else if( _this.upload_mode == 'api' ){ |
245 | 247 | js_log('doHttpUpload (no form submit) '); |
246 | | - |
247 | 248 | //if the api is supported.. && source type is http do upload with http status updates |
248 | 249 | var httpUpConf ={ |
249 | 250 | 'url' : $j('#wpUploadFileURL').val(), |
Index: trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js |
— | — | @@ -1,11 +1,10 @@ |
2 | 2 | |
3 | 3 | loadGM({ |
4 | | - "mwe-select_transcript_set" : "Select layers", |
| 4 | + "mwe-select_transcript_set" : "Select subtitles", |
5 | 5 | "mwe-auto_scroll" : "auto scroll", |
6 | 6 | "mwe-close" : "close", |
7 | 7 | "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" |
10 | 9 | }) |
11 | 10 | // text interface object (for inline display captions) |
12 | 11 | var mvTextInterface = function( parentEmbed ){ |
— | — | @@ -86,7 +85,7 @@ |
87 | 86 | 'category' : 'SUB', |
88 | 87 | 'lang' : langKey, |
89 | 88 | 'type' : mimeTypes[ extension ], |
90 | | - 'title' : gM('mwe-subtitles', langData[ langKey]), |
| 89 | + 'title' : langData[ langKey], |
91 | 90 | 'src' : wgServer + wgScript + '?title=' + subPage.title + '&action=raw' |
92 | 91 | }); |
93 | 92 | _this.pe.media_element.tryAddSource( textElm ); |
Index: trunk/phase3/js2/remoteMwEmbed.js |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | function doPageSpecificRewrite() { |
19 | 19 | // Add media wizard |
20 | 20 | if( wgAction == 'edit' || wgAction == 'submit' ) { |
21 | | - load_mv_embed( function() { |
| 21 | + load_mv_embed( function() { |
22 | 22 | loadExternalJs( mwEmbedHostPath + '/editPage.js' + reqAguments ); |
23 | 23 | } ); |
24 | 24 | } |
Index: trunk/phase3/js2/uploadPage.js |
— | — | @@ -4,7 +4,6 @@ |
5 | 5 | */ |
6 | 6 | |
7 | 7 | js2AddOnloadHook( function() { |
8 | | - js_log("never ran js2hook"); |
9 | 8 | mwUploadHelper.init(); |
10 | 9 | }); |
11 | 10 | |