Widget:StatTable: Difference between revisions
m test js |
Moved JavaScript to Gadget |
||
| (39 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<script> | <script>RLQ.push(['md5hasher', function () { | ||
RLQ.push(function () { | $(document).ready(function() { | ||
$(document).ready(function() { | |||
if (document.getElementById("stat_table")) { | if (document.getElementById("stat_table")) { | ||
st_element = document.getElementById("stat_table"); | st_element = document.getElementById("stat_table"); | ||
st_element.outerHTML = | st_element.outerHTML = '<div id="stat_table" style="color:blue"><!--{$dmg_max|escape:'html'}--></div>'; | ||
} | } | ||
window.iopwidgets.StatTable.swap_costume(); | |||
}); | }); | ||
}); | }]); | ||
</script> | </script> | ||
<select id="costumeSelection" onchange="swap_costume()"> | <select id="costumeSelection" onchange="swap_costume()"> | ||
<option value="" selected="selected">Default</option> | <option value="<!--{$defaultpath|escape:'html'}-->" selected="selected">Default</option> | ||
<option value="_Mod">Mod</option> | <option value="_Mod">Mod</option> | ||
<option value=" | <option value="<!--{$costume1path|escape:'html'}-->"><!--{$costume1|escape:'html'}--></option> | ||
<option value=" | <option value="<!--{$costume2path|escape:'html'}-->"><!--{$costume2|escape:'html'}--></option> | ||
<option value=" | <option value="<!--{$costume3path|escape:'html'}-->"><!--{$costume3|escape:'html'}--></option> | ||
</select> | </select> | ||
| Line 34: | Line 23: | ||
<noinclude> | <noinclude> | ||
{{#widget:StatTable|dmg_max=999|costume1=test1|costume2=test2|costume3=test3}} | {{#widget:StatTable | ||
<div id="fullart">[[file:Springfield.png]]</div> | |dmg_max=999 | ||
<div id=" | |defaultpath={{filepath:Springfield.png|420}} | ||
|costume1=test1 | |||
|costume1path={{filepath:Springfield_costume1.png|420}} | |||
|costume2=test2 | |||
|costume2path={{filepath:Springfield_costume2.png|420}} | |||
|costume3=test3 | |||
|costume3path={{filepath:Springfield_costume3.png|420}} | |||
}} | |||
<div id="fullart" style="float:left; padding: 10px;">[[file:Springfield.png|420px]]</div> | |||
<div id="dummydiv" style="float:left; padding: 10px; border: thin solid white;" onclick="alert('hi');">[[File:Springfield_chibi.png|link=|center|class=tdoll_chibi]]</div> | |||
</noinclude> | </noinclude> | ||
