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
|
#LOADCSS html/scrollbars.css
|
42
|
<style>
|
43
|
.text_entry {
|
44
|
padding: 0.1em 0.2em;
|
45
|
}
|
46
|
.text_entry button {
|
47
|
margin: 0.1em 0 0.1em 0.2em;
|
48
|
}
|
49
|
.text_entry_editable, .text_entry_noneditable {
|
50
|
display: grid;
|
51
|
grid-template-columns: 1fr auto auto;
|
52
|
}
|
53
|
.text_entry_noneditable {
|
54
|
grid-template-columns: 1fr auto;
|
55
|
}
|
56
|
|
57
|
.text_entries {
|
58
|
min-height: 3em;
|
59
|
background: #cfcfcf;
|
60
|
overflow-y: scroll;
|
61
|
min-width: 10em;
|
62
|
margin: 0.2em 0;
|
63
|
height: calc(var(--content-height) - 5em);
|
64
|
}
|
65
|
|
66
|
.text_entries>:nth-child(2n) {
|
67
|
background-color:#dadada;
|
68
|
}
|
69
|
.text_entries span {
|
70
|
padding: 0.4em;
|
71
|
}
|
72
|
</style>
|
73
|
<template>
|
74
|
<div id="text_entry" data-template="main_div" class="text_entry">
|
75
|
<div data-template="noneditable_view" class="text_entry_noneditable">
|
76
|
<span data-template="text"></span>
|
77
|
<button data-template="remove_but">Remove</button>
|
78
|
</div>
|
79
|
<div data-template="editable_view" class="hide text_entry_editable">
|
80
|
<input data-template="input">
|
81
|
<button data-template="add_but" class="hide">Add</button>
|
82
|
<button data-template="save_but">Save</button>
|
83
|
<button data-template="cancel_but">Cancel</button>
|
84
|
</div>
|
85
|
</div>
|
86
|
<div id="text_entry_list" data-template="main_div" class="grid_1">
|
87
|
<div data-template="list_div" class="text_entries scrollbar_visible">
|
88
|
</div>
|
89
|
<button data-template="new_but">New</button>
|
90
|
</div>
|
91
|
</template>
|
92
|
#ENDIF
|