Index: trunk/phase3/resources/jquery/images/spinner.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = image/gif |
Property changes on: trunk/phase3/resources/jquery/images/spinner.gif |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 1 | + image/gif |
Index: trunk/phase3/resources/jquery/jquery.spinner.css |
— | — | @@ -0,0 +1,8 @@ |
| 2 | +.loading-spinner { |
| 3 | + /* @embed */ |
| 4 | + background: transparent url('images/spinner.gif'); |
| 5 | + height: 16px; |
| 6 | + width: 16px; |
| 7 | + display: inline-block; |
| 8 | + vertical-align: middle; |
| 9 | +} |
\ No newline at end of file |
Property changes on: trunk/phase3/resources/jquery/jquery.spinner.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 10 | + native |
Index: trunk/phase3/resources/jquery/jquery.spinner.js |
— | — | @@ -0,0 +1,42 @@ |
| 2 | +/** |
| 3 | + * Functions to replace injectSpinner which makes img tags with spinners |
| 4 | + */ |
| 5 | +( function( $ ) { |
| 6 | + |
| 7 | +$.extend( { |
| 8 | + /** |
| 9 | + * Creates a spinner element |
| 10 | + * |
| 11 | + * @param id String id of the spinner |
| 12 | + * @return jQuery spinner |
| 13 | + */ |
| 14 | + createSpinner: function( id ) { |
| 15 | + return $( '<div/>' ) |
| 16 | + .attr({ |
| 17 | + id: 'mw-spinner-' + id, |
| 18 | + class: 'loading-spinner', |
| 19 | + title: '...', |
| 20 | + alt: '...' |
| 21 | + }); |
| 22 | + }, |
| 23 | + |
| 24 | + /** |
| 25 | + * Removes a spinner element |
| 26 | + * |
| 27 | + * @param id |
| 28 | + */ |
| 29 | + removeSpinner: function( id ) { |
| 30 | + $( '#mw-spinner-' + id ).remove(); |
| 31 | + } |
| 32 | +} ); |
| 33 | + |
| 34 | +/** |
| 35 | + * Injects a spinner after the given objects |
| 36 | + * |
| 37 | + * @param id String id of the spinner |
| 38 | + */ |
| 39 | +$.fn.injectSpinner = function( id ) { |
| 40 | + return this.after( $.createSpinner( id ) ); |
| 41 | +}; |
| 42 | + |
| 43 | +} )( jQuery ); |
\ No newline at end of file |
Property changes on: trunk/phase3/resources/jquery/jquery.spinner.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 44 | + native |
Index: trunk/phase3/resources/Resources.php |
— | — | @@ -156,6 +156,10 @@ |
157 | 157 | 'jquery.qunit.completenessTest' => array( |
158 | 158 | 'scripts' => 'resources/jquery/jquery.qunit.completenessTest.js', |
159 | 159 | ), |
| 160 | + 'jquery.spinner' => array( |
| 161 | + 'scripts' => 'resources/jquery/jquery.spinner.js', |
| 162 | + 'styles' => 'resources/jquery/jquery.spinner.css', |
| 163 | + ), |
160 | 164 | 'jquery.suggestions' => array( |
161 | 165 | 'scripts' => 'resources/jquery/jquery.suggestions.js', |
162 | 166 | 'styles' => 'resources/jquery/jquery.suggestions.css', |