diff --git a/admin/themes/default/js/tags.js b/admin/themes/default/js/tags.js index 373852081..7b90e5070 100644 --- a/admin/themes/default/js/tags.js +++ b/admin/themes/default/js/tags.js @@ -858,10 +858,10 @@ function updatePaginationMenu() { actualPage = Math.min(actualPage, getNumberPages()); if (getNumberPages() > 1) { - $('.tag-pagination').show(); + $('.pagination-container').show(); createPaginationMenu(); } else { - $('.tag-pagination').hide(); + $('.pagination-container').hide(); } updateArrows(); @@ -947,7 +947,7 @@ function updatePage() { dataToDisplay = tagToDisplay(); tagBoxes = $('.tag-box'); $('.pageLoad').fadeIn();; - $('.tag-box, .tag-pagination').animate({opacity:0}, 500).promise().then(() => { + $('.tag-box').animate({opacity:0}, 500).promise().then(() => { let displayTags = new Promise((res, rej) => { boxToRecycle = Math.min(dataToDisplay.length, tagBoxes.length); @@ -1006,16 +1006,19 @@ $('.pagination-arrow.left').on('click', () => { }) if (getNumberPages() > 1) { - $('.tag-pagination').show(); + $('.pagination-container').show(); createPaginationMenu(); updateArrows(); } else { - $('.tag-pagination').hide(); + $('.pagination-container').hide(); } $('.pagination-per-page a').on('click',function () { per_page = parseInt($(this).html()); updatePaginationMenu(); + $(".pagination-per-page .selected").removeClass("selected"); + $(this).addClass("selected"); + $.cookie("pwg_tags_per_page", per_page); }) function updateSearchInfo () { @@ -1029,4 +1032,14 @@ function updateSearchInfo () { } else { $('.search-info').html(''); } -} \ No newline at end of file +} + +$(function () { + function setPagination() { + let test = $.cookie("pwg_tags_per_page"); + $(".pagination-per-page .selected").removeClass("selected"); + $("#"+test).trigger("click"); + } + + setPagination() +}) \ No newline at end of file diff --git a/admin/themes/default/template/tags.tpl b/admin/themes/default/template/tags.tpl index 7fd364fbb..845d7fb8f 100644 --- a/admin/themes/default/template/tags.tpl +++ b/admin/themes/default/template/tags.tpl @@ -35,6 +35,7 @@ var str_tag_found = '{'%d tag found'|@translate}'; {combine_css path="admin/themes/default/fontello/css/animation.css" order=10} {* order 10 is required, see issue 1080 *} {combine_script id='tiptip' load='header' path='themes/default/js/plugins/jquery.tipTip.minified.js'} {combine_script id='tags' load='footer' path='admin/themes/default/js/tags.js'} +{combine_script id='jquery.cookie' path='themes/default/js/jquery.cookie.js' load='footer'} @@ -167,10 +168,26 @@ var str_tag_found = '{'%d tag found'|@translate}';
{'Display'|@translate} - 100 - 200 - 500 - 1000 + 100 + 200 + 500 + 1000
diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index e247b69b0..e70f9f56d 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -2902,6 +2902,9 @@ a#showPermissions:hover {text-decoration: none;} color: #ffa744; } +.tag-pagination .selected { + background: #ffa646; +} .tag-container .tag-box .tag-rename span { padding: 2px 3px;