Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js |
— | — | @@ -8,7 +8,8 @@ |
9 | 9 | "fogg-save_local_file" : "Save Ogg", |
10 | 10 | "fogg-check_for_fogg" : "Checking for Firefogg <blink>...</blink>", |
11 | 11 | "fogg-installed" : "Firefogg is Installed", |
12 | | - "fogg-please_install" : "You don't have firefogg installed, For improved uploads please <a href=\"$1\">install firefogg</a> more <a href=\"http://commons.wikimedia.org/wiki/Commons:Firefogg\">about firefogg</a>", |
| 12 | + "fogg-for_improved_uplods" : "For Improved uploads: ", |
| 13 | + "fogg-please_install" : "<a href=\"$1\">Install Firefogg</a>. More <a href=\"http://commons.wikimedia.org/wiki/Commons:Firefogg\">about firefogg</a>", |
13 | 14 | "fogg-use_latest_fox" : "Please first install <a href=\"http://www.mozilla.com/en-US/firefox/all-beta.html\">Firefox 3.5</a>. <i>then revisit this page to install the <b>firefogg</b> extention</i>", |
14 | 15 | "fogg-passthrough_mode" : "Your selected file is already ogg or not a video file", |
15 | 16 | "fogg-transcoding" : "Encoding Video to Ogg", |
— | — | @@ -108,7 +109,7 @@ |
109 | 110 | if( $j(this.selector).length >=0 ){ |
110 | 111 | |
111 | 112 | if( $j(this.selector).get(0).tagName.toLowerCase() == 'input' ){ |
112 | | - _this.form_rewrite = true; |
| 113 | + _this.form_rewrite = true; |
113 | 114 | } |
114 | 115 | } |
115 | 116 | //check if we are rewriting an input or a form: |
— | — | @@ -158,20 +159,20 @@ |
159 | 160 | hide_target_list+=coma + _this[target]; |
160 | 161 | coma=','; |
161 | 162 | } |
162 | | - }); |
163 | | - |
164 | | - $j( hide_target_list ).hide(); |
165 | | - |
| 163 | + }); |
| 164 | + $j( hide_target_list ).hide(); |
166 | 165 | //now that the proper set of items has been hiiden show: |
167 | 166 | $j( this.selector ).show(); |
168 | | - |
169 | | - //if rewriting the form lets keep the text input around: |
170 | | - if( _this.form_rewrite ) |
171 | | - $j(this.target_input_file_name).show(); |
| 167 | + |
172 | 168 | |
173 | 169 | //hide all but check-for-fogg |
174 | 170 | //check for firefogg |
175 | 171 | if( _this.firefoggCheck() ){ |
| 172 | + |
| 173 | + //if rewriting the form lets keep the text input around: |
| 174 | + if( _this.form_rewrite ) |
| 175 | + $j(this.target_input_file_name).show(); |
| 176 | + |
176 | 177 | //show select file: |
177 | 178 | $j(this.target_btn_select_file).unbind( |
178 | 179 | ).attr('disabled', false |
— | — | @@ -188,8 +189,12 @@ |
189 | 190 | //first check firefox version: |
190 | 191 | if(!($j.browser.mozilla && $j.browser.version >= '1.9.1')) { |
191 | 192 | js_log('show use latest::' + _this.target_use_latest_fox); |
192 | | - if(_this.target_use_latest_fox) |
| 193 | + if(_this.target_use_latest_fox){ |
| 194 | + if(_this.form_rewrite) |
| 195 | + $j(_this.target_use_latest_fox).prepend( gM('fogg-for_improved_uplods') ); |
| 196 | + |
193 | 197 | $j(_this.target_use_latest_fox).show(); |
| 198 | + } |
194 | 199 | return ; |
195 | 200 | } |
196 | 201 | //if they have the right version of mozilla provide install link: |
— | — | @@ -201,8 +206,10 @@ |
202 | 207 | os_link = firefogg_install_links['macosx']; |
203 | 208 | else if(navigator.oscpu.search('Win') >= 0) |
204 | 209 | os_link = firefogg_install_links['win32']; |
205 | | - } |
206 | | - $j(_this.target_please_install).html( gM('fogg-please_install',os_link )).css('padding', '10px').show(); |
| 210 | + } |
| 211 | + //if rewriting form use upload msg text |
| 212 | + var upMsg = (_this.form_rewrite) ? gM('fogg-for_improved_uplods') : ''; |
| 213 | + $j(_this.target_please_install).html( upMsg + gM('fogg-please_install',os_link )).css('padding', '10px').show(); |
207 | 214 | } |
208 | 215 | //setup the target save local file bindins: |
209 | 216 | $j( _this.target_btn_save_local_file ).unbind().click(function(){ |
— | — | @@ -252,7 +259,8 @@ |
253 | 260 | inTag += attr.name + '="' + val + '" '; |
254 | 261 | }); |
255 | 262 | if(!$j(this.selector).attr('style')) |
256 | | - inTag += 'style="display:inline" '; |
| 263 | + inTag += 'style="display:inline" '; |
| 264 | + |
257 | 265 | inTag+= '/><span id="' + $j(this.selector).attr('name') + '_fogg-control"></span>'; |
258 | 266 | |
259 | 267 | js_log('set input: ' + inTag); |