Widget:costumeSwitcher: Difference between revisions
Jump to navigation
Jump to search
Pianoforte (talk | contribs) No edit summary |
Pianoforte (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
$("#fullart a img").attr("alt", costumePaths[0]); | $("#fullart a img").attr("alt", costumePaths[0]); | ||
$("# | $("# fullart_Da").attr("href", costumePaths[1]); | ||
$("#fullart_D a img").attr("src", costumePaths[1]); | $("#fullart_D a img").attr("src", costumePaths[1]); | ||
$("#fullart_D a img").attr("alt", costumePaths[1]); | $("#fullart_D a img").attr("alt", costumePaths[1]); | ||
Line 23: | Line 21: | ||
// As we change the link, we have to update the Thumb-Cache of the Media Viewer | // As we change the link, we have to update the Thumb-Cache of the Media Viewer | ||
// Clear up the thumbs cache | // Clear up the thumbs cache | ||
if ( | if (mv && mv.mmv && mv.mmv.bootstrap && mv.mmv.bootstrap.viewer) { | ||
mw.mmv.bootstrap.thumbs = []; | mw.mmv.bootstrap.thumbs = []; | ||
// Search for all thumbs | // Search for all thumbs | ||
Line 29: | Line 27: | ||
// Re-Init the viewer with the new thumbs | // Re-Init the viewer with the new thumbs | ||
mw.mmv.bootstrap.viewer.initWithThumbs(mw.mmv.bootstrap.thumbs); | mw.mmv.bootstrap.viewer.initWithThumbs(mw.mmv.bootstrap.thumbs); | ||
}} | } | ||
} | |||
RLQ.push(function () { | RLQ.push(function () { | ||
Line 44: | Line 43: | ||
<option value="<!--{$costume2paths|escape:'html'}-->"><!--{$costume2|escape:'html'}--></option> | <option value="<!--{$costume2paths|escape:'html'}-->"><!--{$costume2|escape:'html'}--></option> | ||
<option value="<!--{$costume3paths|escape:'html'}-->"><!--{$costume3|escape:'html'}--></option> | <option value="<!--{$costume3paths|escape:'html'}-->"><!--{$costume3|escape:'html'}--></option> | ||
<option value="<!--{$costume4paths|escape:'html'}-->"><!--{$costume4|escape:'html'}--></option> | |||
<option value="<!--{$costume5paths|escape:'html'}-->"><!--{$costume5|escape:'html'}--></option> | |||
</select> | </select> | ||
</includeonly> | </includeonly> | ||
Line 52: | Line 55: | ||
{{#widget:costumeSwitcher | {{#widget:costumeSwitcher | ||
|defaultpaths={{filepath:Springfield.png|420}},,{{filepath:Springfield_D.png|420}},,{{filepath:Springfield_S.png|420}},,{{filepath:Springfield_chibi.png|420}} | |defaultpaths={{filepath:Springfield.png|420}},,{{filepath:Springfield_D.png|420}},,{{filepath:Springfield_S.png|420}},,{{filepath:Springfield_chibi.png|420}} | ||
| | |costume1name=test1 | ||
|costume1paths={{filepath:Springfield_costume1.png|420}},,{{filepath:Springfield_costume1_D.png|420}},,{{filepath:Springfield_costume1_S.png|420}},,{{filepath:Springfield_costume1_chibi.png|420}} | |costume1paths={{filepath:Springfield_costume1.png|420}},,{{filepath:Springfield_costume1_D.png|420}},,{{filepath:Springfield_costume1_S.png|420}},,{{filepath:Springfield_costume1_chibi.png|420}} | ||
| | |costume2name=test2 | ||
|costume2paths={{filepath:Springfield_costume2.png|420}},,{{filepath:Springfield_costume2_D.png|420}},,{{filepath:Springfield_costume2_S.png|420}},,{{filepath:Springfield_costume2_chibi.png|420}} | |costume2paths={{filepath:Springfield_costume2.png|420}},,{{filepath:Springfield_costume2_D.png|420}},,{{filepath:Springfield_costume2_S.png|420}},,{{filepath:Springfield_costume2_chibi.png|420}} | ||
| | |costume3name=test3 | ||
|costume3paths={{filepath:Springfield_costume3.png|420}},,{{filepath:Springfield_costume3_D.png|420}},,{{filepath:Springfield_costume3_S.png|420}},,{{filepath:Springfield_costume3_chibi.png|420}} | |costume3paths={{filepath:Springfield_costume3.png|420}},,{{filepath:Springfield_costume3_D.png|420}},,{{filepath:Springfield_costume3_S.png|420}},,{{filepath:Springfield_costume3_chibi.png|420}} | ||
|costume4name=test4 | |||
|costume4paths={{filepath:Springfield_costume4.png|420}},,{{filepath:Springfield_costume4_D.png|420}},,{{filepath:Springfield_costume4_S.png|420}},,{{filepath:Springfield_costume4_chibi.png|420}} | |||
|costume5name=test5 | |||
|costume5paths={{filepath:Springfield_costume5.png|420}},,{{filepath:Springfield_costume5_D.png|420}},,{{filepath:Springfield_costume5_S.png|420}},,{{filepath:Springfield_costume5_chibi.png|420}} | |||
}} | }} | ||