1
|
<!doctype html>
|
2
|
<!--
|
3
|
Copyright (C) 2021 Wojtek Kosior
|
4
|
Copyright (C) 2021 Nicholas Johnson
|
5
|
Redistribution terms are gathered in the `copyright' file.
|
6
|
-->
|
7
|
<html>
|
8
|
<head>
|
9
|
<meta charset="utf-8"/>
|
10
|
<title>Hachette options</title>
|
11
|
<style>
|
12
|
input[type="checkbox"], input[type="radio"], .hide, .popup.hide {
|
13
|
display: none;
|
14
|
}
|
15
|
|
16
|
/* pages list */
|
17
|
#page_components_ul {
|
18
|
max-height: 80vh;
|
19
|
overflow-y: auto;
|
20
|
}
|
21
|
#page_components_ul li.dragover_li {
|
22
|
border-top: 2px solid blue;
|
23
|
}
|
24
|
#page_components_ul li {
|
25
|
border-top: 2px solid white;
|
26
|
}
|
27
|
li[draggable=true] * {
|
28
|
pointer-events: none;
|
29
|
}
|
30
|
li[draggable=true] label,
|
31
|
li[draggable=true] button {
|
32
|
pointer-events: auto;
|
33
|
}
|
34
|
|
35
|
/* tabbed view */
|
36
|
#show_repos:not(:checked) ~ #repos,
|
37
|
#show_pages:not(:checked) ~ #pages,
|
38
|
#show_bags:not(:checked) ~ #bags,
|
39
|
#show_scripts:not(:checked) ~ #scripts {
|
40
|
display: none;
|
41
|
}
|
42
|
|
43
|
#show_repos:checked ~ #repos_lbl,
|
44
|
#show_pages:checked ~ #pages_lbl,
|
45
|
#show_bags:checked ~ #bags_lbl,
|
46
|
#show_scripts:checked ~ #scripts_lbl {
|
47
|
background: #4CAF50;
|
48
|
color: white;
|
49
|
}
|
50
|
|
51
|
body > div {
|
52
|
border-top: 6px solid #4CAF50;
|
53
|
}
|
54
|
|
55
|
.tab_head {
|
56
|
display: inline-block;
|
57
|
}
|
58
|
|
59
|
/* popup window with list of selectable components */
|
60
|
.popup {
|
61
|
position: fixed;
|
62
|
width: 100vw;
|
63
|
height: 100vh;
|
64
|
left: 0;
|
65
|
top: 0;
|
66
|
background-color: rgba(0,0,0,0.4);
|
67
|
z-index: 1;
|
68
|
overflow: auto;
|
69
|
vertical-align: center;
|
70
|
horizontal-align: center;
|
71
|
}
|
72
|
|
73
|
.popup_frame {
|
74
|
background-color: white;
|
75
|
width: 50vw;
|
76
|
}
|
77
|
|
78
|
input[type="radio"]:not(:checked)+.import_window_content {
|
79
|
display: none;
|
80
|
}
|
81
|
|
82
|
/* buttons */
|
83
|
button {
|
84
|
background-color: #4CAF50;
|
85
|
border: none;
|
86
|
border-radius: 8px;
|
87
|
color: white;
|
88
|
padding: 6px 12px;
|
89
|
text-align: center;
|
90
|
text-decoration: none;
|
91
|
display: inline-block;
|
92
|
margin: 2px 0px;
|
93
|
}
|
94
|
|
95
|
button:hover {
|
96
|
box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
|
97
|
}
|
98
|
</style>
|
99
|
</head>
|
100
|
<body>
|
101
|
<!-- The invisible div below is for elements that will be cloned. -->
|
102
|
<div class="hide">
|
103
|
<li id="item_li_template">
|
104
|
<span></span>
|
105
|
<button> Edit </button>
|
106
|
<button> Remove </button>
|
107
|
<button> Export </button>
|
108
|
</li>
|
109
|
<li id="bag_component_li_template">
|
110
|
<span></span>
|
111
|
<button> Remove </button>
|
112
|
</li>
|
113
|
<li id="chbx_component_li_template">
|
114
|
<input type="checkbox" style="display: inline;"></input>
|
115
|
<span></span>
|
116
|
</li>
|
117
|
<li id="radio_component_li_template">
|
118
|
<input type="radio" style="display: inline;" name="page_components"></input>
|
119
|
<span></span>
|
120
|
</li>
|
121
|
<li id="import_li_template">
|
122
|
<span></span>
|
123
|
<input type="checkbox" style="display: inline;" checked></input>
|
124
|
<span></span>
|
125
|
</li>
|
126
|
</div>
|
127
|
|
128
|
<!-- Mind the show_*s ids below - their format is assumed in js code -->
|
129
|
<input type="radio" name="tabs" id="show_repos"></input>
|
130
|
<input type="radio" name="tabs" id="show_pages" checked></input>
|
131
|
<input type="radio" name="tabs" id="show_bags"></input>
|
132
|
<input type="radio" name="tabs" id="show_scripts"></input>
|
133
|
<label for="show_repos" id="repos_lbl"
|
134
|
class="tab_head"> Repos </label>
|
135
|
<label for="show_pages" id="pages_lbl"
|
136
|
class="tab_head"> Pages </label>
|
137
|
<label for="show_bags" id="bags_lbl"
|
138
|
class="tab_head"> Bags </label>
|
139
|
<label for="show_scripts" id="scripts_lbl"
|
140
|
class="tab_head"> Scripts </label>
|
141
|
|
142
|
<div id="repos">
|
143
|
<ul id="repos_ul">
|
144
|
<li id="work_repo_li" class="hide">
|
145
|
<label for="repo_url_field">URL: </label>
|
146
|
<input id="repo_url_field"></input>
|
147
|
<br/>
|
148
|
<button id="save_repo_but" type="button"> Save </button>
|
149
|
<button id="discard_repo_but" type="button"> Cancel </button>
|
150
|
</li>
|
151
|
</ul>
|
152
|
<button id="add_repo_but" type="button"> Add repository </button>
|
153
|
</div>
|
154
|
|
155
|
<div id="pages">
|
156
|
<ul id="pages_ul">
|
157
|
<li id="work_page_li" class="hide">
|
158
|
<label for="page_url_field">URL: </label>
|
159
|
<input id="page_url_field"></input>
|
160
|
<br/>
|
161
|
<label>Payload: </label>
|
162
|
<span id="page_payload"></span>
|
163
|
<button id="select_page_components_but">
|
164
|
Choose payload
|
165
|
</button>
|
166
|
<br/>
|
167
|
<input id="page_allow_chbx" type="checkbox" style="display: inline;"></input>
|
168
|
<label for="page_allow_chbx">Allow native scripts</label>
|
169
|
<br/>
|
170
|
<button id="save_page_but" type="button"> Save </button>
|
171
|
<button id="discard_page_but" type="button"> Cancel </button>
|
172
|
</li>
|
173
|
</ul>
|
174
|
<button id="add_page_but" type="button"> Add page </button>
|
175
|
</div>
|
176
|
|
177
|
<div id="bags">
|
178
|
<ul id="bags_ul">
|
179
|
<li id="work_bag_li" class="hide">
|
180
|
<label for="bag_name_field"> Name: </label>
|
181
|
<input id="bag_name_field"></input>
|
182
|
<ul id="bag_components_ul">
|
183
|
<li id="empty_bag_component_li" class="hide"></li>
|
184
|
</ul>
|
185
|
<button id="select_bag_components_but">
|
186
|
Add scripts
|
187
|
</button>
|
188
|
<br/>
|
189
|
<button id="save_bag_but"> Save </button>
|
190
|
<button id="discard_bag_but"> Cancel </button>
|
191
|
</li>
|
192
|
</ul>
|
193
|
<button id="add_bag_but" type="button"> Add bag </button>
|
194
|
</div>
|
195
|
|
196
|
<div id="scripts">
|
197
|
<ul id="scripts_ul">
|
198
|
<li id="work_script_li" class="hide">
|
199
|
<label for="script_name_field"> Name: </label>
|
200
|
<input id="script_name_field"></input>
|
201
|
<br/>
|
202
|
<label for="script_url_field"> URL: </label>
|
203
|
<input id="script_url_field"></input>
|
204
|
<br/>
|
205
|
<label for="script_sha256_field"> sha256: </label>
|
206
|
<input id="script_sha256_field"></input>
|
207
|
<br/>
|
208
|
<label for="script_contents_field"> contents: </label>
|
209
|
<textarea id="script_contents_field" rows="20" cols="80"></textarea>
|
210
|
<br/>
|
211
|
<button id="save_script_but"> Save </button>
|
212
|
<button id="discard_script_but"> Cancel </button>
|
213
|
</li>
|
214
|
</ul>
|
215
|
<button id="add_script_but" type="button"> Add script </button>
|
216
|
</div>
|
217
|
|
218
|
<button id="import_but" style="margin-top: 40px;"> Import </button>
|
219
|
|
220
|
<div id="chbx_components_window" class="hide popup" position="absolute">
|
221
|
<div class="popup_frame">
|
222
|
<ul id="chbx_components_ul">
|
223
|
|
224
|
</ul>
|
225
|
<button id="commit_bag_components_but"> Add </button>
|
226
|
<button id="cancel_bag_components_but"> Cancel </button>
|
227
|
</div>
|
228
|
</div>
|
229
|
|
230
|
<div id="radio_components_window" class="hide popup" position="absolute">
|
231
|
<div class="popup_frame">
|
232
|
<ul id="radio_components_ul">
|
233
|
|
234
|
<li id="radio_component_none_li">
|
235
|
<input id="radio_component_none_input" type="radio" style="display: inline;" name="page_components"></input>
|
236
|
<span>(None)</span>
|
237
|
</li>
|
238
|
</ul>
|
239
|
<button id="commit_page_components_but"> Choose </button>
|
240
|
<button id="cancel_page_components_but"> Cancel </button>
|
241
|
</div>
|
242
|
</div>
|
243
|
|
244
|
<div id="import_window" class="hide popup" position="absolute">
|
245
|
<div class="popup_frame">
|
246
|
<h2> Settings import </h2>
|
247
|
<input id="import_loading_radio" type="radio" name="import_window_content"></input>
|
248
|
<span class="import_window_content"> Loading... </span>
|
249
|
<input id="import_failed_radio" type="radio" name="import_window_content"></input>
|
250
|
<div class="import_window_content">
|
251
|
<span> Bad file :( </span>
|
252
|
<pre id="bad_file_errormsg"></pre>
|
253
|
<button id="import_failok_but"> OK </button>
|
254
|
</div>
|
255
|
<input id="import_selection_radio" type="radio" name="import_window_content"></input>
|
256
|
<div class="import_window_content">
|
257
|
<button id="check_all_import_but"> Check all </button>
|
258
|
<button id="uncheck_all_import_but"> Uncheck all </button>
|
259
|
<button id="uncheck_colliding_import_but"> Uncheck existing </button>
|
260
|
<ul id="import_ul">
|
261
|
</ul>
|
262
|
<button id="commit_import_but"> OK </button>
|
263
|
<button id="cancel_import_but"> Cancel </button>
|
264
|
</div>
|
265
|
</div>
|
266
|
</div>
|
267
|
|
268
|
<a id="file_downloader" class="hide"></a>
|
269
|
<form id="file_opener_form" style="visibility: hidden;">
|
270
|
<input type="file" id="file_opener"></input>
|
271
|
</form>_OPTIONSSCRIPTS_
|
272
|
</body>
|
273
|
</html>
|