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_D").attr("href", costumePaths[1]); | $("#fullart_D a").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]); | ||
$("#fullart_S img").attr("src", costumePaths[2]); | |||
Line 21: | Line 23: | ||
// 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 (mw && mw.mmv && mw.mmv.bootstrap && mw.mmv.bootstrap.viewer) { | if (typeof mw !== "undefined" && typeof mw.mmv !== "undefined" && typeof mw.mmv.bootstrap !== "undefined" && typeof mw.mmv.bootstrap.viewer !== "undefined") { | ||
mw.mmv.bootstrap.thumbs = []; | mw.mmv.bootstrap.thumbs = []; | ||
// Search for all thumbs | // Search for all thumbs | ||
Line 27: | Line 29: | ||
// 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 40: | Line 41: | ||
<option value="<!--{$defaultpaths|escape:'html'}-->" selected="selected">Default</option> | <option value="<!--{$defaultpaths|escape:'html'}-->" selected="selected">Default</option> | ||
<option value="_mod">Mod</option> | <option value="_mod">Mod</option> | ||
<option value="<!--{$costume1paths|escape:'html'}-->"><!--{$ | <option value="<!--{$costume1paths|escape:'html'}-->"><!--{$costume1|escape:'html'}--></option> | ||
<option value="<!--{$costume2paths|escape:'html'}-->"><!--{$ | <option value="<!--{$costume2paths|escape:'html'}-->"><!--{$costume2|escape:'html'}--></option> | ||
<option value="<!--{$costume3paths|escape:'html'}-->"><!--{$ | <option value="<!--{$costume3paths|escape:'html'}-->"><!--{$costume3|escape:'html'}--></option> | ||
<option value="<!--{$costume4paths|escape:'html'}-->"><!--{$ | <option value="<!--{$costume4paths|escape:'html'}-->"><!--{$costume4|escape:'html'}--></option> | ||
<option value="<!--{$costume5paths|escape:'html'}-->"><!--{$ | <option value="<!--{$costume5paths|escape:'html'}-->"><!--{$costume5|escape:'html'}--></option> | ||
</select> | </select> | ||
</includeonly> | </includeonly> | ||
Line 61: | Line 60: | ||
|costume3name=test3 | |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}} | ||
}} | }} | ||