summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-material/htdocs/luci-static/material/cascade.css
diff options
context:
space:
mode:
authorRamon Van Gorkom <Ramon00c00@gmail.com>2024-11-21 21:34:14 +0100
committerPaul Donald <newtwen+github@gmail.com>2024-11-27 21:43:16 +0100
commit80f18df48fcc39d22dfabb133e9bc823d7aeff86 (patch)
treead2c055a0340c4b35aa61bf0b4261b86f315f0e6 /themes/luci-theme-material/htdocs/luci-static/material/cascade.css
parentfefb9acf57ad11012c336e4d056b074620b87d2f (diff)
luci-base: make items of UIDynamicList drag-sortable
Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
Diffstat (limited to 'themes/luci-theme-material/htdocs/luci-static/material/cascade.css')
-rw-r--r--themes/luci-theme-material/htdocs/luci-static/material/cascade.css26
1 files changed, 25 insertions, 1 deletions
diff --git a/themes/luci-theme-material/htdocs/luci-static/material/cascade.css b/themes/luci-theme-material/htdocs/luci-static/material/cascade.css
index fdcb98eb5b..29d83bd42e 100644
--- a/themes/luci-theme-material/htdocs/luci-static/material/cascade.css
+++ b/themes/luci-theme-material/htdocs/luci-static/material/cascade.css
@@ -1378,10 +1378,12 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
max-width: 25rem;
margin-right: 2em;
padding: .5em .25em .25em 0;
- pointer-events: none;
+ pointer-events: auto; /* needed for drag-and-drop in UIDynamicList */
color: #666;
border-bottom: 2px solid rgba(0, 0, 0, .26);
outline: 0;
+ cursor: move; /* drag-and-drop */
+ user-select: text; /* text selection in drag-and-drop */
}
.cbi-dynlist[name="sshkeys"] > .item {
@@ -1403,9 +1405,21 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
background-color: var(--red-color-high);
}
+/* indication line for drag-and-drop in UIDynamicList*/
+.cbi-dynlist > .item.drag-over {
+ border-top: 1px solid black;
+}
+
+/* Make item being dragged in UIDynamicList partially transparent*/
+.cbi-dynlist > .item.dragging {
+ opacity: 0.5;
+}
+
+/* prevent pointer changing when over the span element in UIDynamicList */
.cbi-dynlist > .item > span {
white-space: normal;
word-break: break-word;
+ pointer-events: none;
}
.cbi-dynlist > .add-item {
@@ -1415,6 +1429,16 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
min-width: 16rem;
}
+/* indication line for drag-and-drop in UIDynamicList*/
+.cbi-dynlist > .add-item > .cbi-input-text.drag-over {
+ border-top: 1px solid black;
+}
+
+/* indication line for drag-and-drop in UIDynamicList*/
+.cbi-dynlist > .add-item > .cbi-button-add.drag-over {
+ border-top: 1px solid black;
+}
+
.cbi-dynlist > .add-item:not([ondrop]) > input {
overflow: hidden;
width: 100%;