support multiple solutions
This commit is contained in:
parent
9a0f756beb
commit
aaca101d1f
@ -13,6 +13,13 @@
|
||||
<option value="{{ tz }}">{{ tz }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<br>
|
||||
<canvas id="canvas-{{ solution_id }}" width="200" height="200" style="background-color:#eee"></canvas>
|
||||
<script>
|
||||
drawClock("{{dt.iso8601_time}}");
|
||||
var canvas = document.getElementById("canvas-{{ solution_id }}");
|
||||
var ctx = canvas.getContext("2d");
|
||||
var radius = canvas.height / 2;
|
||||
ctx.translate(radius, radius);
|
||||
radius = radius * 0.90;
|
||||
drawClock(ctx, radius, "{{dst_dt.iso8601_time}}");
|
||||
</script>
|
@ -13,6 +13,13 @@
|
||||
<option value="{{ tz }}">{{ tz }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<br>
|
||||
<canvas id="canvas-{{ solution_id }}" width="200" height="200" style="background-color:#eee"></canvas>
|
||||
<script>
|
||||
drawClock("{{dst_dt.iso8601_time}}");
|
||||
var canvas = document.getElementById("canvas-{{ solution_id }}");
|
||||
var ctx = canvas.getContext("2d");
|
||||
var radius = canvas.height / 2;
|
||||
ctx.translate(radius, radius);
|
||||
radius = radius * 0.90;
|
||||
drawClock(ctx, radius, "{{dst_dt.iso8601_time}}");
|
||||
</script>
|
@ -39,7 +39,6 @@
|
||||
</br>
|
||||
<div id="solutions"></div>
|
||||
</form>
|
||||
<canvas id="canvas" width="200" height="200" style="background-color:#eee"></canvas>
|
||||
</main>
|
||||
<script src="{{ url_for('static', filename='jquery.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='jquery.debounce.js') }}"></script>
|
||||
@ -48,15 +47,8 @@
|
||||
|
||||
|
||||
<script>
|
||||
var canvas = document.getElementById("canvas");
|
||||
var ctx = canvas.getContext("2d");
|
||||
var radius = canvas.height / 2;
|
||||
ctx.translate(radius, radius);
|
||||
radius = radius * 0.90;
|
||||
|
||||
|
||||
function drawClock(time) {
|
||||
var time = time.split(':');
|
||||
function drawClock(ctx, radius, time) {
|
||||
time = time.split(':');
|
||||
drawFace(ctx, radius, time);
|
||||
drawNumbers(ctx, radius);
|
||||
drawTime(ctx, radius, time);
|
||||
|
@ -251,12 +251,13 @@ def resolve_query(query):
|
||||
"solutions": [],
|
||||
}
|
||||
solutions = resolve_query_type(query)
|
||||
for solution in solutions:
|
||||
for sol_id, solution in enumerate(solutions):
|
||||
element = {}
|
||||
handler, results, query_type, hi = solution
|
||||
element["handler"] = handler
|
||||
element["query_type"] = query_type
|
||||
element["highlight"] = hi
|
||||
element["solution_id"] = sol_id
|
||||
try:
|
||||
if query_type == QUERY_TYPE_DT:
|
||||
element["dt"] = dt_pretty(results)
|
||||
|
Loading…
Reference in New Issue
Block a user