diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js index 21c8c1bb1447132db36596cc515c5ebe33ffa586..a2b9907aefcc2fcf1443fe80610c4c686bc8d2f0 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.js @@ -618,9 +618,12 @@ $(document).on("change", function(event) { } }); +var $page = $('html, body'); + $(document).on('click', 'a[data-load-content],button[data-load-content]', function(e) { e.preventDefault(); - $('html, body').animate({scrollTop: 0}, 1000); + $page.on('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); + $page.animate({scrollTop: 0}, 1000, function() { $page.off('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); }); var content_to_load = $(this).attr('data-load-content'); if(!content_to_load) return this; @@ -630,7 +633,8 @@ $(document).on('click', 'a[data-load-content],button[data-load-content]', functi $(document).on('click', 'a[data-capp],button[data-capp]', function(e) { e.preventDefault(); - $('html, body').animate({scrollTop: 0}, 1000); + $page.on('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); + $page.animate({scrollTop: 0}, 1000, function() { $page.off('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); }); var content_to_load = $(this).attr('data-capp'); if(!content_to_load) return this; @@ -640,7 +644,8 @@ $(document).on('click', 'a[data-capp],button[data-capp]', function(e) { $(document).on('click', 'a[data-submit-form],button[data-submit-form]', function(e) { e.preventDefault(); - $('html, body').animate({scrollTop: 0}, 1000); + $page.on('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); + $page.animate({scrollTop: 0}, 1000, function() { $page.off('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); }); var $el = $(this); var act = $el.attr('data-form-action'); diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm index 058eec33ab96ef07987fb218ff4ee1f874ef1bec..24a84c506522bcc927c6c3e221f9ae1233c4750b 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -84,7 +84,7 @@ <script type="text/javascript" src="js/jquery.min.js"></script> <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/bootstrap.min.js'></script> <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/bootstrap-datetimepicker.min.js'></script> - <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/ispconfig.min.js'></script> + <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/ispconfig.js'></script> <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/modernizr.custom.min.js'></script> <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/pushy.min.js'></script> <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/responsive.min.js'></script> diff --git a/interface/web/themes/default/templates/main_login.tpl.htm b/interface/web/themes/default/templates/main_login.tpl.htm index afcf4cf3172ffd37978619df339dc97469c3dc1d..dd31363f3c4c8b007edd42d8c8e4edaaca4cf98c 100644 --- a/interface/web/themes/default/templates/main_login.tpl.htm +++ b/interface/web/themes/default/templates/main_login.tpl.htm @@ -41,7 +41,7 @@ <script type="text/javascript" src="../js/jquery.min.js"></script> <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/bootstrap.min.js'></script> <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/bootstrap-datetimepicker.min.js'></script> - <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/ispconfig.min.js'></script> + <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/ispconfig.js'></script> <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/modernizr.custom.min.js'></script> <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/pushy.min.js'></script> <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/responsive.min.js'></script>