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
|
<link type="text/css" rel="stylesheet" href="base.css" />
|
12
|
<style>
|
13
|
/* pages list */
|
14
|
#page_components_ul {
|
15
|
max-height: 80vh;
|
16
|
overflow-y: auto;
|
17
|
}
|
18
|
#page_components_ul li.dragover_li {
|
19
|
border-top: 2px solid blue;
|
20
|
}
|
21
|
#page_components_ul li {
|
22
|
border-top: 2px solid white;
|
23
|
}
|
24
|
li[draggable=true] * {
|
25
|
pointer-events: none;
|
26
|
}
|
27
|
li[draggable=true] label,
|
28
|
li[draggable=true] button {
|
29
|
pointer-events: auto;
|
30
|
}
|
31
|
|
32
|
/* tabbed view */
|
33
|
#show_repos:not(:checked) ~ #repos,
|
34
|
#show_pages:not(:checked) ~ #pages,
|
35
|
#show_bags:not(:checked) ~ #bags,
|
36
|
#show_scripts:not(:checked) ~ #scripts {
|
37
|
display: none;
|
38
|
}
|
39
|
|
40
|
#show_repos:checked ~ #repos_lbl,
|
41
|
#show_pages:checked ~ #pages_lbl,
|
42
|
#show_bags:checked ~ #bags_lbl,
|
43
|
#show_scripts:checked ~ #scripts_lbl {
|
44
|
background: #4CAF50;
|
45
|
color: white;
|
46
|
}
|
47
|
|
48
|
body > div {
|
49
|
border-top: 6px solid #4CAF50;
|
50
|
}
|
51
|
|
52
|
.tab_head {
|
53
|
display: inline-block;
|
54
|
}
|
55
|
|
56
|
/* popup window with list of selectable components */
|
57
|
.popup {
|
58
|
position: fixed;
|
59
|
width: 100vw;
|
60
|
height: 100vh;
|
61
|
left: 0;
|
62
|
top: 0;
|
63
|
background-color: rgba(0,0,0,0.4);
|
64
|
z-index: 1;
|
65
|
overflow: auto;
|
66
|
vertical-align: center;
|
67
|
horizontal-align: center;
|
68
|
}
|
69
|
|
70
|
.popup_frame {
|
71
|
background-color: white;
|
72
|
width: 50vw;
|
73
|
}
|
74
|
|
75
|
input[type="radio"]:not(:checked)+.import_window_content {
|
76
|
display: none;
|
77
|
}
|
78
|
</style>
|
79
|
</head>
|
80
|
<body>
|
81
|
<template>
|
82
|
<li id="item_li">
|
83
|
<span></span>
|
84
|
<button> Edit </button>
|
85
|
<button> Remove </button>
|
86
|
<button> Export </button>
|
87
|
</li>
|
88
|
<li id="bag_component_li">
|
89
|
<span></span>
|
90
|
<button> Remove </button>
|
91
|
</li>
|
92
|
<li id="chbx_component_li">
|
93
|
<input type="checkbox" style="display: inline;"></input>
|
94
|
<span></span>
|
95
|
</li>
|
96
|
<li id="radio_component_li">
|
97
|
<input type="radio" style="display: inline;" name="page_components"></input>
|
98
|
<span></span>
|
99
|
</li>
|
100
|
</template>
|
101
|
|
102
|
<!-- Mind the show_*s ids below - their format is assumed in js code -->
|
103
|
<input type="radio" name="tabs" id="show_repos"></input>
|
104
|
<input type="radio" name="tabs" id="show_pages" checked></input>
|
105
|
<input type="radio" name="tabs" id="show_bags"></input>
|
106
|
<input type="radio" name="tabs" id="show_scripts"></input>
|
107
|
<label for="show_repos" id="repos_lbl"
|
108
|
class="tab_head"> Repos </label>
|
109
|
<label for="show_pages" id="pages_lbl"
|
110
|
class="tab_head"> Pages </label>
|
111
|
<label for="show_bags" id="bags_lbl"
|
112
|
class="tab_head"> Bags </label>
|
113
|
<label for="show_scripts" id="scripts_lbl"
|
114
|
class="tab_head"> Scripts </label>
|
115
|
|
116
|
<div id="repos">
|
117
|
<ul id="repos_ul">
|
118
|
<li id="work_repo_li" class="hide">
|
119
|
<label for="repo_url_field">URL: </label>
|
120
|
<input id="repo_url_field"></input>
|
121
|
<br/>
|
122
|
<button id="save_repo_but" type="button"> Save </button>
|
123
|
<button id="discard_repo_but" type="button"> Cancel </button>
|
124
|
</li>
|
125
|
</ul>
|
126
|
<button id="add_repo_but" type="button"> Add repository </button>
|
127
|
</div>
|
128
|
|
129
|
<div id="pages">
|
130
|
<ul id="pages_ul">
|
131
|
<li id="work_page_li" class="hide">
|
132
|
<label for="page_url_field">URL: </label>
|
133
|
<input id="page_url_field"></input>
|
134
|
<br/>
|
135
|
<label>Payload: </label>
|
136
|
<span id="page_payload"></span>
|
137
|
<button id="select_page_components_but">
|
138
|
Choose payload
|
139
|
</button>
|
140
|
<br/>
|
141
|
<input id="page_allow_chbx" type="checkbox" style="display: inline;"></input>
|
142
|
<label for="page_allow_chbx">Allow native scripts</label>
|
143
|
<br/>
|
144
|
<button id="save_page_but" type="button"> Save </button>
|
145
|
<button id="discard_page_but" type="button"> Cancel </button>
|
146
|
</li>
|
147
|
</ul>
|
148
|
<button id="add_page_but" type="button"> Add page </button>
|
149
|
</div>
|
150
|
|
151
|
<div id="bags">
|
152
|
<ul id="bags_ul">
|
153
|
<li id="work_bag_li" class="hide">
|
154
|
<label for="bag_name_field"> Name: </label>
|
155
|
<input id="bag_name_field"></input>
|
156
|
<ul id="bag_components_ul">
|
157
|
<li id="empty_bag_component_li" class="hide"></li>
|
158
|
</ul>
|
159
|
<button id="select_bag_components_but">
|
160
|
Add scripts
|
161
|
</button>
|
162
|
<br/>
|
163
|
<button id="save_bag_but"> Save </button>
|
164
|
<button id="discard_bag_but"> Cancel </button>
|
165
|
</li>
|
166
|
</ul>
|
167
|
<button id="add_bag_but" type="button"> Add bag </button>
|
168
|
</div>
|
169
|
|
170
|
<div id="scripts">
|
171
|
<ul id="scripts_ul">
|
172
|
<li id="work_script_li" class="hide">
|
173
|
<label for="script_name_field"> Name: </label>
|
174
|
<input id="script_name_field"></input>
|
175
|
<br/>
|
176
|
<label for="script_url_field"> URL: </label>
|
177
|
<input id="script_url_field"></input>
|
178
|
<br/>
|
179
|
<label for="script_sha256_field"> sha256: </label>
|
180
|
<input id="script_sha256_field"></input>
|
181
|
<br/>
|
182
|
<label for="script_contents_field"> contents: </label>
|
183
|
<textarea id="script_contents_field" rows="20" cols="80"></textarea>
|
184
|
<br/>
|
185
|
<button id="save_script_but"> Save </button>
|
186
|
<button id="discard_script_but"> Cancel </button>
|
187
|
</li>
|
188
|
</ul>
|
189
|
<button id="add_script_but" type="button"> Add script </button>
|
190
|
</div>
|
191
|
|
192
|
<button id="import_but" style="margin-top: 40px;"> Import </button>
|
193
|
|
194
|
<div id="chbx_components_window" class="hide popup" position="absolute">
|
195
|
<div class="popup_frame">
|
196
|
<ul id="chbx_components_ul">
|
197
|
|
198
|
</ul>
|
199
|
<button id="commit_bag_components_but"> Add </button>
|
200
|
<button id="cancel_bag_components_but"> Cancel </button>
|
201
|
</div>
|
202
|
</div>
|
203
|
|
204
|
<div id="radio_components_window" class="hide popup" position="absolute">
|
205
|
<div class="popup_frame">
|
206
|
<ul id="radio_components_ul">
|
207
|
|
208
|
<li id="radio_component_none_li">
|
209
|
<input id="radio_component_none_input" type="radio" style="display: inline;" name="page_components"></input>
|
210
|
<span>(None)</span>
|
211
|
</li>
|
212
|
</ul>
|
213
|
<button id="commit_page_components_but"> Choose </button>
|
214
|
<button id="cancel_page_components_but"> Cancel </button>
|
215
|
</div>
|
216
|
</div>
|
217
|
|
218
|
<div id="import_window" class="hide popup" position="absolute">
|
219
|
<div class="popup_frame">
|
220
|
<IMPORT html/import_frame.html />
|
221
|
</div>
|
222
|
</div>
|
223
|
|
224
|
<a id="file_downloader" class="hide"></a>
|
225
|
<form id="file_opener_form" style="visibility: hidden;">
|
226
|
<input type="file" id="file_opener"></input>
|
227
|
</form>_OPTIONSSCRIPTS_
|
228
|
</body>
|
229
|
</html>
|