From f7aaf0b5a9d4589832611c14ea77ca40d01121ad Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 30 Apr 2014 16:18:54 +0100 Subject: [PATCH] Use mkwsTermlist-container-wide and -narrow instead of mkwsTermlistContainer1 and 2, part of a new general scheme --- doc/whitepaper.markdown | 4 ++-- src/mkws-core.js | 16 ++++++++-------- src/mkws-widget-main.js | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/whitepaper.markdown b/doc/whitepaper.markdown index 376da7a..76cb5e9 100644 --- a/doc/whitepaper.markdown +++ b/doc/whitepaper.markdown @@ -260,8 +260,8 @@ If individual result-related components are in use in place of the all-in-one mkwsResults, then the redesigned application needs to specify the locations where the termlists should appear in both cases. In this case, wrap the wide-screen `mkwsTermlists` element in a -`mkwsTermlistContainer1` element; and provide an -`mkwsTermlistContainer2` element in the place where the narrow-screen +`mkwsTermlist-Container-wide` element; and provide an +`mkwsTermlist-Container-narrow` element in the place where the narrow-screen termlists should appear. diff --git a/src/mkws-core.js b/src/mkws-core.js index e0811ff..5ca8187 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -336,23 +336,23 @@ mkws.pagerNext = function(tname) { var parent = $(".mkwsTermlists").parent(); if ($(window).width() <= width && - parent.hasClass("mkwsTermlistContainer1")) { + parent.hasClass("mkwsTermlist-Container-wide")) { log("changing from wide to narrow: " + $(window).width()); - $(".mkwsTermlistContainer1").hide(); - $(".mkwsTermlistContainer2").show(); + $(".mkwsTermlist-Container-wide").hide(); + $(".mkwsTermlist-Container-narrow").show(); for (var tname in mkws.teams) { - $(".mkwsTermlists.mkwsTeam_" + tname).appendTo($(".mkwsTermlistContainer2.mkwsTeam_" + tname)); + $(".mkwsTermlists.mkwsTeam_" + tname).appendTo($(".mkwsTermlist-Container-narrow.mkwsTeam_" + tname)); for(var i = 0; i < list.length; i++) { $("." + list[i] + ".mkwsTeam_" + tname).hide(); } } } else if ($(window).width() > width && - parent.hasClass("mkwsTermlistContainer2")) { + parent.hasClass("mkwsTermlist-Container-narrow")) { log("changing from narrow to wide: " + $(window).width()); - $(".mkwsTermlistContainer1").show(); - $(".mkwsTermlistContainer2").hide(); + $(".mkwsTermlist-Container-wide").show(); + $(".mkwsTermlist-Container-narrow").hide(); for (var tname in mkws.teams) { - $(".mkwsTermlists.mkwsTeam_" + tname).appendTo($(".mkwsTermlistContainer1.mkwsTeam_" + tname)); + $(".mkwsTermlists.mkwsTeam_" + tname).appendTo($(".mkwsTermlist-Container-wide.mkwsTeam_" + tname)); for(var i = 0; i < list.length; i++) { $("." + list[i] + ".mkwsTeam_" + tname).show(); } diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index 05a1b91..f508d46 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -259,7 +259,7 @@ mkws.registerWidgetType('Results', function() { $(this.node).html('\ \ \ - \ \ \ \ \
\ + \
\
\ @@ -271,7 +271,7 @@ mkws.registerWidgetType('Results', function() {
\ -
\ +
\
'); @@ -425,6 +425,6 @@ mkws.registerWidgetType('Popup', function() {}); // Not sure whether the following should have functionality: // Select HTMLFormElement -// TermlistContainer1 HTMLTableCellElement -// TermlistContainer2 HTMLDivElement +// Termlist-Container-wide HTMLTableCellElement +// Termlist-Container-narrow HTMLDivElement // Bytarget HTMLDivElement -- 1.7.10.4