diff popoto/ismi.html @ 5:fa1b4fa5b4f8

ADDED: Table for person/codex/witness constraint boxes, reset button (currently leaves previous constraints in the text box) FIXED: Text constraints are not applied if array left empty
author alistair
date Mon, 21 Sep 2015 15:32:32 -0400
parents 72dc19d750ad
children
line wrap: on
line diff
--- a/popoto/ismi.html	Mon Sep 07 23:51:47 2015 -0400
+++ b/popoto/ismi.html	Mon Sep 21 15:32:32 2015 -0400
@@ -13,18 +13,66 @@
 </header>
 
 <section class="ppt-section-main">
-    <div class="ppt-section-header" style="height: 150px; line-height: 45px;">
+    <div class="ppt-section-header" style="height: auto; line-height: 35px;">
         <span class="ppt-header-span">Graph</span> search
         <form>
-            <label>
-                <input id="constraint" type="text" style="width: 500px;" value='$identifier.label IN [""]'>
-            </label>
-            <input id="filter-button" type="button" value="Use this filter">
-            <br>
-            <label>
-                <input id="constraint2" type="text" style="width: 500px;" value='$identifier.death_date_text IN [""]'>
-            </label>
-            <input id="filter-button2" type="button" value="Use this filter">
+            <table width="100%">
+                <tr>
+                    <th>Person Constraints</th>
+                    <th>Codex Constraints</th>
+                    <th>Witness Constraints</th>
+                </tr>
+                <tr>
+                    <td>
+                        <label>
+                            <input id="person-constraint" type="text" style="width: 90%;" value='$identifier.label IN [""]'>
+                        </label>
+                    </td>
+                    <td>
+                        <label>
+                            <input id="codex-constraint" type="text" style="width: 90%;" value='$identifier.label IN [""]'>
+                        </label>
+                    </td>
+                    <td>
+                        <label>
+                            <input id="witness-constraint" type="text" style="width: 90%;" value='$identifier.label IN [""]'>
+                        </label>
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        <label>
+                            <input id="person-constraint2" type="text" style="width: 90%;" value='$identifier.label IN [""]'>
+                        </label>
+                    </td>
+                    <td>
+                        <label>
+                            <input id="codex-constraint2" type="text" style="width: 90%;" value='$identifier.label IN [""]'>
+                        </label>
+                    </td>
+                    <td>
+                        <label>
+                            <input id="witness-constraint2" type="text" style="width: 90%;" value='$identifier.label IN [""]'>
+                        </label>
+                    </td>
+                </tr>
+            </table>
+            <!-- fill labels conditionally and have a single filter button with one id-->
+            <input id="filter-button" type="button" value="Use these filters">
+            <input id="clear-button" type="button" value="Reset">
+            <!--
+            use:
+            clickedNode.data = popoto.graph.node.parseResultData(data);
+            to get data to use in drop down boxes
+            where:
+            popoto.graph.node.nodeClick = function () {
+            has var:
+            var clickedNode = d3.select(this).data()[0]; // Clicked node data
+
+            note: could just do that for all [i] if not null
+            should test to see whether the .data returns the attribute type or the actual attribute
+            just console.log results array in popoto.graph.node.parseResultData
+            -->
         </form>
     </div>