From dca43a71bce1ee87e965b39824c7cee5e005a98c Mon Sep 17 00:00:00 2001 From: "Willy \"Linty" Date: Tue, 19 Dec 2023 17:48:07 +0100 Subject: [PATCH] issue #2072 Expand and Shrink album description field --- admin/themes/default/js/cat_modify.js | 23 +++++++ admin/themes/default/template/cat_modify.tpl | 20 +++++- admin/themes/default/theme.css | 66 ++++++++++++++++++++ admin/themes/roma/theme.css | 9 +++ language/en_UK/admin.lang.php | 2 + language/fr_FR/admin.lang.php | 2 + 6 files changed, 119 insertions(+), 3 deletions(-) diff --git a/admin/themes/default/js/cat_modify.js b/admin/themes/default/js/cat_modify.js index 156eac782..479c0cf9c 100644 --- a/admin/themes/default/js/cat_modify.js +++ b/admin/themes/default/js/cat_modify.js @@ -462,6 +462,29 @@ jQuery(document).ready(function() { } }); }); + + // Modal description + let form_unsaved = false; + const cat_modify = $('#cat-modify'); + const desc_modal = $('#desc-modal'); + const textareas = $('.sync-textarea'); + $('#desc-zoom-square, #desc-modal-close').on('click', function() { + desc_modal.fadeToggle(); + }); + textareas.keyup(function() { + textareas.val($(this).val()); + }); + $(window).on('click', function(e) { + if(e.target == desc_modal[0]){ + desc_modal.fadeToggle(); + } + }); + $(document).on('keyup', function (e) { + // 27 is 'Escape' + if(e.keyCode === 27) { + desc_modal.fadeToggle(); + } + }); }); function checkAlbumLock() { diff --git a/admin/themes/default/template/cat_modify.tpl b/admin/themes/default/template/cat_modify.tpl index 28fe01f17..716495726 100644 --- a/admin/themes/default/template/cat_modify.tpl +++ b/admin/themes/default/template/cat_modify.tpl @@ -39,7 +39,7 @@ str_album_comment_disallow = '{'Comments disallowed for sub-albums'|@translate}' str_root = '{'Root'|@translate}'; {/footer_script} -
+
@@ -140,8 +140,8 @@ str_root = '{'Root'|@translate}';
- - + +
@@ -194,9 +194,23 @@ str_root = '{'Root'|@translate}'; {'Save Settings'|@translate}
+
+
+
+

{'Description'|@translate}

+
+
+ +
+ +
+