Generalise the moving as well as the hiding.
authorMike Taylor <mike@indexdata.com>
Thu, 1 May 2014 15:01:17 +0000 (16:01 +0100)
committerMike Taylor <mike@indexdata.com>
Thu, 1 May 2014 15:01:17 +0000 (16:01 +0100)
src/mkws-core.js

index 10af37b..ba20a02 100644 (file)
@@ -352,11 +352,15 @@ mkws.pagerNext = function(tname) {
                 team.visitWidgets(function (t, w) {
                     var w1 = team.widget(t + "-Container-" + from);
                     var w2 = team.widget(t + "-Container-" + to);
-                    if (w1) $(w1.node).hide();
-                    if (w2) $(w2.node).show();
+                    if (w1) {
+                        $(w1.node).hide();
+                    }
+                    if (w2) {
+                        $(w2.node).show();
+                       $(w.node).appendTo($(w2.node));
+                    }
                 });
                 team.queue("resize" + to).publish();
-               $(".mkwsTermlists.mkwsTeam_" + tname).appendTo($(".mkwsTermlist-Container-" + to + ".mkwsTeam_" + tname));
                for(var i = 0; i < list.length; i++) {
                     var widget = team.widget(list[i]);
                     if (widget) $(widget.node)[method]();