Add MOTD to teh div id to class conversion list MKWS-133
authorHeikki Levanto <heikki@indexdata.dk>
Fri, 28 Feb 2014 12:49:48 +0000 (13:49 +0100)
committerHeikki Levanto <heikki@indexdata.dk>
Fri, 28 Feb 2014 12:49:48 +0000 (13:49 +0100)
examples/htdocs/heikki-motd.html
tools/htdocs/mkws.js

index 68b4b5c..feb2aae 100644 (file)
@@ -2,12 +2,38 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title>Heikkis MOTD test</title>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title>Heikkis MOTD test</title>
-    <script type="text/javascript" src="http://mkws.indexdata.com/mkws-complete.js"></script>
-    <link rel="stylesheet" href="http://mkws.indexdata.com/mkws.css" />
+
+    <script type="text/javascript">
+      var mkws_config = {
+          //show_perpage: false,
+          //show_sort: false,
+          //perpage_default: 10,
+          //sort_default: "title:1",
+          //debug_level: 1
+      };
+    </script>
+    <script type="text/javascript" src="tools/htdocs/jquery-1.10.0.min.js"></script>
+    <script type="text/javascript" src="tools/htdocs/pz2.js"></script>
+    <script type="text/javascript" src="tools/htdocs/handlebars-v1.1.2.js"></script>
+    <script type="text/javascript" src="tools/htdocs/jquery.json-2.4.js"></script>
+    <script type="text/javascript" src="tools/htdocs/mkws.js"></script>
+
+    <style type="text/css">
+      #mkwsTermlists div.facet {
+      float:left;
+      width: 30%;
+      margin: 0.3em;
+      }
+      #mkwsStat {
+      text-align: right;
+      }
+    </style>
+
   </head>
   <body>
     <h1>Heikkis test for the MOTD</h1>
   </head>
   <body>
     <h1>Heikkis test for the MOTD</h1>
-    <div id="mkwsMOTD">This is the MOTD div </div>
+    <div id="mkwsMOTD">This is the mkwsMOTD div </div>
+    <br/>The MOTD should not be visible above this line.
     <div id="mkwsSearch"></div>
     <div id="mkwsResults"></div>
   </body>
     <div id="mkwsSearch"></div>
     <div id="mkwsResults"></div>
   </body>
index 7c11d11..40d703f 100644 (file)
@@ -1004,7 +1004,7 @@ function team($, teamName) {
        // on first page, hide the termlist
        $(document).ready(function() { $(".mkwsTermlists.mkwsTeam_" + m_teamName).hide(); });
        var motd = $(".mkwsMOTD.mkwsTeam_" + m_teamName);
        // on first page, hide the termlist
        $(document).ready(function() { $(".mkwsTermlists.mkwsTeam_" + m_teamName).hide(); });
        var motd = $(".mkwsMOTD.mkwsTeam_" + m_teamName);
-       var container = $(".mkwsMOTDContainer.mkwsTeam_" + m_teamName);
+        var container = $(".mkwsMOTDContainer.mkwsTeam_" + m_teamName);
        if (motd.length && container.length) {
            // Move the MOTD from the provided element down into the container
            motd.appendTo(container);
        if (motd.length && container.length) {
            // Move the MOTD from the provided element down into the container
            motd.appendTo(container);
@@ -1418,7 +1418,7 @@ function team($, teamName) {
        // elements that have the old magic IDs.
        var ids = [ "Switch", "Lang", "Search", "Pager", "Navi",
                    "Results", "Records", "Targets", "Ranking",
        // elements that have the old magic IDs.
        var ids = [ "Switch", "Lang", "Search", "Pager", "Navi",
                    "Results", "Records", "Targets", "Ranking",
-                   "Termlists", "Stat" ];
+                   "Termlists", "Stat", "MOTD" ];
        for (var i = 0; i < ids.length; i++) {
            var id = 'mkws' + ids[i];
            var node = $('#' + id);
        for (var i = 0; i < ids.length; i++) {
            var id = 'mkws' + ids[i];
            var node = $('#' + id);