Use mkwsTermlist-container-wide and -narrow instead of mkwsTermlistContainer1 and...
authorMike Taylor <mike@indexdata.com>
Wed, 30 Apr 2014 15:18:54 +0000 (16:18 +0100)
committerMike Taylor <mike@indexdata.com>
Wed, 30 Apr 2014 15:18:54 +0000 (16:18 +0100)
doc/whitepaper.markdown
src/mkws-core.js
src/mkws-widget-main.js

index 376da7a..76cb5e9 100644 (file)
@@ -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.
 
 
index e0811ff..5ca8187 100644 (file)
@@ -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();
                }
index 05a1b91..f508d46 100644 (file)
@@ -259,7 +259,7 @@ mkws.registerWidgetType('Results', function() {
     $(this.node).html('\
 <table width="100%" border="0" cellpadding="6" cellspacing="0">\
   <tr>\
-    <td class="mkwsTermlistContainer1 mkwsTeam_' + tname + '" width="250" valign="top">\
+    <td class="mkwsTermlist-Container-wide mkwsTeam_' + tname + '" width="250" valign="top">\
       <div class="mkwsTermlists mkwsTeam_' + tname + '"></div>\
     </td>\
     <td class="mkwsMOTDContainer mkwsTeam_' + tname + '" valign="top">\
@@ -271,7 +271,7 @@ mkws.registerWidgetType('Results', function() {
   </tr>\
   <tr>\
     <td colspan="2">\
-      <div class="mkwsTermlistContainer2 mkwsTeam_' + tname + '"></div>\
+      <div class="mkwsTermlist-Container-narrow mkwsTeam_' + tname + '"></div>\
     </td>\
   </tr>\
 </table>');
@@ -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