You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lychee/src/scripts/visible.js

51 lines
1.2 KiB

/**
* @description This module is used to check if elements are visible or not.
*/
10 years ago
visible = {}
10 years ago
visible.albums = function() {
if (header.dom('.header__toolbar--public').hasClass('header__toolbar--visible')) return true
if (header.dom('.header__toolbar--albums').hasClass('header__toolbar--visible')) return true
9 years ago
return false
10 years ago
}
10 years ago
visible.album = function() {
if (header.dom('.header__toolbar--album').hasClass('header__toolbar--visible')) return true
9 years ago
return false
10 years ago
}
10 years ago
visible.photo = function() {
9 years ago
if ($('#imageview.fadeIn').length>0) return true
return false
10 years ago
}
10 years ago
10 years ago
visible.search = function() {
if (search.hash!=null) return true
9 years ago
return false
10 years ago
}
visible.sidebar = function() {
9 years ago
if (sidebar.dom().hasClass('active')===true) return true
return false
10 years ago
}
visible.sidebarbutton = function() {
9 years ago
if (visible.photo()) return true
if (visible.album() && $('#button_info_album:visible').length>0) return true
return false
10 years ago
}
visible.header = function() {
if (header.dom().hasClass('header--hidden')===true) return false
9 years ago
return true
10 years ago
}
10 years ago
visible.contextMenu = function() {
9 years ago
return basicContext.visible()
10 years ago
}
10 years ago
10 years ago
visible.multiselect = function() {
9 years ago
if ($('#multiselect').length>0) return true
return false
10 years ago
}