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}

+
+
+ +
+ +
+