From 63ebc25a62c836dcc27329ae57d8792c317650c0 Mon Sep 17 00:00:00 2001 From: Matthieu Leproux Date: Mon, 4 Apr 2022 15:45:34 +0200 Subject: [PATCH] related to #1609 placed badges correctly and action icons are always visible --- admin/themes/default/js/albums.js | 6 ++++-- admin/themes/default/template/albums.tpl | 16 ++++++++++++++++ admin/themes/default/theme.css | 6 +----- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/admin/themes/default/js/albums.js b/admin/themes/default/js/albums.js index 2c6095126..feda7e7ab 100644 --- a/admin/themes/default/js/albums.js +++ b/admin/themes/default/js/albums.js @@ -37,6 +37,8 @@ $(document).ready(() => { cont.append(actions); + cont.find('.move-cat-action .move-cat-see').after(action_order); + if (node.children.length != 0) { open_nodes = $('.tree').tree('getState').open_nodes; if (open_nodes.includes(node.id)) { @@ -47,8 +49,8 @@ $(document).ready(() => { cont.append($(toggler_cont .replace(/%content%/g, toggler) .replace(/%id%/g, node.id))); - - cont.find('.move-cat-action .move-cat-see').after(action_order); + } else { + cont.find('.move-cat-order').addClass("notClickable"); } cont.append($(icon.replace(/%icon%/g, 'icon-grip-vertical-solid'))); diff --git a/admin/themes/default/template/albums.tpl b/admin/themes/default/template/albums.tpl index e5e061499..0b4f9ff33 100644 --- a/admin/themes/default/template/albums.tpl +++ b/admin/themes/default/template/albums.tpl @@ -440,10 +440,26 @@ input[name="position"] { margin: 0 10px 0 0; } +.badge-container { + position: absolute; + right: 275px; +} + .badge-container i { padding: 2px 6px 2px 4px!important; border-radius: 10px !important; font-size: 10px !important; margin: 0 2px !important; + font-weight: 700; + font-style: normal; +} + +.notClickable { + pointer-events: none; + opacity: 0.5; +} + +.notClickable:hover { + cursor: not-allowed; } \ No newline at end of file diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index 07ec2f098..08ef474f2 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -4189,7 +4189,7 @@ FORM#categoryOrdering p.albumActions .userSeparator {margin:0 5px;} } .move-cat-action-cont { - display: none; + display: flex; position: absolute; right: 50%; top : 50%; @@ -4202,10 +4202,6 @@ FORM#categoryOrdering p.albumActions .userSeparator {margin:0 5px;} overflow: hidden; } -.move-cat-container:hover .move-cat-action-cont { - display: flex; -} - .move-cat-action { display: flex; align-items: center;