Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.defaultOptions.js |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | ( function( $ ) { |
3 | 3 | $.wikiLove.optionsHook = function() { return { |
4 | 4 | defaultText: '{| style="background-color: $5; border: 1px solid $6;"\n\ |
5 | | -|rowspan="2" style="vertical-align: middle; padding: 5px;" | [[Image:$3|$4]]\n\ |
| 5 | +|rowspan="2" style="vertical-align: middle; padding: 5px;" | [[File:$3|$4]]\n\ |
6 | 6 | |style="font-size: x-large; padding: 3px; height: 1.5em;" | \'\'\'$2\'\'\'\n\ |
7 | 7 | |-\n\ |
8 | 8 | |style="vertical-align: middle; padding: 3px;" | $1 ~~~~\n\ |
— | — | @@ -9,6 +9,7 @@ |
10 | 10 | defaultBackgroundColor: '#fdffe7', |
11 | 11 | defaultBorderColor: '#fceb92', |
12 | 12 | defaultImageSize: '100px', |
| 13 | + defaultImage: 'Emblem-fun.svg', |
13 | 14 | |
14 | 15 | types: { |
15 | 16 | // example type, could be removed later (also no i18n) |
Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js |
— | — | @@ -266,10 +266,14 @@ |
267 | 267 | $( '#mw-wikilove-preview' ).hide(); |
268 | 268 | $( '#mw-wikilove-dialog' ).find( '.mw-wikilove-error' ).remove(); |
269 | 269 | |
270 | | - if( typeof $.wikiLove.currentTypeOrSubtype.gallery == 'object' ) { |
271 | | - if ( $( '#mw-wikilove-image' ).val().length <= 0 ) { |
| 270 | + |
| 271 | + if ( $( '#mw-wikilove-image' ).val().length <= 0 ) { |
| 272 | + if( typeof $.wikiLove.currentTypeOrSubtype.gallery == 'object' ) { |
272 | 273 | $.wikiLove.showError( 'wikilove-err-image' ); return false; |
273 | 274 | } |
| 275 | + else { |
| 276 | + $( '#mw-wikilove-image' ).val( $.wikiLove.options.defaultImage ); |
| 277 | + } |
274 | 278 | } |
275 | 279 | if( $( '#mw-wikilove-header' ).val().length <= 0 ) { |
276 | 280 | $.wikiLove.showError( 'wikilove-err-header' ); return false; |