-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
143 lines (135 loc) · 6.83 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html lang="en">
<!--
Hours - simple time tracking PWA, inspired by PalmOS hours.prc
Copyright (C) 2020 Matija Nalis <mnalis-git@voyager.hr>
Copyright (C) 2020 Ksenija Kulic & Marin Klojber
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Hours</title>
<script src="db.js" defer></script>
<script src="details.js" defer></script>
<script src="list.js" defer></script>
<script src="months.js" defer></script>
<script src="main.js" defer></script>
<link rel="stylesheet" href="main.css">
<link rel="manifest" href="manifest.json">
<link rel="icon" sizes="128x128" href="hours-128.png">
<meta name="theme-color" content="#4285f4">
<meta name="application-name" content="Hours">
<meta name="apple-mobile-web-app-title" content="Hours">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="msapplication-starturl" content="/">
<meta name="description" content="Hours - simple work time tracking PWA">
</head>
<body>
<section id="sec_main">
<h1>Hours <span id="ver">loading…</span></h1>
<button type="button" id="btn_refresh_app" title="Refresh App" disabled>↻</button>
<button type="button" id="btn_backup" title="Backup data">💾</button>
<button type="button" id="btn_import" title="Import data">⇫</button>
<label>Import data
<input type="file" accept=".json,application/json" id="import_file_field">
</label>
</section>
<section id="sec_months">
<h2>Months editor</h2>
<form id="form_month">
<label for="month_input">New month category:</label>
<input type="text" id="month_input" name="month_input" required size=8 placeholder="YYYY-MM" pattern="[0-9]{4}-[0-9]{2}" minlength="7" maxlength="7">
<input type="submit" value="Add month">
</form>
<p>
<label for="cur_month_list">Choose month…</label>
<select id="cur_month_list" title="Choose month category">
</select>
</p>
</section>
<section id="sec_list">
<h2>Monthly task table</h2>
<table>
<caption>Category <span id="selected_month">UNKNOWN</span></caption>
<thead>
<tr>
<th>Date</th>
<th>From</th>
<th>To</th>
<th>Work</th>
<th>Notes</th>
</tr>
</thead>
<tbody class="clickable" id="table_body">
</tbody>
<tfoot>
<tr>
<td>Total:</td>
<td></td>
<td></td>
<td id="table_worked">--:--</td>
<td></td>
</tr>
</tfoot>
</table>
<div>
<button type="button" id="btn_new_task">New Task</button>
</div>
</section>
<section id="sec_details">
<h2>Details</h2>
<div id="date">
<form id="form_details">
<input type="hidden" id="details_id" value="-2">
<ol>
<li>
<label for="date_time">Date</label>
<input type="date" id="details_date" placeholder="YYYY-MM-DD" required pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" minlength="10" maxlength="10">
</li>
<li>
<label for="begin_time">Begin</label>
<input type="time" id="details_start" placeholder="HH:MM" required pattern="[0-9]{2}:[0-9]{2}" minlength="5" maxlength="5">
<span class="clickable" id="btn_starttime_now">⏲</span>
</li>
<li>
<label for="end_time">End</label>
<input type="time" id="details_end" placeholder="HH:MM" required pattern="[0-9]{2}:[0-9]{2}" minlength="5" maxlength="5">
<span class="clickable" id="btn_endtime_now">⏲</span>
</li>
<li>
<label for="subject">Notes</label>
<textarea id="details_notes" placeholder="Please enter task decription..." required rows=4></textarea>
</li>
<li>
<label for="breaktime">Break</label>
<input type="text" id="details_break" placeholder="00:30" value="00:00" required pattern="[0-9]{2}:[0-9]{2}" minlength="5" maxlength="5">
</li>
<li id="new_month_list_div">
<label for="new_month_list">Month…</label>
<select id="new_month_list" title="Choose new month category">
</select>
</li>
</ol>
<div>
<button type="submit">Done</button>
<button type="button" id="btn_details_cancel" disabled>Cancel</button>
<button type="button" id="btn_details_delete" disabled>Delete</button>
<button type="button" id="btn_details_moveto" disabled>Move To</button>
</div>
</form>
</div>
</section>
</body>
</html>