Widget:chibiCostumeSwitcher: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Removed the logging. Let's test this on the template |
||
Line 21: | Line 21: | ||
function swap_costume_intern(element, targetId) { | function swap_costume_intern(element, targetId) { | ||
var selectBox = $(element); | var selectBox = $(element); | ||
costumeSelectionIndex = selectBox.prop('selectedIndex'); | costumeSelectionIndex = selectBox.prop('selectedIndex'); | ||
Line 33: | Line 32: | ||
$(targetSelector).attr('data-tdoll-costume', chibiCostumeName); | $(targetSelector).attr('data-tdoll-costume', chibiCostumeName); | ||
$(targetSelector).find('.chibiAnimation').trigger("costume_changed", chibiCostumeName); | $(targetSelector).find('.chibiAnimation').trigger("costume_changed", chibiCostumeName); | ||
var tdollId = selectBox.closest('.costumeContainer').find('.tdoll_chibi').data('tdollId'); | var tdollId = selectBox.closest('.costumeContainer').find('.tdoll_chibi').data('tdollId'); | ||
Line 42: | Line 40: | ||
var basePath = "/"; | var basePath = "/"; | ||
var chibiPath = basePath + cpp(costumeId +"_chibi.png") + costumeId +"_chibi.png"; | var chibiPath = basePath + cpp(costumeId +"_chibi.png") + costumeId +"_chibi.png"; | ||
$(".tdoll_chibi>img,.chibiAnimationContainer>img").attr("src", chibiPath); | $(".tdoll_chibi>img,.chibiAnimationContainer>img").attr("src", chibiPath); |
Revision as of 15:26, 7 July 2018