diff --git a/admin/cat_move.php b/admin/cat_move.php index bf3c4313e..6ad272f01 100644 --- a/admin/cat_move.php +++ b/admin/cat_move.php @@ -121,6 +121,8 @@ $template->assign( ) ); +$template->assign('delay_before_autoOpen', $conf['delay_before_auto_openning']); + // +-----------------------------------------------------------------------+ // | Album display | // +-----------------------------------------------------------------------+ diff --git a/admin/themes/default/js/cat_move.js b/admin/themes/default/js/cat_move.js index c4ed148c5..393f35555 100644 --- a/admin/themes/default/js/cat_move.js +++ b/admin/themes/default/js/cat_move.js @@ -6,7 +6,7 @@ $(document).ready(() => { data: formatedData, autoOpen : false, dragAndDrop: true, - openFolderDelay: 1010010001010101, + openFolderDelay: delay_autoOpen, onCreateLi : createAlbumNode, onCanSelectNode: function(node) {return false} }); diff --git a/admin/themes/default/template/cat_move.tpl b/admin/themes/default/template/cat_move.tpl index 98e341f9a..192cf23d1 100644 --- a/admin/themes/default/template/cat_move.tpl +++ b/admin/themes/default/template/cat_move.tpl @@ -12,6 +12,10 @@ var str_yes_change_parent = "{'Yes change parent anyway'|@translate}" var str_no_change_parent = "{'No, don\'t move this album here'|@translate}" 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/include/config_default.inc.php b/include/config_default.inc.php index 4591a08bf..3de4ba12c 100644 --- a/include/config_default.inc.php +++ b/include/config_default.inc.php @@ -716,6 +716,9 @@ $conf['dashboard_check_for_updates'] = true; // Number Weeks displayed on activity chart on the dashboard $conf['dashboard_activity_nb_weeks'] = 4; +// Number of seconds before auto openning when dragging albums in milliseconds : 3 seconds by default +$conf['delay_before_auto_openning'] = 3*1000; + // +-----------------------------------------------------------------------+ // | Filter | // +-----------------------------------------------------------------------+