From: Mike Taylor Date: Thu, 1 May 2014 11:10:49 +0000 (+0100) Subject: resizePage now use team.widget method to find widgets to show/hide. X-Git-Tag: 1.0.0~770 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=823cea5b1fc8a51b818e2a3a7784aac0c94447e7;p=mkws-moved-to-github.git resizePage now use team.widget method to find widgets to show/hide. This works correctly when the implicit AUTO team is used. --- diff --git a/src/mkws-core.js b/src/mkws-core.js index ff619bd..1ff2f2e 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -330,7 +330,7 @@ mkws.pagerNext = function(tname) { function resizePage() { - var list = ["mkwsSwitch", "mkwsLang"]; + var list = ["Switch", "Lang"]; var threshhold = mkws.config.responsive_design_width; var width = $(window).width(); @@ -353,7 +353,8 @@ mkws.pagerNext = function(tname) { mkws.teams[tname].queue("resize" + to).publish(); $(".mkwsTermlists.mkwsTeam_" + tname).appendTo($(".mkwsTermlist-Container-" + to + ".mkwsTeam_" + tname)); for(var i = 0; i < list.length; i++) { - $("." + list[i] + ".mkwsTeam_" + tname)[method](); + var widget = mkws.teams[tname].widget(list[i]); + if (widget) $(widget.node)[method](); } } }