Index: trunk/extensions/ApiSandbox/ext.apiSandbox.js |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | output.html( data ); |
88 | 88 | }, |
89 | 89 | error: function( jqXHR, textStatus, errorThrown ) { |
90 | | - output.text( 'FAIL' ); |
| 90 | + showLoadError( output, 'apisb-request-error' ); |
91 | 91 | } |
92 | 92 | }; |
93 | 93 | $.ajax( data ); |
— | — | @@ -100,7 +100,10 @@ |
101 | 101 | } |
102 | 102 | |
103 | 103 | function showLoading( element ) { |
104 | | - element.html( mw.msg( 'apisb-loading' ) ); // @todo: |
| 104 | + element.html( |
| 105 | + mw.html.element( 'img', |
| 106 | + { src: mw.config.get( 'stylepath' ) + '/common/images/spinner.gif', alt: '' } ) |
| 107 | + + mw.msg( 'apisb-loading' ) ); |
105 | 108 | } |
106 | 109 | |
107 | 110 | function showLoadError( element, message ) { |
Index: trunk/extensions/ApiSandbox/ApiSandbox.i18n.php |
— | — | @@ -17,6 +17,7 @@ |
18 | 18 | 'apisb-select-value' => 'Select value', |
19 | 19 | 'apisb-loading' => 'Loading...', |
20 | 20 | 'apisb-load-error' => 'Error loading API description', |
| 21 | + 'apisb-request-error' => 'Error performing API request', |
21 | 22 | 'apisb-namespaces-error' => 'Error loading namespaces', |
22 | 23 | 'apisb-ns-main' => '(Main)', |
23 | 24 | 'apisb-submit' => 'Make request', |
Index: trunk/extensions/ApiSandbox/ApiSandbox.php |
— | — | @@ -31,6 +31,7 @@ |
32 | 32 | 'messages' => array( |
33 | 33 | 'apisb-loading', |
34 | 34 | 'apisb-load-error', |
| 35 | + 'apisb-request-error', |
35 | 36 | 'apisb-select-value', |
36 | 37 | 'apisb-namespaces-error', |
37 | 38 | 'apisb-ns-main', |