r51436 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51435‎ | r51436 | r51437 >
Date:20:57, 3 June 2009
Author:dale
Status:deferred
Tags:
Comment:
fixes to IE 7 out of order script execution (we don't request dependent scripts in parallel for IE)
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/jquery/jquery.ui-1.7.1/ui/ui.slider.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/mv_javaEmbed.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/mv_embed.js (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/jquery/jquery.ui-1.7.1/ui/ui.slider.js
@@ -530,3 +530,4 @@
531531 });
532532
533533 })(jQuery);
 534+
Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js
@@ -3,16 +3,16 @@
44 */
55
66 loadGM({
7 - 'fogg-select_file' : 'Select File',
8 - 'fogg-select_new_file' : 'Select New File',
9 - 'fogg-save_local_file' : 'Save Ogg',
10 - 'fogg-check_for_fogg' : 'Checking for Firefogg <blink>...</blink>',
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>',
13 - '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 - 'fogg-passthrough_mode' : 'Your selected file is already ogg or not a video file',
15 - 'fogg-transcoding' : 'Encoding Video to Ogg',
16 - 'fogg-encoding-done' : 'Encoding Done'
 7+ "fogg-select_file" : "Select File",
 8+ "fogg-select_new_file" : "Select New File",
 9+ "fogg-save_local_file" : "Save Ogg",
 10+ "fogg-check_for_fogg" : "Checking for Firefogg <blink>...</blink>",
 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>",
 13+ "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+ "fogg-passthrough_mode" : "Your selected file is already ogg or not a video file",
 15+ "fogg-transcoding" : "Encoding Video to Ogg",
 16+ "fogg-encoding-done" : "Encoding Done"
1717 });
1818
1919 var firefogg_install_links = {
Index: branches/new-upload/phase3/js2/mwEmbed/mv_embed.js
@@ -368,8 +368,9 @@
369369 */
370370 jQueryCheck:function(callback){
371371 var _this = this;
 372+ //load jquery
372373 _this.doLoad({
373 - 'window.jQuery' :'jquery/jquery-1.3.2.js'
 374+ 'window.jQuery' :'jquery/jquery-1.3.2.js'
374375 },function(){
375376 _global['$j'] = jQuery.noConflict();
376377 //set up ajax to not send dynamic urls for loading scripts (we control that with the scriptLoader)
@@ -389,19 +390,36 @@
390391 var _this = this;
391392 //issue a style sheet request get both mv_embed and jquery styles:
392393 loadExternalCss( mv_jquery_skin_path + 'jquery-ui-1.7.1.custom.css' );
393 - loadExternalCss( mv_embed_path + 'skins/'+mv_skin_name+'/styles.css');
394 - //make sure we have jQuery
 394+ loadExternalCss( mv_embed_path + 'skins/'+mv_skin_name+'/styles.css');
 395+
 396+ //make sure we have jQuery
395397 _this.jQueryCheck(function(){
396 - _this.doLoad({
397 - 'embedVideo' : 'libEmbedVideo/mv_baseEmbed.js',
398 - '$j.ui' : 'jquery/' + jQueryUiVN + '/ui/ui.core.js',
399 - '$j.cookie' : 'jquery/' + jQueryUiVN + '/external/cookie/jquery.cookie.js',
400 - '$j.ui.slider' : 'jquery/' + jQueryUiVN + '/ui/ui.slider.js'
401 - },function(){
402 - //set up embedTypes (load from cookie if possible)
403 - embedTypes.init();
404 - js_log('embedVideo libs ready run callback:: ');
405 - callback();
 398+ baseReq = {
 399+ '$j.ui' : 'jquery/' + jQueryUiVN + '/ui/ui.core.js',
 400+ 'embedVideo' : 'libEmbedVideo/mv_baseEmbed.js',
 401+ '$j.cookie' : 'jquery/' + jQueryUiVN + '/external/cookie/jquery.cookie.js'
 402+ };
 403+ //IE loads things out of order running j.slider before j.ui is ready
 404+ //load ui depenent scripts in a second request:
 405+ if($j.browser.msie){
 406+ secReq = {
 407+ '$j.ui.slider' : 'jquery/' + jQueryUiVN + '/ui/ui.slider.js'
 408+ }
 409+ }else{
 410+ secReq = false;
 411+ baseReq['$j.ui.slider'] = 'jquery/' + jQueryUiVN + '/ui/ui.slider.js';
 412+ }
 413+ _this.doLoad(baseReq,function(){
 414+ if(!secReq){
 415+ embedTypes.init();
 416+ callback();
 417+ }else{
 418+ //else IE load in stage:
 419+ _this.doLoad(secReq,function(){
 420+ embedTypes.init();
 421+ callback();
 422+ });
 423+ }
406424 });
407425 });
408426 },
@@ -1100,7 +1118,7 @@
11011119 /*
11021120 * IE and non-firebug debug:
11031121 */
1104 - /*var log_elm = document.getElementById('mv_js_log');
 1122+ var log_elm = document.getElementById('mv_js_log');
11051123 if(!log_elm){
11061124 document.getElementsByTagName("body")[0].innerHTML = document.getElementsByTagName("body")[0].innerHTML +
11071125 '<div style="position:absolute;z-index:500;top:0px;left:0px;right:0px;height:10px;">'+
@@ -1111,7 +1129,7 @@
11121130 }
11131131 if(log_elm){
11141132 log_elm.value+=string+"\n";
1115 - }*/
 1133+ }
11161134 }
11171135 return false;
11181136 }
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/mv_javaEmbed.js
@@ -88,7 +88,8 @@
8989 this.currentTime = this.jce.getPlayPosition();
9090 this.addPresTimeOffset();
9191
92 - if( this.jce.getPlayPosition() < 0){
 92+ if( this.jce.getPlayPosition() < 0){
 93+ js_log('pp:'+this.jce.getPlayPosition());
9394 //probably reached clip end
9495 this.onClipDone();
9596 }

Status & tagging log