Difference between revisions of "Widget:StatTable"
Jump to navigation
Jump to search
m (Removed debugging lines) |
(Added document-ready wait functionality as the MediaWiki does not wait for DOM) |
||
(12 intermediate revisions by 2 users not shown) | |||
Line 12: | Line 12: | ||
// 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 | ||
− | mw.mmv.bootstrap.thumbs = []; | + | if (mv && mv.mmv && mv.mmv.bootstrap && mv.mmv.bootstrap.viewer) { |
− | + | mw.mmv.bootstrap.thumbs = []; | |
− | + | // Search for all thumbs | |
− | + | mw.mmv.bootstrap.processThumbs($("#content")); | |
− | + | // Re-Init the viewer with the new thumbs | |
+ | mw.mmv.bootstrap.viewer.initWithThumbs(mw.mmv.bootstrap.thumbs); | ||
+ | } | ||
} | } | ||
− | RLQ.push(function () { | + | RLQ.push(['jquery', 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"); | ||
Line 26: | Line 28: | ||
} | } | ||
swap_costume(); | swap_costume(); | ||
− | + | }); | |
− | }); | + | }]); |
</script> | </script> |