Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1417,6 +1417,7 @@ |
1418 | 1418 | 'license' => 'Licensing', |
1419 | 1419 | 'nolicense' => 'None selected', |
1420 | 1420 | 'licenses' => '-', # don't translate or duplicate this message to other languages |
| 1421 | +'license-nopreview' => '(Preview not available)', |
1421 | 1422 | 'upload_source_url' => ' (a valid, publicly accessible URL)', |
1422 | 1423 | 'upload_source_file' => ' (a file on your computer)', |
1423 | 1424 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1201,7 +1201,7 @@ |
1202 | 1202 | * to ensure that client-side caches don't keep obsolete copies of global |
1203 | 1203 | * styles. |
1204 | 1204 | */ |
1205 | | -$wgStyleVersion = '83'; |
| 1205 | +$wgStyleVersion = '84'; |
1206 | 1206 | |
1207 | 1207 | |
1208 | 1208 | # Server-side caching: |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -1652,5 +1652,5 @@ |
1653 | 1653 | wfProfileOut( $fname ); |
1654 | 1654 | return $bar; |
1655 | 1655 | } |
1656 | | -} |
1657 | | - |
| 1656 | + |
| 1657 | +} |
\ No newline at end of file |
Index: trunk/phase3/includes/SpecialUpload.php |
— | — | @@ -572,7 +572,7 @@ |
573 | 573 | $output = $wgParser->parse( $revision->getText(), $title, new ParserOptions() ); |
574 | 574 | return $output->getText(); |
575 | 575 | } |
576 | | - return ''; |
| 576 | + return wfMsgHtml( 'license-nopreview' ); |
577 | 577 | } |
578 | 578 | |
579 | 579 | /** |
— | — | @@ -890,7 +890,8 @@ |
891 | 891 | <tr>" ); |
892 | 892 | if( $useAjaxLicencePreview ) { |
893 | 893 | $wgOut->addHtml( " |
894 | | - <td id=\"mw-licence-preview\" colspan=\"2\"></td> |
| 894 | + <td></td> |
| 895 | + <td id=\"mw-licence-preview\"></td> |
895 | 896 | </tr> |
896 | 897 | <tr>" ); |
897 | 898 | } |
Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -827,6 +827,7 @@ |
828 | 828 | 'license', |
829 | 829 | 'nolicense', |
830 | 830 | 'licenses', |
| 831 | + 'license-nopreview', |
831 | 832 | 'upload_source_url', |
832 | 833 | 'upload_source_file', |
833 | 834 | ), |
Index: trunk/phase3/skins/common/upload.js |
— | — | @@ -147,6 +147,7 @@ |
148 | 148 | if( licence in this.responseCache ) { |
149 | 149 | this.showPreview( this.responseCache[licence] ); |
150 | 150 | } else { |
| 151 | + injectSpinner( document.getElementById( 'wpLicense' ), 'licence' ); |
151 | 152 | sajax_do_call( 'UploadForm::ajaxGetLicencePreview', [licence], |
152 | 153 | function( result ) { |
153 | 154 | wgUploadLicenceObj.processResult( result, licence ); |
— | — | @@ -156,17 +157,17 @@ |
157 | 158 | }, |
158 | 159 | |
159 | 160 | 'processResult' : function( result, licence ) { |
| 161 | + removeSpinner( 'licence' ); |
160 | 162 | this.showPreview( result.responseText ); |
161 | 163 | this.responseCache[licence] = result.responseText; |
162 | 164 | }, |
163 | 165 | |
164 | 166 | 'showPreview' : function( preview ) { |
165 | 167 | var previewPanel = document.getElementById( 'mw-licence-preview' ); |
166 | | - if( previewPanel.innerHTML != preview ) { |
| 168 | + if( previewPanel.innerHTML != preview ) |
167 | 169 | previewPanel.innerHTML = preview; |
168 | | - } |
169 | 170 | } |
170 | | - |
| 171 | + |
171 | 172 | } |
172 | 173 | |
173 | 174 | addOnloadHook( licenseSelectorFixup ); |
\ No newline at end of file |
Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -1243,6 +1243,36 @@ |
1244 | 1244 | return true; |
1245 | 1245 | } |
1246 | 1246 | |
| 1247 | +/** |
| 1248 | + * Inject a cute little progress spinner after the specified element |
| 1249 | + * |
| 1250 | + * @param element Element to inject after |
| 1251 | + * @param id Identifier string (for use with removeSpinner(), below) |
| 1252 | + */ |
| 1253 | +function injectSpinner( element, id ) { |
| 1254 | + var spinner = document.createElement( "img" ); |
| 1255 | + spinner.id = "mw-spinner-" + id; |
| 1256 | + spinner.src = stylepath + "/common/images/spinner.gif"; |
| 1257 | + spinner.alt = spinner.title = "..."; |
| 1258 | + if( element.nextSibling ) { |
| 1259 | + element.parentNode.insertBefore( spinner, element.nextSibling ); |
| 1260 | + } else { |
| 1261 | + element.parentNode.appendChild( spinner ); |
| 1262 | + } |
| 1263 | +} |
| 1264 | + |
| 1265 | +/** |
| 1266 | + * Remove a progress spinner added with injectSpinner() |
| 1267 | + * |
| 1268 | + * @param id Identifier string |
| 1269 | + */ |
| 1270 | +function removeSpinner( id ) { |
| 1271 | + var spinner = document.getElementById( "mw-spinner-" + id ); |
| 1272 | + if( spinner ) { |
| 1273 | + spinner.parentNode.removeChild( spinner ); |
| 1274 | + } |
| 1275 | +} |
| 1276 | + |
1247 | 1277 | function runOnloadHook() { |
1248 | 1278 | // don't run anything below this for non-dom browsers |
1249 | 1279 | if (doneOnloadHook || !(document.getElementById && document.getElementsByTagName)) { |
Index: trunk/phase3/skins/common/images/spinner.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/phase3/skins/common/images/spinner.gif |
___________________________________________________________________ |
Added: svn:mime-type |
1250 | 1280 | + application/octet-stream |