Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvFirefogg.js |
— | — | @@ -212,6 +212,12 @@ |
213 | 213 | var _this = this; |
214 | 214 | _this.fogg.encode( JSON.stringify( _this.encoder_settings ) ); |
215 | 215 | |
| 216 | + //show transcode status: |
| 217 | + $j('#fogg-status-transcode').show(); |
| 218 | + |
| 219 | + //hide the fogg-status-upload |
| 220 | + $j('#fogg-status-upload').hide(); |
| 221 | + |
216 | 222 | //setup a local function for timed callback: |
217 | 223 | var encodingStatus = function() { |
218 | 224 | var status = _this.fogg.status(); |
— | — | @@ -222,15 +228,7 @@ |
223 | 229 | //loop to get new status if still encoding |
224 | 230 | if( _this.fogg.state == 'encoding' ) { |
225 | 231 | setTimeout(encodingStatus, 500); |
226 | | - }else if ( _this.fogg.state == 'encoding done' ) { //encoding done, state can also be 'encoding failed' |
227 | | - //now call the upload function |
228 | | - |
229 | | - //hide the fogg-status-transcode |
230 | | - $j('#fogg-status-transcode').hide(); |
231 | | - |
232 | | - //show the fogg-status-upload |
233 | | - $j('#fogg-status-upload').show(); |
234 | | - |
| 232 | + }else if ( _this.fogg.state == 'encoding done' ) { //encoding done, state can also be 'encoding failed |
235 | 233 | // ignore warnings & set source type |
236 | 234 | //_this.formData[ 'wpIgnoreWarning' ]='true'; |
237 | 235 | _this.formData[ 'wpSourceType' ]='file'; |
— | — | @@ -255,6 +253,10 @@ |
256 | 254 | }, |
257 | 255 | doUploadStatus:function() { |
258 | 256 | var _this = this; |
| 257 | + //setup display for upload status: |
| 258 | + $j('#fogg-status-transcode').hide(); |
| 259 | + $j('#fogg-status-upload').show(); |
| 260 | + |
259 | 261 | _this.oldResponseText = ''; |
260 | 262 | //setup a local function for timed callback: |
261 | 263 | var uploadStatus = function(){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -328,8 +328,8 @@ |
329 | 329 | '<form id="rsd_form" action="javascript:return false;" method="GET">'+ |
330 | 330 | '<table style="width:100%;background-color:transparent;">' + |
331 | 331 | '<tr>'+ |
332 | | - '<td style="width:110px">'+ |
333 | | - '<h3> Media Search </h3>'+ |
| 332 | + '<td style="width:120px">'+ |
| 333 | + '<h3>' + gM('mv_media_search') +'</h3>'+ |
334 | 334 | '</td>'+ |
335 | 335 | '<td style="width:190px">'+ |
336 | 336 | '<input type="text" tabindex="1" value="' + dq + '" maxlength="512" id="rsd_q" name="rsd_q" '+ |
— | — | @@ -1253,10 +1253,11 @@ |
1254 | 1254 | var about_desc =''; |
1255 | 1255 | if( this.content_providers[this.disp_item] ){ |
1256 | 1256 | var cp = this.content_providers[this.disp_item]; |
1257 | | - about_desc ='<div style="position:absolute;bottom:0px;left:5px;"><i>About <a href="'+ cp.homepage + '" target="_new" >'+ cp.title +'</a> </i></div>'; |
| 1257 | + about_desc ='<span style="position:relative;top:0px;font-style:italic;">' + |
| 1258 | + ' <i> Results From <a href="'+ cp.homepage + '" target="_new" >'+ cp.title +'</a> </i></span>'; |
1258 | 1259 | } |
1259 | | - $j('#rsd_results').append( about_desc + '<div id="rds_results_bar">'+ |
1260 | | - '<span style="position:relative;top:-5px;font-style:italic;">'+ |
| 1260 | + $j('#rsd_results').append( '<div id="rds_results_bar">'+ |
| 1261 | + '<span style="position:relative;top:0px;font-style:italic;">'+ |
1261 | 1262 | gM('rsd_layout')+' '+ |
1262 | 1263 | '</span>'+ |
1263 | 1264 | '<img id="msc_box_layout" ' + |
— | — | @@ -1267,7 +1268,8 @@ |
1268 | 1269 | 'title = "' + gM('rsd_list_layout') + '" '+ |
1269 | 1270 | 'src = "' + ( (_this.result_display_mode=='list')?list_dark_url:list_light_url ) + '" '+ |
1270 | 1271 | 'style="width:20px;height:20px;cursor:pointer;">'+ |
1271 | | - '<span id="rsd_paging_ctrl" style="position:absolute;right:5px;"></span>'+ |
| 1272 | + '<span id="rsd_paging_ctrl" style="position:absolute;right:5px;top:5px;"></span>'+ |
| 1273 | + about_desc + |
1272 | 1274 | '</div>' |
1273 | 1275 | ); |
1274 | 1276 | //get paging with bindings: |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvUploader.js |
— | — | @@ -259,13 +259,13 @@ |
260 | 260 | _this.doUploadSwitch(); |
261 | 261 | } |
262 | 262 | }, |
263 | | - doUploadSwitch:function(){ |
| 263 | + doUploadSwitch:function(){ |
264 | 264 | js_log('mvUPload:doUploadSwitch()'); |
265 | 265 | var _this = this; |
266 | 266 | //issue a normal post request |
267 | | - if( _this.upload_mode == 'post' || $j('#wpSourceTypeFile').get(0).checked ){ |
| 267 | + if( _this.upload_mode == 'post' || $j('#wpSourceTypeFile').get(0).checked ){ |
268 | 268 | //update the status |
269 | | - $j('#dlbox-centered').html('<h5>' + _this.getProgressTitle() + '</h5>' + |
| 269 | + $j('#dlbox-centered').html( '<h5>' + _this.getProgressTitle() + '</h5>' + |
270 | 270 | mv_get_loading_img( 'left:40%;top:20%') |
271 | 271 | ); |
272 | 272 | |
— | — | @@ -275,7 +275,7 @@ |
276 | 276 | $j(_this.editForm).append('<input type="hidden" name="wpUpload" value="' + $j('#wpUpload').val() + '"/>'); |
277 | 277 | //do the submit : |
278 | 278 | _this.editForm.submit(); |
279 | | - }else if( _this.upload_mode == 'api' && $j('#wpSourceTypeURL').get(0).checked){ |
| 279 | + }else if( _this.upload_mode == 'api' && $j('#wpSourceTypeURL').get(0).checked){ |
280 | 280 | //if the api is supported.. && source type is http do upload with http status updates |
281 | 281 | _this.doHttpUpload(); |
282 | 282 | }else{ |
— | — | @@ -283,15 +283,21 @@ |
284 | 284 | } |
285 | 285 | }, |
286 | 286 | doHttpUpload:function(){ |
| 287 | + var _this = this; |
287 | 288 | //build the api query: |
288 | | - js_log('do doHttpUpload upload!'); |
289 | | - |
290 | | - /*do_api_req( { |
291 | | - 'data':{ 'action':'upload','modules':'upload' }, |
292 | | - 'url':_this.api_url |
293 | | - }, function(data){ |
294 | | - js_log('result data:') |
295 | | - }); */ |
| 289 | + js_log('do doHttpUpload upload!'); |
| 290 | + do_api_req({ |
| 291 | + 'data':{ |
| 292 | + 'action' : 'upload', |
| 293 | + 'url' : $j('#wpUploadFileURL').val(), |
| 294 | + 'filename' : $j('#wpDestFile').val(), |
| 295 | + 'comment' : $j('#wpUploadDescription').val(), |
| 296 | + }, |
| 297 | + 'url' : _this.api_url |
| 298 | + }, function( data ){ |
| 299 | + js_log('result data got:'); |
| 300 | + //start a timmed updates |
| 301 | + }); |
296 | 302 | }, |
297 | 303 | getProgressTitle:function(){ |
298 | 304 | return gM('upload-in-progress'); |
— | — | @@ -311,9 +317,9 @@ |
312 | 318 | '<div id="fogg-pbar-container" style="border:solid thin gray;width:90%;height:15px;" >' + |
313 | 319 | '<div id="fogg-progressbar" style="background:#AAC;width:0%;height:15px;"></div>' + |
314 | 320 | '</div>' + |
315 | | - '<span id="fogg-pstatus">0%</span>' + |
316 | | - '<span id="fogg-status-transcode">' + gM('upload-transcoded-status') + '</span>'+ |
317 | | - '<span style="display:none" id="fogg-status-upload">' + gM('uploaded-status') + '</span>' + |
| 321 | + '<span id="fogg-pstatus">0% </span>' + |
| 322 | + '<span style="display:none" id="fogg-status-transcode">' + gM('upload-transcoded-status') + '</span>'+ |
| 323 | + '<span id="fogg-status-upload">' + gM('uploaded-status') + '</span>' + |
318 | 324 | '</div>' + |
319 | 325 | '<div id="dlbox-overlay" class="dlbox-overlay" style="background:#000;cursor:wait;height:100%;'+ |
320 | 326 | 'left:0;top:0;position:fixed;width:100%;z-index:99;filter:alpha(opacity=60);'+ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -718,28 +718,27 @@ |
719 | 719 | |
720 | 720 | //does a remote or local api request based on request url |
721 | 721 | //@param options: url, data, cbParam, callback |
722 | | -function do_api_req( options, callback ){ |
723 | | - if(typeof options.data != 'object'){ |
724 | | - js_log('Error: request paramaters must be an object'); |
725 | | - return false; |
| 722 | +function do_api_req( options, callback ){ |
| 723 | + if(typeof options.data != 'object'){ |
| 724 | + return js_error('Error: request paramaters must be an object');; |
726 | 725 | } |
| 726 | + //gennerate the url if its missing: |
727 | 727 | if( typeof options.url == 'undefined' ){ |
728 | | - if(!wgServer || ! wgScriptPath){ |
729 | | - js_log('Error: no api url'); |
730 | | - return false; |
| 728 | + if(!wgServer || ! wgScriptPath){ |
| 729 | + return js_error('Error: no api url for api request');; |
731 | 730 | } |
732 | 731 | if (wgServer && wgScript) |
733 | 732 | options.url = wgServer + wgScript; |
734 | 733 | //update to api.php (if index.php was in the wgScript path): |
735 | 734 | options.url = options.url.replace(/index.php/, 'api.php'); |
736 | 735 | } |
737 | | - if(typeof options.data == 'undefined') |
| 736 | + if( typeof options.data == 'undefined' ) |
738 | 737 | options.data = {}; |
739 | 738 | |
740 | 739 | //force format to json (if not already set) |
741 | 740 | options.data['format'] = 'json'; |
742 | 741 | |
743 | | - js_log('do api req: ' + options.url +' data' + options.data ); |
| 742 | + js_log('do api req: ' + options.url +'?' + jQuery.param(options.data) ); |
744 | 743 | //build request string: |
745 | 744 | if( parseUri( document.URL ).host == parseUri( options.url ).host ){ |
746 | 745 | //local request do api request directly |
— | — | @@ -749,7 +748,7 @@ |
750 | 749 | data: options.data, |
751 | 750 | dataType:'json', //api requests _should_ always return JSON data: |
752 | 751 | async: false, |
753 | | - success:function(data){ |
| 752 | + success:function(data){ |
754 | 753 | callback( data ); |
755 | 754 | }, |
756 | 755 | error:function(e){ |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_baseEmbed.js |
— | — | @@ -2364,21 +2364,22 @@ |
2365 | 2365 | || typeof HTMLVideoElement == 'function' ) // Opera |
2366 | 2366 | { |
2367 | 2367 | //do another test for safari: |
2368 | | - if( this.safari ){ |
2369 | | - /*var dummyvid = document.createElement("video"); |
| 2368 | + if( this.safari ){ |
2370 | 2369 | try{ |
| 2370 | + var dummyvid = document.createElement("video"); |
2371 | 2371 | if (dummyvid.canPlayType("video/ogg;codecs=\"theora,vorbis\"") == "probably") |
2372 | 2372 | { |
2373 | 2373 | this.players.addPlayer( videoElementPlayer ); |
2374 | 2374 | } else { |
2375 | | - could add some user nagging to install the xiph qt |
| 2375 | + //@@todo add some user nagging to install the xiph qt |
2376 | 2376 | } |
2377 | | - }*/ |
| 2377 | + }catch(e){ |
| 2378 | + js_log('could not run canPlayType in safari'); |
| 2379 | + } |
2378 | 2380 | }else{ |
2379 | 2381 | this.players.addPlayer( videoElementPlayer ); |
2380 | 2382 | } |
2381 | | - } |
2382 | | - |
| 2383 | + } |
2383 | 2384 | |
2384 | 2385 | // Mozilla plugins |
2385 | 2386 | if( navigator.mimeTypes && navigator.mimeTypes.length > 0) { |