From f46f63b764de039796672d9fce499bae2c5c29aa Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 9 Feb 2014 22:23:09 +0100 Subject: [PATCH] Disable multiselect when searching --- assets/js/modules/multiselect.js | 1 + assets/js/modules/visible.js | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/assets/js/modules/multiselect.js b/assets/js/modules/multiselect.js index 52355d2..da71b20 100644 --- a/assets/js/modules/multiselect.js +++ b/assets/js/modules/multiselect.js @@ -20,6 +20,7 @@ multiselect = { if (mobileBrowser()) return false; if (lychee.publicMode) return false; + if (visible.search()) return false; if ($('.album:hover, .photo:hover').length!=0) return false; if (visible.multiselect()) $('#multiselect').remove(); diff --git a/assets/js/modules/visible.js b/assets/js/modules/visible.js index 505e5c8..4afaab7 100755 --- a/assets/js/modules/visible.js +++ b/assets/js/modules/visible.js @@ -8,47 +8,52 @@ visible = { albums: function() { - if ($("#tools_albums").css("display")==="block") return true; + if ($('#tools_albums').css('display')==='block') return true; else return false; }, album: function() { - if ($("#tools_album").css("display")==="block") return true; + if ($('#tools_album').css('display')==='block') return true; else return false; }, photo: function() { - if ($("#imageview.fadeIn").length>0) return true; + if ($('#imageview.fadeIn').length>0) return true; + else return false; + }, + + search: function() { + if (search.code!==null&&search.code!=='') return true; else return false; }, infobox: function() { - if ($("#infobox.active").length>0) return true; + if ($('#infobox.active').length>0) return true; else return false; }, controls: function() { - if (lychee.loadingBar.css("opacity")<1) return false; + if (lychee.loadingBar.css('opacity')<1) return false; else return true; }, message: function() { - if ($(".message").length>0) return true; + if ($('.message').length>0) return true; else return false; }, signin: function() { - if ($(".message .sign_in").length>0) return true; + if ($('.message .sign_in').length>0) return true; else return false; }, contextMenu: function() { - if ($(".contextmenu").length>0) return true; + if ($('.contextmenu').length>0) return true; else return false; }, multiselect: function() { - if ($("#multiselect").length>0) return true; + if ($('#multiselect').length>0) return true; else return false; }