1
|
#IF !TEXT_ENTRY_LIST_LOADED
|
2
|
#DEFINE TEXT_ENTRY_LIST_LOADED
|
3
|
<!--
|
4
|
SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0
|
5
|
|
6
|
List of editable entries. Used to make UI for management of repo URLs and
|
7
|
script allowing/blocking rules.
|
8
|
|
9
|
This file is part of Haketilo.
|
10
|
|
11
|
Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
|
12
|
|
13
|
File is dual-licensed. You can choose either GPLv3+, CC BY-SA or both.
|
14
|
|
15
|
This program is free software: you can redistribute it and/or modify
|
16
|
it under the terms of the GNU General Public License as published by
|
17
|
the Free Software Foundation, either version 3 of the License, or
|
18
|
(at your option) any later version.
|
19
|
|
20
|
This program is distributed in the hope that it will be useful,
|
21
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23
|
GNU General Public License for more details.
|
24
|
|
25
|
You should have received a copy of the GNU General Public License
|
26
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
27
|
|
28
|
I, Wojtek Kosior, thereby promise not to sue for violation of this file's
|
29
|
licenses. Although I request that you do not make use of this code in a
|
30
|
proprietary program, I am not going to enforce this in court.
|
31
|
-->
|
32
|
|
33
|
<!--
|
34
|
This is not a standalone page. This file is meant to be imported into other
|
35
|
HTML code.
|
36
|
-->
|
37
|
|
38
|
#LOADCSS html/reset.css
|
39
|
#LOADCSS html/base.css
|
40
|
#LOADCSS html/grid.css
|
41
|
<style>
|
42
|
.text_entry {
|
43
|
padding: 0.1em 0.2em;
|
44
|
}
|
45
|
.text_entry button {
|
46
|
margin: 0.1em 0 0.1em 0.2em;
|
47
|
}
|
48
|
.text_entry_editable, .text_entry_noneditable {
|
49
|
display: grid;
|
50
|
grid-template-columns: 1fr auto auto;
|
51
|
}
|
52
|
.text_entry_noneditable {
|
53
|
grid-template-columns: 1fr auto;
|
54
|
}
|
55
|
|
56
|
.text_entries {
|
57
|
min-height: 3em;
|
58
|
background: #cfcfcf;
|
59
|
overflow-y: scroll;
|
60
|
min-width: 10em;
|
61
|
margin: 0.2em 0;
|
62
|
height: calc(var(--content-height) - 5em);
|
63
|
}
|
64
|
.text_entries>:nth-child(2n) {
|
65
|
background-color:#dadada;
|
66
|
}
|
67
|
.text_entries span {
|
68
|
padding: 0.4em;
|
69
|
}
|
70
|
</style>
|
71
|
<template>
|
72
|
<div id="text_entry" data-template="main_div" class="text_entry">
|
73
|
<div data-template="noneditable_view" class="text_entry_noneditable">
|
74
|
<span data-template="text"></span>
|
75
|
<button data-template="remove_but">Remove</button>
|
76
|
</div>
|
77
|
<div data-template="editable_view" class="hide text_entry_editable">
|
78
|
<input data-template="input">
|
79
|
<button data-template="add_but" class="hide">Add</button>
|
80
|
<button data-template="save_but">Save</button>
|
81
|
<button data-template="cancel_but">Cancel</button>
|
82
|
</div>
|
83
|
</div>
|
84
|
<div id="text_entry_list" data-template="main_div" class="grid_1">
|
85
|
<div data-template="list_div" class="text_entries">
|
86
|
</div>
|
87
|
<button data-template="new_but">New</button>
|
88
|
</div>
|
89
|
</template>
|
90
|
#ENDIF
|