lychee/assets/js/visible.js

67 lines
1.4 KiB
JavaScript
Raw Normal View History

/**
* @name Visible Module
* @description This module is used to check if elements are visible or not.
* @author Tobias Reich
* @copyright 2014 by Tobias Reich
*/
visible = {
albums: function() {
2014-02-09 21:23:09 +00:00
if ($('#tools_albums').css('display')==='block') return true;
else return false;
},
album: function() {
2014-02-09 21:23:09 +00:00
if ($('#tools_album').css('display')==='block') return true;
else return false;
},
photo: function() {
2014-02-09 21:23:09 +00:00
if ($('#imageview.fadeIn').length>0) return true;
else return false;
},
2014-02-17 15:22:53 +00:00
2014-02-09 21:23:09 +00:00
search: function() {
if (search.code!==null&&search.code!=='') return true;
else return false;
},
infobox: function() {
2014-02-09 21:23:09 +00:00
if ($('#infobox.active').length>0) return true;
else return false;
},
infoboxbutton: function() {
if (visible.albums()) return false;
if (visible.photo()) return true;
if (visible.album()&&$('#button_info_album:visible').length>0) return true;
else return false;
},
controls: function() {
2014-02-09 21:23:09 +00:00
if (lychee.loadingBar.css('opacity')<1) return false;
else return true;
},
message: function() {
2014-02-09 21:23:09 +00:00
if ($('.message').length>0) return true;
else return false;
},
signin: function() {
2014-02-09 21:23:09 +00:00
if ($('.message .sign_in').length>0) return true;
else return false;
},
contextMenu: function() {
2014-02-09 21:23:09 +00:00
if ($('.contextmenu').length>0) return true;
else return false;
},
2014-02-17 15:22:53 +00:00
multiselect: function() {
2014-02-09 21:23:09 +00:00
if ($('#multiselect').length>0) return true;
else return false;
}
2014-02-25 22:37:05 +00:00
};