diff --git a/src/scripts/header.js b/src/scripts/header.js index e411b30..716a51c 100644 --- a/src/scripts/header.js +++ b/src/scripts/header.js @@ -80,7 +80,7 @@ header.show = function() { header.hide = function(e, delay = 500) { - if (visible.photo() && !visible.sidebar() && !visible.contextMenu() && !visible.message()) { + if (visible.photo() && !visible.sidebar() && !visible.contextMenu() && basicModal.visible()===false) { clearTimeout($(window).data('timeout')) diff --git a/src/scripts/init.js b/src/scripts/init.js index 39672a3..268a769 100755 --- a/src/scripts/init.js +++ b/src/scripts/init.js @@ -52,12 +52,12 @@ $(document).ready(function() { if (!visible.multiselect()) { sidebar.toggle(); return false } }) .bind(['command+backspace', 'ctrl+backspace'], function() { - if (visible.photo() && !visible.message()) { photo.delete([photo.getID()]); return false } - else if (visible.album() && !visible.message()) { album.delete([album.getID()]); return false } + if (visible.photo() && basicModal.visible()===false) { photo.delete([photo.getID()]); return false } + else if (visible.album() && basicModal.visible()===false) { album.delete([album.getID()]); return false } }) .bind(['command+a', 'ctrl+a'], function() { - if (visible.album() && !visible.message()) { multiselect.selectAll(); return false } - else if (visible.albums() && !visible.message()) { multiselect.selectAll(); return false } + if (visible.album() && basicModal.visible()===false) { multiselect.selectAll(); return false } + else if (visible.albums() && basicModal.visible()===false) { multiselect.selectAll(); return false } }) Mousetrap.bindGlobal('enter', function() { diff --git a/src/scripts/visible.js b/src/scripts/visible.js index 1bc47f6..25eed62 100755 --- a/src/scripts/visible.js +++ b/src/scripts/visible.js @@ -41,10 +41,6 @@ visible.header = function() { return true } -visible.message = function() { - return basicModal.visible() -} - visible.contextMenu = function() { return basicContext.visible() }