Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/tests/Player_Sources.html |
— | — | @@ -2,8 +2,7 @@ |
3 | 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
4 | 4 | <head> |
5 | 5 | <title>Player sources</title> |
6 | | - |
7 | | -<script type="text/javascript" src="../../../mwEmbedLoader.php"></script> |
| 6 | + <script type="text/javascript" src="../../../mwEmbedLoader.php"></script> |
8 | 7 | </head> |
9 | 8 | <body> |
10 | 9 | |
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/EmbedPlayer.loader.js |
— | — | @@ -76,8 +76,7 @@ |
77 | 77 | $( playerElement ) |
78 | 78 | .getAbsoluteOverlaySpinner() |
79 | 79 | .attr('id', 'loadingSpinner_' + $( playerElement ).attr('id') ) |
80 | | - .addClass( 'playerLoadingSpinner' ); |
81 | | - |
| 80 | + |
82 | 81 | // Add core "skin/interface" loader |
83 | 82 | var skinString = $( playerElement ).attr( 'class' ); |
84 | 83 | if( ! skinString |
Index: trunk/extensions/MwEmbedSupport/MwEmbedSupport.hooks.php |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | |
45 | 45 | // Add MwEmbedSupport modules to Startup: |
46 | 46 | static function addStartupModules( &$modules ){ |
47 | | - array_push($modules, 'jquery.triggerQueueCallback', 'jquery.mwEmbedUtil', 'mw.MwEmbedSupport' ); |
| 47 | + array_push($modules, 'jquery.triggerQueueCallback', 'jquery.loadingSpinner', 'jquery.mwEmbedUtil', 'mw.MwEmbedSupport' ); |
48 | 48 | return true; |
49 | 49 | } |
50 | 50 | } |
\ No newline at end of file |
Index: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/jquery/jquery.mwEmbedUtil.js |
— | — | @@ -19,46 +19,7 @@ |
20 | 20 | }); |
21 | 21 | } |
22 | 22 | }; |
23 | | - |
24 | | - /** |
25 | | - * Set a given selector html to the loading spinner: |
26 | | - */ |
27 | | - $.fn.loadingSpinner = function( ) { |
28 | | - if ( this ) { |
29 | | - $( this ).html( |
30 | | - $( '<div />' ) |
31 | | - .addClass( "loadingSpinner" ) |
32 | | - ); |
33 | | - } |
34 | | - return this; |
35 | | - }; |
36 | | - /** |
37 | | - * Add an absolute overlay spinner useful for cases where the |
38 | | - * element does not display child elements, ( images, video ) |
39 | | - */ |
40 | | - $.fn.getAbsoluteOverlaySpinner = function(){ |
41 | | - var pos = $( this ).offset(); |
42 | | - var posLeft = ( $( this ).width() ) ? |
43 | | - parseInt( pos.left + ( .5 * $( this ).width() ) -16 ) : |
44 | | - pos.left + 30; |
45 | 23 | |
46 | | - var posTop = ( $( this ).height() ) ? |
47 | | - parseInt( pos.top + ( .5 * $( this ).height() ) -16 ) : |
48 | | - pos.top + 30; |
49 | | - |
50 | | - var $spinner = $('<div />') |
51 | | - .loadingSpinner() |
52 | | - .css({ |
53 | | - 'width' : 32, |
54 | | - 'height' : 32, |
55 | | - 'position': 'absolute', |
56 | | - 'top' : posTop + 'px', |
57 | | - 'left' : posLeft + 'px' |
58 | | - }); |
59 | | - $('body').append( $spinner ); |
60 | | - return $spinner; |
61 | | - }; |
62 | | - |
63 | 24 | |
64 | 25 | /** |
65 | 26 | * Shortcut to a themed button Should be depreciated for $.button |
Index: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/MwEmbedSupport.php |
— | — | @@ -9,12 +9,21 @@ |
10 | 10 | 'dependencies' => array( |
11 | 11 | // jQuery dependencies: |
12 | 12 | 'jquery.triggerQueueCallback', |
| 13 | + 'jquery.loadingSpinner', |
13 | 14 | 'jquery.mwEmbedUtil', |
14 | 15 | ), |
15 | 16 | 'messageFile' => 'MwEmbedSupport.i18n.php', |
16 | 17 | ), |
| 18 | + "jquery.loadingSpinner" => array( |
| 19 | + 'scripts' => 'jquery.loadingSpinner/jquery.loadingSpinner.js', |
| 20 | + 'styles' => 'jquery.loadingSpinner/loadingSpinner.css' |
| 21 | + ), |
17 | 22 | 'mw.MwEmbedSupport.style' => array( |
18 | | - 'styles'=>'skins/common/MwEmbedCommonStyle.css', |
| 23 | + // NOTE we add the loadingSpinner.css as a work around to the resource loader register |
| 24 | + // of modules as "ready" even though only the "script" part of the module was included. |
| 25 | + 'styles'=> array( 'skins/common/MwEmbedCommonStyle.css', |
| 26 | + 'jquery.loadingSpinner/loadingSpinner.css' |
| 27 | + ), |
19 | 28 | 'skinStyles' => array( |
20 | 29 | /* shared jQuery ui skin styles */ |
21 | 30 | 'darkness' => 'skins/jquery.ui.themes/darkness/jquery-ui-1.7.2.css', |
Index: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/skins/common/MwEmbedCommonStyle.css |
— | — | @@ -14,49 +14,6 @@ |
15 | 15 | color:white; |
16 | 16 | } |
17 | 17 | |
18 | | -.loadingSpinner { |
19 | | - width:32px; |
20 | | - height:32px; |
21 | | - display:block; |
22 | | - padding:0px; |
23 | | - /* @embed */ |
24 | | - background-image: url(images/loading_ani.gif); |
25 | | - margin: auto; |
26 | | -} |
27 | | -.cssLoadingSpinner { |
28 | | - position:relative; |
29 | | - width:100px; |
30 | | - height:100px; |
31 | | - //margin:25px; |
32 | | - -moz-border-radius:100px; |
33 | | - float:left; |
34 | | - -moz-transform:scale(0.3); |
35 | | - -webkit-transform:scale(0.3); |
36 | | - |
37 | | - /* not used right now: */ |
38 | | - -webkit-animation-name: rotateThis; |
39 | | - -webkit-animation-duration:2s; |
40 | | - -webkit-animation-iteration-count:infinite; |
41 | | - -webkit-animation-timing-function:linear; |
42 | | -} |
43 | | -.cssLoadingSpinner div { |
44 | | - width:15px; |
45 | | - height:30px; |
46 | | - position:absolute; |
47 | | - top:35px; |
48 | | - left:45px; |
49 | | -} |
50 | | -.cssLoadingSpinner div { |
51 | | - -moz-border-radius:30px; |
52 | | - -webkit-border-radius:30px; |
53 | | - border-radius:30px; |
54 | | -} |
55 | | -/* uncomment this to use css animation in webkit browsers */ |
56 | | - @-webkit-keyframes rotateThis { |
57 | | - from {-webkit-transform:scale(0.7) rotate(0deg);} |
58 | | - to {-webkit-transform:scale(0.7) rotate(360deg);} |
59 | | -} |
60 | | - |
61 | 18 | /* jquery.ui overrides */ |
62 | 19 | |
63 | 20 | .ui-icon_link { |
Index: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/jquery.loadingSpinner/loadingSpinner.css |
— | — | @@ -0,0 +1,9 @@ |
| 2 | +.loadingSpinner { |
| 3 | + background-image: url('loadingDots.png'); |
| 4 | + width: 32px; |
| 5 | + height: 32px; |
| 6 | +} |
| 7 | +.absoluteOverlaySpinner { |
| 8 | + position : absolute; |
| 9 | + z-index: 3; |
| 10 | +} |
\ No newline at end of file |
Property changes on: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/jquery.loadingSpinner/loadingSpinner.css |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 11 | + text/plain |
Index: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/jquery.loadingSpinner/jquery.loadingSpinner.js |
— | — | @@ -0,0 +1,51 @@ |
| 2 | +( function( $ ) { |
| 3 | + /** |
| 4 | + * Set a given selector html to the loading spinner: |
| 5 | + */ |
| 6 | + $.fn.loadingSpinner = function( ) { |
| 7 | + var _this = this; |
| 8 | + if ( _this ) { |
| 9 | + $( _this ).html( |
| 10 | + $( '<div />' ) |
| 11 | + .addClass( "loadingSpinner" ) |
| 12 | + ); |
| 13 | + var i =0; |
| 14 | + var interval = setInterval( function(){ |
| 15 | + if( _this && $( _this ).find('.loadingSpinner').length ){ |
| 16 | + var offset = i*32; |
| 17 | + $( _this ).find('.loadingSpinner').css('background-position','0 ' + offset + 'px'); |
| 18 | + if(i >= 7) i = 0; |
| 19 | + i++; |
| 20 | + } else { |
| 21 | + clearInterval( interval ); |
| 22 | + } |
| 23 | + }, 70 ); |
| 24 | + } |
| 25 | + return _this; |
| 26 | + }; |
| 27 | + /** |
| 28 | + * Add an absolute overlay spinner useful for cases where the |
| 29 | + * element does not display child elements, ( images, video ) |
| 30 | + */ |
| 31 | + $.fn.getAbsoluteOverlaySpinner = function(){ |
| 32 | + var pos = $( this ).offset(); |
| 33 | + var posLeft = ( $( this ).width() ) ? |
| 34 | + parseInt( pos.left + ( .5 * $( this ).width() ) -16 ) : |
| 35 | + pos.left + 30; |
| 36 | + |
| 37 | + var posTop = ( $( this ).height() ) ? |
| 38 | + parseInt( pos.top + ( .5 * $( this ).height() ) -16 ) : |
| 39 | + pos.top + 30; |
| 40 | + |
| 41 | + var $spinner = $('<div />') |
| 42 | + .addClass('absoluteOverlaySpinner') |
| 43 | + .loadingSpinner() |
| 44 | + .css({ |
| 45 | + 'top' : posTop + 'px', |
| 46 | + 'left' : posLeft + 'px' |
| 47 | + }); |
| 48 | + $('body').append( $spinner ); |
| 49 | + return $spinner; |
| 50 | + }; |
| 51 | + |
| 52 | +} )( jQuery ); |
\ No newline at end of file |
Property changes on: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/jquery.loadingSpinner/jquery.loadingSpinner.js |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 53 | + text/plain |
Index: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/jquery.loadingSpinner/loadingSpokes.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/jquery.loadingSpinner/loadingSpokes.gif |
___________________________________________________________________ |
Added: svn:mime-type |
2 | 54 | + application/octet-stream |
Index: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/jquery.loadingSpinner/loadingDots.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/jquery.loadingSpinner/loadingDots.png |
___________________________________________________________________ |
Added: svn:mime-type |
3 | 55 | + application/octet-stream |