Move main record-display HTML into JS
authorMike Taylor <mike@indexdata.com>
Wed, 19 Jun 2013 11:38:18 +0000 (12:38 +0100)
committerMike Taylor <mike@indexdata.com>
Wed, 19 Jun 2013 11:38:18 +0000 (12:38 +0100)
experiments/spclient/index.html
experiments/spclient/mkws.js

index 87edf8e..bc54bf2 100644 (file)
   <body>
     <div id="mkwsSwitch"></div>
     <div id="mkwsSearch"></div>
-    <div id="mkwsRecords">
-      <table width="100%" border="0" cellpadding="6" cellspacing="0">
-        <tr>
-          <td width="250" valign="top">
-            <div id="termlist"></div>
-          </td>
-          <td valign="top">
-            <div id="ranking">
-              <form name="select" id="select">
-        Sort by
-        <select name="sort" id="sort"><option value="relevance" selected="selected">relevance</option><option value="title:1">title</option><option value="date:0">newest</option><option value="date:1">oldest</option></select>
-        and show 
-        <select name="perpage" id="perpage"><option value="10">10</option><option value="20" selected="selected">20</option><option value="30">30</option><option value="50">50</option></select>
-        per page.
-       </form>
-            </div>
-            <div id="pager"></div>
-            <div id="navi"></div>
-            <div id="results"></div>
-          </td>
-        </tr>
-      </table>
-    </div>
+    <div id="mkwsRecords"></div>
     <div id="mkwsTargets"></div>
     <div id="stat"></div>
   </body>
index 82b0d50..6067fb1 100644 (file)
@@ -391,6 +391,30 @@ $(document).ready(function() {
       <input id="button" type="submit" value="Search" />\
     </form>');
 
+    $("#mkwsRecords").html('\
+      <table width="100%" border="0" cellpadding="6" cellspacing="0">\
+        <tr>\
+          <td width="250" valign="top">\
+            <div id="termlist"></div>\
+          </td>\
+          <td valign="top">\
+            <div id="ranking">\
+              <form name="select" id="select">\
+        Sort by\
+        <select name="sort" id="sort"><option value="relevance" selected="selected">relevance</option><option value="title:1">title</option><option value="date:0">newest</option><option value="date:1">oldest</option></select>\
+        and show \
+        <select name="perpage" id="perpage"><option value="10">10</option><option value="20" selected="selected">20</option><option value="30">30</option><option value="50">50</option></select>\
+        per page.\
+       </form>\
+            </div>\
+            <div id="pager"></div>\
+            <div id="navi"></div>\
+            <div id="results"></div>\
+          </td>\
+        </tr>\
+      </table>\
+    </div>');
+
     $("#mkwsTargets").html('\
       <div id="bytarget">\
        No information available yet.\