Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js |
— | — | @@ -229,17 +229,25 @@ |
230 | 230 | }; |
231 | 231 | } |
232 | 232 | if( currentTypeOrSubtype !== null ) { |
233 | | - if( !currentTypeOrSubtype.header || $( '#mw-wikilove-header' ).val() != currentTypeOrSubtype.header ) { |
234 | | - rememberData.header = $( '#mw-wikilove-header' ).val(); |
| 233 | + if( $.inArray( 'header', currentTypeOrSubtype.fields ) >= 0 && |
| 234 | + ( !currentTypeOrSubtype.header || $( '#mw-wikilove-header' ).val() != currentTypeOrSubtype.header ) ) |
| 235 | + { |
| 236 | + rememberData.header = $( '#mw-wikilove-header' ).val(); |
235 | 237 | } |
236 | | - if( !currentTypeOrSubtype.title || $( '#mw-wikilove-title' ).val() != currentTypeOrSubtype.title ) { |
237 | | - rememberData.title = $( '#mw-wikilove-title' ).val(); |
| 238 | + if( $.inArray( 'title', currentTypeOrSubtype.fields ) >= 0 && |
| 239 | + ( !currentTypeOrSubtype.title || $( '#mw-wikilove-title' ).val() != currentTypeOrSubtype.title ) ) |
| 240 | + { |
| 241 | + rememberData.title = $( '#mw-wikilove-title' ).val(); |
238 | 242 | } |
239 | | - if( !currentTypeOrSubtype.message || $( '#mw-wikilove-message' ).val() != currentTypeOrSubtype.message ) { |
| 243 | + if( $.inArray( 'message', currentTypeOrSubtype.fields ) >= 0 && |
| 244 | + ( !currentTypeOrSubtype.message || $( '#mw-wikilove-message' ).val() != currentTypeOrSubtype.message ) ) |
| 245 | + { |
240 | 246 | rememberData.message = $( '#mw-wikilove-message' ).val(); |
241 | 247 | } |
242 | | - if( typeof currentTypeOrSubtype.gallery == undefined && $.inArray( 'image', currentTypeOrSubtype.fields ) >= 0 ) { |
243 | | - rememberData.image = $( '#mw-wikilove-image' ).val(); |
| 248 | + if( typeof currentTypeOrSubtype.gallery == 'undefined' && $.inArray( 'image', currentTypeOrSubtype.fields ) >= 0 && |
| 249 | + ( !currentTypeOrSubtype.image || $( '#mw-wikilove-image' ).val() != currentTypeOrSubtype.image ) ) |
| 250 | + { |
| 251 | + rememberData.image = $( '#mw-wikilove-image' ).val(); |
244 | 252 | } |
245 | 253 | } |
246 | 254 | }, |