Project

General

Profile

Download (6.42 KB) Statistics
| Branch: | Tag: | Revision:

haketilo / html / options.html @ a43c3fe2

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="reset.css" />
12
    <link type="text/css" rel="stylesheet" href="base.css" />
13
    <style>
14
      /* pages list */
15
      #page_components_ul {
16
	  max-height: 80vh;
17
	  overflow-y: auto;
18
      }
19
      #page_components_ul li.dragover_li {
20
	  border-top: 2px solid blue;
21
      }
22
      #page_components_ul li {
23
	  border-top: 2px solid white;
24
      }
25
      li[draggable=true] * {
26
	  pointer-events: none;
27
      }
28
      li[draggable=true] label,
29
      li[draggable=true] button {
30
	  pointer-events: auto;
31
      }
32

    
33
      /* tabbed view */
34
      #show_repos:not(:checked) ~ #repos,
35
      #show_pages:not(:checked) ~ #pages,
36
      #show_bags:not(:checked) ~ #bags,
37
      #show_scripts:not(:checked) ~ #scripts {
38
	  display: none;
39
      }
40

    
41
      #show_repos:checked ~ #repos_lbl,
42
      #show_pages:checked ~ #pages_lbl,
43
      #show_bags:checked ~ #bags_lbl,
44
      #show_scripts:checked ~ #scripts_lbl {
45
	  background: #4CAF50;
46
          color: white;
47
      }
48

    
49
      body > div {
50
	  border-top: 6px solid #4CAF50;
51
      }
52

    
53
      .tab_head {
54
	  display: inline-block;
55
      }
56

    
57
      /* popup window with list of selectable components */
58
      .popup {
59
	  position: fixed;
60
	  width: 100vw;
61
	  height: 100vh;
62
	  left: 0;
63
	  top: 0;
64
	  background-color: rgba(0,0,0,0.4);
65
	  z-index: 1;
66
	  overflow: auto;
67
	  vertical-align: center;
68
	  horizontal-align: center;
69
      }
70

    
71
      .popup_frame {
72
	  background-color: white;
73
	  width: 50vw;
74
      }
75

    
76
      input[type="radio"]:not(:checked)+.import_window_content {
77
	  display: none;
78
      }
79
    </style>
80
  </head>
81
  <body>
82
    <template>
83
      <li id="item_li">
84
	<span></span>
85
	<button> Edit </button>
86
	<button> Remove </button>
87
	<button> Export </button>
88
      </li>
89
      <li id="bag_component_li">
90
	<span></span>
91
	<button> Remove </button>
92
      </li>
93
      <li id="chbx_component_li">
94
	<input type="checkbox" style="display: inline;"></input>
95
	<span></span>
96
      </li>
97
      <li id="radio_component_li">
98
	<input type="radio" style="display: inline;" name="page_components"></input>
99
	<span></span>
100
      </li>
101
    </template>
102

    
103
    <!-- Mind the show_*s ids below - their format is assumed in js code -->
104
    <input type="radio" name="tabs" id="show_repos"></input>
105
    <input type="radio" name="tabs" id="show_pages" checked></input>
106
    <input type="radio" name="tabs" id="show_bags"></input>
107
    <input type="radio" name="tabs" id="show_scripts"></input>
108
    <label for="show_repos" id="repos_lbl"
109
	   class="tab_head"> Repos </label>
110
    <label for="show_pages" id="pages_lbl"
111
	   class="tab_head"> Pages </label>
112
    <label for="show_bags" id="bags_lbl"
113
	   class="tab_head"> Bags </label>
114
    <label for="show_scripts" id="scripts_lbl"
115
	   class="tab_head"> Scripts </label>
116

    
117
    <div id="repos">
118
      <ul id="repos_ul">
119
	<li id="work_repo_li" class="hide">
120
	  <label for="repo_url_field">URL: </label>
121
	  <input id="repo_url_field"></input>
122
	  <br/>
123
	  <button id="save_repo_but" type="button"> Save </button>
124
	  <button id="discard_repo_but" type="button"> Cancel </button>
125
	</li>
126
      </ul>
127
      <button id="add_repo_but" type="button"> Add repository </button>
128
    </div>
129

    
130
    <div id="pages">
131
      <ul id="pages_ul">
132
	<li id="work_page_li" class="hide">
133
	  <label for="page_url_field">URL: </label>
134
	  <input id="page_url_field"></input>
135
	  <br/>
136
	  <label>Payload: </label>
137
	  <span id="page_payload"></span>
138
	  <button id="select_page_components_but">
139
	    Choose payload
140
	  </button>
141
	  <br/>
142
	  <input id="page_allow_chbx" type="checkbox" style="display: inline;"></input>
143
	  <label for="page_allow_chbx">Allow native scripts</label>
144
	  <br/>
145
	  <button id="save_page_but" type="button"> Save </button>
146
	  <button id="discard_page_but" type="button"> Cancel </button>
147
	</li>
148
      </ul>
149
      <button id="add_page_but" type="button"> Add page </button>
150
    </div>
151

    
152
    <div id="bags">
153
      <ul id="bags_ul">
154
	<li id="work_bag_li" class="hide">
155
	  <label for="bag_name_field"> Name: </label>
156
	  <input id="bag_name_field"></input>
157
	  <ul id="bag_components_ul">
158
	    <li id="empty_bag_component_li" class="hide"></li>
159
	  </ul>
160
	  <button id="select_bag_components_but">
161
	    Add scripts
162
	  </button>
163
	  <br/>
164
	  <button id="save_bag_but"> Save </button>
165
	  <button id="discard_bag_but"> Cancel </button>
166
	</li>
167
      </ul>
168
      <button id="add_bag_but" type="button"> Add bag </button>
169
    </div>
170

    
171
    <div id="scripts">
172
      <ul id="scripts_ul">
173
	<li id="work_script_li" class="hide">
174
	  <label for="script_name_field"> Name: </label>
175
	  <input id="script_name_field"></input>
176
	  <br/>
177
	  <label for="script_url_field"> URL: </label>
178
	  <input id="script_url_field"></input>
179
	  <br/>
180
	  <label for="script_sha256_field"> sha256: </label>
181
	  <input id="script_sha256_field"></input>
182
	  <br/>
183
	  <label for="script_contents_field"> contents: </label>
184
	  <textarea id="script_contents_field" rows="20" cols="80"></textarea>
185
	  <br/>
186
	  <button id="save_script_but"> Save </button>
187
	  <button id="discard_script_but"> Cancel </button>
188
	</li>
189
      </ul>
190
      <button id="add_script_but" type="button"> Add script </button>
191
    </div>
192

    
193
    <button id="import_but" style="margin-top: 40px;"> Import </button>
194

    
195
    <div id="chbx_components_window" class="hide popup" position="absolute">
196
      <div class="popup_frame">
197
	<ul id="chbx_components_ul">
198

    
199
	</ul>
200
	<button id="commit_bag_components_but"> Add </button>
201
	<button id="cancel_bag_components_but"> Cancel </button>
202
      </div>
203
    </div>
204

    
205
    <div id="radio_components_window" class="hide popup" position="absolute">
206
      <div class="popup_frame">
207
	<ul id="radio_components_ul">
208

    
209
	  <li id="radio_component_none_li">
210
	    <input id="radio_component_none_input" type="radio" style="display: inline;" name="page_components"></input>
211
	    <span>(None)</span>
212
	  </li>
213
	</ul>
214
	<button id="commit_page_components_but"> Choose </button>
215
	<button id="cancel_page_components_but"> Cancel </button>
216
      </div>
217
    </div>
218

    
219
    <div id="import_window" class="hide popup" position="absolute">
220
      <div class="popup_frame">
221
	<IMPORT html/import_frame.html />
222
      </div>
223
    </div>
224

    
225
    <a id="file_downloader" class="hide"></a>
226
    <form id="file_opener_form" style="visibility: hidden;">
227
      <input type="file" id="file_opener"></input>
228
    </form>_OPTIONSSCRIPTS_
229
  </body>
230
</html>
(7-7/9)