|
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 3 | + |
| 4 | +<html xmlns="http://www.w3.org/1999/xhtml"> |
| 5 | +<head> |
| 6 | + <meta name="generator" |
| 7 | + content="HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.17), see www.w3.org"/> |
| 8 | + <meta http-equiv="Content-Type" content= |
| 9 | + "text/html; charset=us-ascii"/> |
| 10 | + |
| 11 | + <title>Form fields</title> |
| 12 | + <link type="text/css" rel="stylesheet" href="https://solid.github.io/mashlib/dist/mash.css"/> |
| 13 | + |
| 14 | + <!-- <script type="text/javascript" src="https://solid.github.io/mashlib/dist/mashlib.js"></script> --> |
| 15 | + <link type="text/css" rel="stylesheet" href="../style/demo-style.css"/> |
| 16 | + |
| 17 | + <script type="text/javascript" src="https://timbl.com/timbl/Automation/Library/Mashup/mashlib.js"></script> |
| 18 | + <script type="text/javascript" src="test-form.js"></script> |
| 19 | +</head> |
| 20 | + |
| 21 | +<body> |
| 22 | +<div class="TabulatorOutline" id="DummyUUID"> |
| 23 | + <table id="outline" summary="Space for where the test happens"> |
| 24 | + </table> |
| 25 | +</div> |
| 26 | + |
| 27 | +<div class="TabulatorOutline" id='UITestArea'></div> |
| 28 | + |
| 29 | +<h1>Form fields</h1> |
| 30 | +<pre id='Prolog' style="display: none;"> |
| 31 | + @prefix foaf: <http://xmlns.com/foaf/0.1/>. |
| 32 | + @prefix sched: <http://www.w3.org/ns/pim/schedule#>. |
| 33 | + @prefix cal: <http://www.w3.org/2002/12/cal/ical#>. |
| 34 | + @prefix dc: <http://purl.org/dc/elements/1.1/>. |
| 35 | + @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. |
| 36 | + @prefix ui: <http://www.w3.org/ns/ui#>. |
| 37 | + @prefix trip: <http://www.w3.org/ns/pim/trip#>. |
| 38 | + @prefix vcard: <http://www.w3.org/2006/vcard/ns#>. |
| 39 | + @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. |
| 40 | + @prefix ex: <#>. # Things in the examples |
| 41 | + @prefix : <#>. |
| 42 | +</pre> |
| 43 | + |
| 44 | +<div> |
| 45 | + <table style= |
| 46 | + 'border-collapse: collapse; border: 0.1em solid gray;' summary= |
| 47 | + "Table of input data values and UI outputs generated"> |
| 48 | + <tbody> |
| 49 | + |
| 50 | + <tr class="form-demo"> |
| 51 | + <td class='input'> |
| 52 | + <pre># A simple form with one text field |
| 53 | + |
| 54 | +ex:form |
| 55 | + a ui:SingleLineTextField; ui:label "name"; |
| 56 | + ui:property vcard:fn . |
| 57 | +</pre> |
| 58 | + </td> |
| 59 | + <td class='target'> |
| 60 | + <pre> |
| 61 | +ex:this vcard:fn "Alice" . |
| 62 | +</pre> |
| 63 | + </td> |
| 64 | + <td class='output'></td> |
| 65 | + </tr> |
| 66 | + |
| 67 | + |
| 68 | + <tr class="form-demo"> |
| 69 | + <td class='input'> |
| 70 | + <pre> |
| 71 | +# A simple form with one text field |
| 72 | + |
| 73 | +ex:form |
| 74 | + a ui:MultiLineTextField ; |
| 75 | + ui:property rdfs:comment . |
| 76 | +</pre> |
| 77 | + </td> |
| 78 | + <td class='target'> |
| 79 | + <pre> |
| 80 | +ex:this rdfs:comment "Here we made a comment" . |
| 81 | + </pre> |
| 82 | + </td> |
| 83 | + <td class='output'></td> |
| 84 | + </tr> |
| 85 | + |
| 86 | + |
| 87 | + <tr class="form-demo"> |
| 88 | + <td class='input'> |
| 89 | + <pre># A simple form with one boolean field |
| 90 | + |
| 91 | + ex:form |
| 92 | + a ui:BooleanField ; |
| 93 | + ui:property ex:allDay . |
| 94 | +</pre> |
| 95 | + </td> |
| 96 | + <td class='target'><pre> |
| 97 | +ex:this ex:allDay true . |
| 98 | +</pre> |
| 99 | + </td> <td class='output'></td> |
| 100 | + </tr> |
| 101 | + |
| 102 | + <tr class="form-demo"> |
| 103 | + <td class='input'> |
| 104 | + <pre># one Tristate field |
| 105 | + |
| 106 | +ex:form |
| 107 | + a ui:TristateField ; |
| 108 | + ui:property ex:allDay . |
| 109 | + </pre> |
| 110 | + </td> |
| 111 | + <td class='target'><pre> |
| 112 | +# Commented oout so there is no value true or false: |
| 113 | +# ex:this ex:allDay true .</pre></td> <td class='output'></td> |
| 114 | + </tr> |
| 115 | + |
| 116 | + <tr class="form-demo"> |
| 117 | + <td class='input'> |
| 118 | + <pre># A simple form with one integer field |
| 119 | + |
| 120 | + ex:form |
| 121 | + a ui:IntegerField ; |
| 122 | + ui:property foaf:age . |
| 123 | +</pre> |
| 124 | + </td> |
| 125 | + <td class='target'><pre>ex:this foaf:age 6 .</pre></td> <td class='output'></td> |
| 126 | + </tr> |
| 127 | + |
| 128 | + <tr class="form-demo"> |
| 129 | + <td class='input'> |
| 130 | + <pre># A simple form with one decimal field |
| 131 | + |
| 132 | + ex:form |
| 133 | + a ui:DecimalField ; |
| 134 | + ui:property ex:price . |
| 135 | +</pre> |
| 136 | + </td> |
| 137 | + <td class='target'><pre>ex:this ex:price 12.47 .</pre></td> <td class='output'></td> |
| 138 | + </tr> |
| 139 | + |
| 140 | + <tr class="form-demo"> |
| 141 | + <td class='input'> |
| 142 | + <pre> |
| 143 | +# A simple form with one floating point field |
| 144 | + |
| 145 | +ex:form |
| 146 | + a ui:FloatField ; |
| 147 | + ui:property ex:weight . |
| 148 | + </pre> |
| 149 | + </td> |
| 150 | + <td class='target'><pre> ex:this ex:weight 1.56769e23 .</pre></td> <td class='output'></td> |
| 151 | + </tr> |
| 152 | + |
| 153 | + <tr class="form-demo"> |
| 154 | + <td class='input'> |
| 155 | + <pre> |
| 156 | + # A simple form with one color field |
| 157 | + ex:form |
| 158 | + a ui:ColorField ; |
| 159 | + ui:property ui:backgroundColor . |
| 160 | + </pre> |
| 161 | + </td> |
| 162 | + <td class='target'><pre>ex:this ui:backgroundColor "#ffccff" .</pre></td> <td class='output'></td> |
| 163 | + </tr> |
| 164 | + |
| 165 | + <tr class="form-demo"> |
| 166 | + <td class='input'> |
| 167 | + <pre># A simple form with one date field |
| 168 | + |
| 169 | +ex:form |
| 170 | + a ui:DateField; |
| 171 | + ui:property cal:starts . |
| 172 | + </pre> |
| 173 | + </td> |
| 174 | + <td class='target'><pre>ex:this cal:starts "2021-10-12"^^xsd:date .</pre></td> <td class='output'></td> |
| 175 | + </tr> |
| 176 | + |
| 177 | + <tr class="form-demo"> |
| 178 | + <td class='input'> |
| 179 | + <pre> |
| 180 | +# A date-time field |
| 181 | + ex:form |
| 182 | + a ui:DateTimeField ; |
| 183 | + ui:property cal:starts . |
| 184 | +</pre> |
| 185 | + </td> |
| 186 | + <td class='target'><pre> ex:this cal:starts "2021-10-12T12:34:23Z"^^xsd:dateTime .</pre></td> <td class='output'></td> |
| 187 | + </tr> |
| 188 | + |
| 189 | + <tr class="form-demo"> |
| 190 | + <td class='input'> |
| 191 | + <pre> |
| 192 | + # A simple form with one phone field |
| 193 | + |
| 194 | +ex:form |
| 195 | + a ui:PhoneField ; |
| 196 | + ui:property vcard:hasPhone . # @@ check |
| 197 | + </pre> |
| 198 | + </td> |
| 199 | + <td class='target'><pre>ex:this vcard:hasPhone <tel:+1-55-555-1212> .</pre></td> <td class='output'></td> |
| 200 | + </tr> |
| 201 | + |
| 202 | + <tr class="form-demo"> |
| 203 | + <td class='input'> |
| 204 | + <pre> |
| 205 | + # A simple form with one email address field |
| 206 | + |
| 207 | +ex:form |
| 208 | + a ui:EmailField ; |
| 209 | + ui:property vcard:hasEmail . # @@ chcek |
| 210 | +</pre> |
| 211 | + </td> |
| 212 | + <td class='target'><pre>ex:this vcard:hasEmail <mailto:info@example.com> .</pre></td> <td class='output'></td> |
| 213 | + </tr> |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + </tbody> |
| 220 | + </table> |
| 221 | +</div> |
| 222 | +</body> |
| 223 | +</html> |
0 commit comments