diff --git a/admin/cat_move.php b/admin/cat_move.php index 6ad272f01..b6a793b3e 100644 --- a/admin/cat_move.php +++ b/admin/cat_move.php @@ -121,7 +121,7 @@ $template->assign( ) ); -$template->assign('delay_before_autoOpen', $conf['delay_before_auto_openning']); +$template->assign('delay_before_autoOpen', $conf['album_move_delay_before_auto_opening']); // +-----------------------------------------------------------------------+ // | Album display | diff --git a/admin/themes/default/template/cat_move.tpl b/admin/themes/default/template/cat_move.tpl index 192cf23d1..0d4cfd8b9 100644 --- a/admin/themes/default/template/cat_move.tpl +++ b/admin/themes/default/template/cat_move.tpl @@ -14,8 +14,6 @@ var str_root = "{'Root'|@translate}" var openCat = {$open_cat}; var delay_autoOpen = {$delay_before_autoOpen} - -console.log(delay_autoOpen) {/footer_script} {combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'} diff --git a/admin/themes/default/template/cat_search.tpl b/admin/themes/default/template/cat_search.tpl index 7f24b1df1..9cb92536c 100644 --- a/admin/themes/default/template/cat_search.tpl +++ b/admin/themes/default/template/cat_search.tpl @@ -16,12 +16,14 @@ const RESULT_LIMIT = 100; var str_albums_found = '{"%d albums found"|translate}'; var str_album_found = '{"1 album found"|translate}'; -var str_result_limit = '{"%d+ albums found, try to refine the search"|translate}'; +var str_result_limit = '{"%d+ albums found, try to refine the search"|translate|escape:javascript}'; {literal} var editLink = "admin.php?page=album-"; var colors = ["icon-red", "icon-blue", "icon-yellow", "icon-purple", "icon-green"]; +$(".limit-album-reached").hide(); + $('.search-input').on('input', () => { updateSearch(); }) @@ -31,6 +33,7 @@ function updateSearch () { string = $('.search-input').val(); $('.search-album-result').html(""); $('.search-album-noresult').hide(); + $(".limit-album-reached").hide(); if (string == '') { // help button unnecessary so do not show // $('.search-album-help').show(); @@ -44,8 +47,8 @@ function updateSearch () { nbResult = 0; categories.forEach((c) => { if (c[0].toString().toLowerCase().search(string.toLowerCase()) != -1 && nbResult < RESULT_LIMIT) { - addAlbumResult(c); nbResult++; + addAlbumResult(c, nbResult); } }) @@ -68,7 +71,7 @@ function updateSearch () { } // Add an album as a result in the page -function addAlbumResult (cat) { +function addAlbumResult (cat, nbResult) { id = cat[1][cat[1].length - 1]; template = $('.search-album-elem-template').html(); newCatNode = $(template); @@ -97,6 +100,11 @@ function addAlbumResult (cat) { newCatNode.find('.search-album-edit').attr('href', href); $('.search-album-result').append(newCatNode); + + if(nbResult >= RESULT_LIMIT) { + $(".limit-album-reached").show(1000); + $('.limit-album-reached').html(str_result_limit.replace('%d', nbResult)); + } } // Get the path "PARENT / parent / album" with link to the edition of all albums @@ -168,8 +176,17 @@ $('.search-input').focus();