1 {% extends 'base.html' %}
4 td.number, td.checkbox { text-align: center; }
5 td { vertical-align: middle; }
6 td button { padding: 0em; }
7 th.centered { text-align: center; }
13 <form id="form_to_watch" action="do_todos" method="POST">
14 {% include 'tagfilters.html' %}
16 <input name="hide_done" type="checkbox" {% if hide_done %}checked{% endif %} /> hide done
17 <input type="submit" name="filter" value="filter" />
19 | <a href="do_todos?date={{prev_date}}">prev</a> | {{day.date}} | <a href="do_todos?date={{next_date}}">next</a> |
20 comment: <input name="day_comment" value="{{day.comment|e}}">
21 <input class="update" type="submit" name="update" value="update">
22 <input type="hidden" name="date" value="{{day.date}}" />
25 <table class="alternating">
27 <th {% if sort=='done' %}class="desc"{% endif %}>
28 <a href="?sort=done">done</a>
30 <th class="centered{% if sort=='default_effort' %} desc{% endif %}">
31 <a href="?sort=default_effort">effort</a>
33 <th {% if sort=='importance' %}class ="desc"{% endif %}>
34 <a href="?sort=importance">importance</a>
36 <th {% if sort=='title' %}class="desc"{% endif %}>
37 <a href="?sort=title">todo</a>
42 {% for todo in todos %}
44 <input name="todo_id" value="{{todo.id_}}" type="hidden" >
46 <input name="done" type="checkbox" value="{{todo.id_}}" {% if todo.done %}checked{% endif %}>
49 <input class="effort_input" name="effort" type="number" step=0.1 size=7 value="{% if todo.day_effort is not none %}{{todo.day_effort}}{% endif %}" placeholder={{"%.1f"|format(todo.task.default_effort.then)}} >
52 <input name="importance" type="number" step=0.1 size=7 value={{todo.importance}} } >
55 <a href="todo?id={{todo.id_}}&return_to=do_todos">{{todo.path}}{{todo.title}}</a>
58 <input name="effort_comment" type="text" size=100 value="{{todo.comment|e}}" />
64 <input class="update" type="submit" name="update" value="update">
67 {% include 'watch_form.html' %}
69 mere_filter_inputs = mere_filter_inputs.concat(['hide_done']);
70 var effort_inputs = document.getElementsByClassName("effort_input");
71 for (let i = 0; i < effort_inputs.length; i++) {
72 let input = effort_inputs[i];
73 let button = document.createElement('button');
74 button.innerHTML = '+' + parseFloat(input.placeholder).toFixed(1);
75 button.onclick = function(event) {
76 event.preventDefault();
78 input.value = parseFloat(input.value) + parseFloat(input.placeholder);
80 input.value = parseFloat(input.placeholder);
82 input.value = parseFloat(input.value).toFixed(1);
83 changes_to_commit = true;
85 input.insertAdjacentElement('afterend', button);