Index: branches/MwEmbedStandAlone/modules/AddMedia/mw.RemoteSearchDriver.js |
— | — | @@ -906,9 +906,6 @@ |
907 | 907 | |
908 | 908 | this.$resultsContainer = $j('<div />').attr({ |
909 | 909 | id : "rsd_results_container" |
910 | | - }).css({ |
911 | | - 'position' : 'relative', |
912 | | - 'bottom' : '30px' |
913 | 910 | }); |
914 | 911 | |
915 | 912 | $mainContainer.append( this.$filtersContainer ); |
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js |
— | — | @@ -5,7 +5,6 @@ |
6 | 6 | var urlparts = getRemoteEmbedPath(); |
7 | 7 | var mwEmbedHostPath = urlparts[0]; |
8 | 8 | var mwRemoteVersion = 'r183'; |
9 | | -var mwUseScriptLoader = true; |
10 | 9 | |
11 | 10 | // Log the mwRemote version makes it easy to debug cache issues |
12 | 11 | if( window.console ){ |
— | — | @@ -34,13 +33,8 @@ |
35 | 34 | if( document.URL.indexOf( 'embedplayer=yes' ) !== -1 ){ |
36 | 35 | mwReqParam['embedplayer'] = 'yes'; |
37 | 36 | } |
38 | | -// Check if debug mode and disable script grouping |
39 | | -if( mwReqParam['debug'] ) { |
40 | | - mwUseScriptLoader = false; |
41 | | -} |
42 | 37 | |
43 | 38 | mwReqParam['debug'] = true; |
44 | | -mwUseScriptLoader = true; |
45 | 39 | |
46 | 40 | // Setup up some globals to wrap mwEmbed mw.ready and mw.setConfig functions |
47 | 41 | |
— | — | @@ -135,7 +129,7 @@ |
136 | 130 | } |
137 | 131 | window.ranMwRewrites = true; |
138 | 132 | |
139 | | - // Add media wizard ( only if not on a sequence page |
| 133 | + // Add media wizard |
140 | 134 | if ( wgAction == 'edit' || wgAction == 'submit' ) { |
141 | 135 | if( wgPageName.indexOf( "Sequence:" ) != 0 ){ |
142 | 136 | // Add a timeout to give a chance for wikieditor to build out. |
— | — | @@ -668,63 +662,51 @@ |
669 | 663 | } |
670 | 664 | var doLoadMwEmbed = function(){ |
671 | 665 | // Inject mwEmbed |
672 | | - if ( mwUseScriptLoader ) { |
673 | | - var rurl = mwEmbedHostPath + '/ResourceLoader.php?class='; |
674 | | - |
675 | | - var coma = ''; |
676 | | - |
677 | | - |
678 | | - // Add jQuery too if we need it: |
679 | | - if ( typeof window.jQuery == 'undefined' |
680 | | - || |
681 | | - // force load jquery if version 1.3.2 ( issues with '1.3.2' .data handling ) |
682 | | - jQuery.fn.jquery == '1.3.2') |
683 | | - { |
684 | | - rurl += 'window.jQuery'; |
685 | | - coma = ','; |
686 | | - } |
687 | | - // Add Core mwEmbed lib ( if not already defined ) |
688 | | - if( typeof MW_EMBED_VERSION == 'undefined' ){ |
689 | | - rurl += coma + 'mwEmbed,mw.style.mwCommon'; |
690 | | - coma = ','; |
691 | | - } |
692 | | - |
693 | | - // Add requested classSet to scriptLoader request |
694 | | - for( var i=0; i < classSet.length; i++ ){ |
695 | | - var cName = classSet[i]; |
696 | | - // always include our version of the library ( too many crazy conflicts with old library versions ) |
697 | | - rurl += ',' + cName; |
698 | | - } |
699 | | - |
700 | | - // Add the remaining arguments |
701 | | - rurl += '&' + mwGetReqArgs(); |
702 | | - $j.getScript( rurl, callback); |
703 | | - } else { |
704 | | - |
705 | | - // Force load jQuery for debug mode |
706 | | - var jQueryRequested = false; |
707 | | - $j.getScript(mwEmbedHostPath + '/libraries/jquery/jquery-1.4.2.js?' + mwGetReqArgs(), function(){ |
708 | | - // load mwEmbed js |
709 | | - $j.getScript( mwEmbedHostPath + '/ResourceLoader.php?class=window.jQuery,mwEmbed&&' + mwGetReqArgs(), function(){ |
710 | | - // Load the class set as part of mwReady callback |
711 | | - mw.load( classSet, function(){ |
712 | | - callback(); |
713 | | - }); |
714 | | - }); |
715 | | - }); |
| 666 | + var rurl = mwEmbedHostPath + '/ResourceLoader.php?class='; |
| 667 | + |
| 668 | + var coma = ''; |
| 669 | + // Add jQuery too if we need it: |
| 670 | + if ( typeof window.jQuery == 'undefined' |
| 671 | + || |
| 672 | + // force load jquery if version 1.3.2 ( issues with '1.3.2' .data handling ) |
| 673 | + jQuery.fn.jquery == '1.3.2') |
| 674 | + { |
| 675 | + rurl += 'window.jQuery'; |
| 676 | + coma = ','; |
716 | 677 | } |
| 678 | + // Add Core mwEmbed lib ( if not already defined ) |
| 679 | + if( typeof MW_EMBED_VERSION == 'undefined' ){ |
| 680 | + rurl += coma + 'mwEmbed,mw.style.mwCommon'; |
| 681 | + coma = ','; |
| 682 | + } |
| 683 | + |
| 684 | + // Add requested classSet to scriptLoader request |
| 685 | + for( var i=0; i < classSet.length; i++ ){ |
| 686 | + var cName = classSet[i]; |
| 687 | + // always include our version of the library ( too many crazy conflicts with old library versions ) |
| 688 | + rurl += ',' + cName; |
| 689 | + } |
| 690 | + |
| 691 | + // Add the remaining arguments |
| 692 | + rurl += '&' + mwGetReqArgs(); |
| 693 | + $j.getScript( rurl, callback); |
717 | 694 | }; |
718 | 695 | |
719 | 696 | // Wait for jQuery ui to be loaded ( so that we can override it ) |
720 | 697 | // Usability loads jqueryUI asynchronously. We need a to wait until its defined |
721 | 698 | // so that we can override it. ) |
722 | 699 | // if not defined after 1 second assume it is not going to be loaded |
| 700 | + var waitjQueryUiCount = 0; |
723 | 701 | var waitForJqueryUi = function(){ |
| 702 | + if( waitjQueryUiCount == 200 ){ // 2 seconds |
| 703 | + doLoadMwEmbed(); |
| 704 | + } |
724 | 705 | if( !window.jQuery.ui ){ |
725 | 706 | setTimeout( waitForJqueryUi, 10); |
726 | 707 | } else { |
727 | 708 | doLoadMwEmbed(); |
728 | 709 | } |
| 710 | + waitjQueryUiCount++; |
729 | 711 | }; |
730 | 712 | waitForJqueryUi(); |
731 | 713 | } |