From d2f1c3743172dc59e5935d77322998fa03c2cc22 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 16 Jul 2020 10:49:08 +0000 Subject: more itemspage work --- view/js/main.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 1e7ff59c4..77d2948c7 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -223,6 +223,34 @@ $(document).ready(function() { cache_next_page(); }); +//hide_aside plugin + var hide_aside_timer = null; + + $(document).on('hz:updateConvItems hz:updatePageItems', function(event) { + if(bParam_page > 2) { + if(hide_aside_timer) + clearTimeout(hide_aside_timer); + + hide_aside_timer = setTimeout(function(){$('aside').animate({ opacity: 0 }, 3000);}, 2000); + } + }); + + $('aside, aside *').on('mouseover', function(){ + clearTimeout(hide_aside_timer); + if(bParam_page > 2) + $('aside').animate({ opacity: 1 }); + }); + + $('aside').on('mouseleave', function(){ + if(bParam_page > 2) { + if(hide_aside_timer) + clearTimeout(hide_aside_timer); + + hide_aside_timer = setTimeout(function(){$('aside').animate({ opacity: 0 }, 3000);}, 7000); + } + }); +//end plugin + }); function getConversationSettings() { -- cgit v1.2.3