From 238cee07e8466a720979d75eba82a67f41935a2e Mon Sep 17 00:00:00 2001 From: Matthieu Leproux Date: Wed, 9 Mar 2022 12:43:06 +0100 Subject: [PATCH] related to #1614 fixed bug when removing a related cat --- admin/themes/default/js/picture_modify.js | 6 +++++- admin/themes/default/theme.css | 17 ++++++++++++++++- include/ws_functions/pwg.categories.php | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/admin/themes/default/js/picture_modify.js b/admin/themes/default/js/picture_modify.js index 2ccd479fd..4a0e8acac 100644 --- a/admin/themes/default/js/picture_modify.js +++ b/admin/themes/default/js/picture_modify.js @@ -108,7 +108,11 @@ function fill_results(cats) { function remove_related_category(cat_id) { $(".invisible-related-categories-select option[value="+ cat_id +"]").remove(); $("#" + cat_id).parent().remove(); - related_categories_ids.pop(cat_id); + + cat_to_remove_index = related_categories_ids.indexOf(cat_id); + if (cat_to_remove_index > -1) { + related_categories_ids.splice(cat_to_remove_index, 1); + } check_related_categories(); } diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index 749ec73a7..c8a34ec85 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -6260,7 +6260,7 @@ color:#FF7B00; .linked-albums-badge { padding: 2px 6px; - background: #F1F1F1; + background: #DBDBDB; border-radius: 50px; font-size: 10px; transition: 0.3s; @@ -6283,6 +6283,12 @@ color:#FF7B00; align-items: center; position: relative; } +.breadcrumb-item:hover { + background: #ffd7ad; +} +.breadcrumb-item:hover .icon-cancel-circled{ + color: black; +} .breadcrumb-item a { padding: 0 5px; @@ -6481,4 +6487,13 @@ color:#FF7B00; color: #777; background: #fff; padding: 5px 0; +} + +.search-result-item .item-add:hover { + color: #ff7700; +} + +.search-result-item .notClickable { + opacity: 0.3; + color: black !important; } \ No newline at end of file diff --git a/include/ws_functions/pwg.categories.php b/include/ws_functions/pwg.categories.php index a991b6c3a..3c3ab82a7 100644 --- a/include/ws_functions/pwg.categories.php +++ b/include/ws_functions/pwg.categories.php @@ -513,7 +513,7 @@ SELECT SQL_CALC_FOUND_ROWS id, name, comment, uppercats, global_rank, dir, statu $cat_display_name = get_cat_display_name_cache( $row['uppercats'], - get_root_url().'admin.php?page=album-' + 'admin.php?page=album-' ); $row['name'] = strip_tags(