|
@@ -124,7 +124,8 @@ form h2 {
|
|
|
display: block;
|
|
display: block;
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
- margin-top: 8px;
|
|
|
|
|
|
|
+ margin-top: 1em;
|
|
|
|
|
+ margin-bottom: 0.3em;
|
|
|
}
|
|
}
|
|
|
#rating {
|
|
#rating {
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
@@ -141,6 +142,19 @@ form h2 {
|
|
|
font-effect: outline(2px #006600);
|
|
font-effect: outline(2px #006600);
|
|
|
color: #ddd;
|
|
color: #ddd;
|
|
|
}
|
|
}
|
|
|
|
|
+.picker p {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+}
|
|
|
|
|
+input:disabled {
|
|
|
|
|
+ image-color: #aaac;
|
|
|
|
|
+}
|
|
|
|
|
+li {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ color: #eee;
|
|
|
|
|
+ margin-left: 1em;
|
|
|
|
|
+ margin-top: 0.3em;
|
|
|
|
|
+ margin-bottom: 0.3em;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|
|
|
</head>
|
|
</head>
|
|
|
|
|
|
|
@@ -193,7 +207,6 @@ form h2 {
|
|
|
</panel>
|
|
</panel>
|
|
|
<tab>Forms</tab>
|
|
<tab>Forms</tab>
|
|
|
<panel id="controls" data-model="forms">
|
|
<panel id="controls" data-model="forms">
|
|
|
- <h1>Todo</h1>
|
|
|
|
|
<form onsubmit="submit_form">
|
|
<form onsubmit="submit_form">
|
|
|
<h2>Full name</h2>
|
|
<h2>Full name</h2>
|
|
|
<div>
|
|
<div>
|
|
@@ -204,20 +217,22 @@ form h2 {
|
|
|
<input type="text" name="email"/>
|
|
<input type="text" name="email"/>
|
|
|
<input type="password" name="password"/>
|
|
<input type="password" name="password"/>
|
|
|
</div>
|
|
</div>
|
|
|
- <h2>Favorite animal</h2>
|
|
|
|
|
|
|
+ <h2>Favorite animal: {{ animal }}</h2>
|
|
|
<div>
|
|
<div>
|
|
|
- <input type="radio" name="animal" value="dog" checked/> Dog
|
|
|
|
|
- <input type="radio" name="animal" value="cat"/> Cat
|
|
|
|
|
- <input type="radio" name="animal" value="narwhal"/> Narwhal
|
|
|
|
|
- <input type="radio" name="animal" value="no"/> I don't like animals
|
|
|
|
|
|
|
+ <input type="radio" name="animal" value="dog" data-checked="animal"/> Dog
|
|
|
|
|
+ <input type="radio" name="animal" value="cat" data-checked="animal"/> Cat
|
|
|
|
|
+ <input type="radio" name="animal" value="narwhal" data-checked="animal"/> Narwhal
|
|
|
|
|
+ <input type="radio" name="animal" value="no" data-checked="animal"/> I don't like animals
|
|
|
</div>
|
|
</div>
|
|
|
<h2>Favorite meals</h2>
|
|
<h2>Favorite meals</h2>
|
|
|
<div>
|
|
<div>
|
|
|
- <input type="checkbox" name="meals" value="pizza" data-attrif-checked="rating > 70" disabled/> Pizza
|
|
|
|
|
- <input type="checkbox" name="meals" value="pasta" checked/> Pasta
|
|
|
|
|
- <input type="checkbox" name="meals" value="lasagne" data-attrif-checked="lasagne" data-event-change="lasagne = ev.value != ''"/> Lasagne
|
|
|
|
|
- <p data-visible="rating < 70">You can only have pizza if the rating is satisfactory.</p>
|
|
|
|
|
- <p data-visible="lasagne">Lasagne is delicous!</p>
|
|
|
|
|
|
|
+ <input type="checkbox" name="meals" value="pizza" data-checked="pizza" data-attrif-disabled="rating < 70"/> Pizza
|
|
|
|
|
+ <input type="checkbox" name="meals" value="pasta" data-checked="pasta"/> Pasta
|
|
|
|
|
+ <input type="checkbox" name="meals" value="lasagne" data-checked="lasagne"/> Lasagne
|
|
|
|
|
+ <li style="color: red;" data-if="pizza && rating < 70">• You can only have pizza if the rating is satisfactory.</li>
|
|
|
|
|
+ <li data-if="pizza && rating >= 70">• Pizza is life!</li>
|
|
|
|
|
+ <li data-if="pasta">• Pasta is squiggly good!</li>
|
|
|
|
|
+ <li data-if="lasagne">• Lasagne is delicous!</li>
|
|
|
</div>
|
|
</div>
|
|
|
<h2>Rating</h2>
|
|
<h2>Rating</h2>
|
|
|
<div>
|
|
<div>
|
|
@@ -225,10 +240,16 @@ form h2 {
|
|
|
</div>
|
|
</div>
|
|
|
<h2>Subject</h2>
|
|
<h2>Subject</h2>
|
|
|
<div>
|
|
<div>
|
|
|
- <select name="subject" data-event-change="selected_subject = ev.value">
|
|
|
|
|
- <option data-for="s : subjects" data-value="it_index" data-attrif-selected="it_index == selected_subject">{{s}}</option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <div>
|
|
|
|
|
|
|
+ <!--<select name="subject" data-event-change="selected_subject = ev.value">
|
|
|
|
|
+ <option data-for="s : subjects" data-value="it_index">{{s}}</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select name="subject" data-value="selected_subject">
|
|
|
|
|
+ <option value="0" selected>{{ subjects[0] }}</option>
|
|
|
|
|
+ <option value="1">{{ subjects[1] }}</option>
|
|
|
|
|
+ <option value="2">{{ subjects[2] }}</option>
|
|
|
|
|
+ <option value="3">{{ subjects[3] }}</option>
|
|
|
|
|
+ </select>-->
|
|
|
|
|
+ <div class="picker">
|
|
|
<p data-for="s : subjects" data-style-color="it_index == selected_subject ? 'red' : 'black'" data-event-click="selected_subject = it_index">{{it_index + 1 + ': ' + s}}</p>
|
|
<p data-for="s : subjects" data-style-color="it_index == selected_subject ? 'red' : 'black'" data-event-click="selected_subject = it_index">{{it_index + 1 + ': ' + s}}</p>
|
|
|
</div>
|
|
</div>
|
|
|
<p>
|
|
<p>
|