2013-05-03 11:57:08 +00:00
|
|
|
/**
|
2014-01-22 10:12:51 +00:00
|
|
|
* @description This module is used to check if elements are visible or not.
|
2015-02-01 21:08:37 +00:00
|
|
|
* @copyright 2015 by Tobias Reich
|
2013-05-03 11:57:08 +00:00
|
|
|
*/
|
|
|
|
|
2014-10-18 16:13:45 +00:00
|
|
|
visible = {}
|
2013-05-03 11:57:08 +00:00
|
|
|
|
2014-10-18 16:02:06 +00:00
|
|
|
visible.albums = function() {
|
|
|
|
if ($('#tools_albums').css('display')==='block') return true;
|
2014-11-20 22:27:41 +00:00
|
|
|
return false;
|
2014-10-18 16:08:35 +00:00
|
|
|
}
|
2013-05-03 11:57:08 +00:00
|
|
|
|
2014-10-18 16:02:06 +00:00
|
|
|
visible.album = function() {
|
|
|
|
if ($('#tools_album').css('display')==='block') return true;
|
2014-11-20 22:27:41 +00:00
|
|
|
return false;
|
2014-10-18 16:08:35 +00:00
|
|
|
}
|
2013-09-03 09:59:30 +00:00
|
|
|
|
2014-10-18 16:02:06 +00:00
|
|
|
visible.photo = function() {
|
|
|
|
if ($('#imageview.fadeIn').length>0) return true;
|
2014-11-20 22:27:41 +00:00
|
|
|
return false;
|
2014-10-18 16:08:35 +00:00
|
|
|
}
|
2014-02-17 15:22:53 +00:00
|
|
|
|
2014-10-18 16:02:06 +00:00
|
|
|
visible.search = function() {
|
2015-02-27 21:39:07 +00:00
|
|
|
if (search.hash!==null) return true;
|
2014-11-20 22:27:41 +00:00
|
|
|
return false;
|
2014-10-18 16:08:35 +00:00
|
|
|
}
|
2013-05-03 11:57:08 +00:00
|
|
|
|
2014-10-18 16:02:06 +00:00
|
|
|
visible.infobox = function() {
|
|
|
|
if ($('#infobox.active').length>0) return true;
|
2014-11-20 22:27:41 +00:00
|
|
|
return false;
|
2014-10-18 16:08:35 +00:00
|
|
|
}
|
2013-05-03 11:57:08 +00:00
|
|
|
|
2014-10-18 16:02:06 +00:00
|
|
|
visible.infoboxbutton = function() {
|
|
|
|
if (visible.albums()) return false;
|
|
|
|
if (visible.photo()) return true;
|
|
|
|
if (visible.album()&&$('#button_info_album:visible').length>0) return true;
|
2014-11-20 22:27:41 +00:00
|
|
|
return false;
|
2014-10-18 16:08:35 +00:00
|
|
|
}
|
2014-05-17 21:30:02 +00:00
|
|
|
|
2015-03-06 21:48:41 +00:00
|
|
|
visible.header = function() {
|
|
|
|
if (header.dom().hasClass('hidden')===true) return false;
|
2014-11-20 22:27:41 +00:00
|
|
|
return true;
|
2014-10-18 16:08:35 +00:00
|
|
|
}
|
2013-09-03 09:59:30 +00:00
|
|
|
|
2014-10-18 16:02:06 +00:00
|
|
|
visible.message = function() {
|
|
|
|
if ($('.message').length>0) return true;
|
2014-11-20 22:27:41 +00:00
|
|
|
return false;
|
2014-10-18 16:08:35 +00:00
|
|
|
}
|
2013-09-03 09:59:30 +00:00
|
|
|
|
2014-10-18 16:02:06 +00:00
|
|
|
visible.signin = function() {
|
|
|
|
if ($('.message .sign_in').length>0) return true;
|
2014-11-20 22:27:41 +00:00
|
|
|
return false;
|
2014-10-18 16:08:35 +00:00
|
|
|
}
|
2014-01-22 10:12:51 +00:00
|
|
|
|
2014-10-18 16:02:06 +00:00
|
|
|
visible.contextMenu = function() {
|
2014-12-04 20:15:21 +00:00
|
|
|
return basicContext.visible();
|
2014-10-18 16:08:35 +00:00
|
|
|
}
|
2014-02-17 15:22:53 +00:00
|
|
|
|
2014-10-18 16:02:06 +00:00
|
|
|
visible.multiselect = function() {
|
|
|
|
if ($('#multiselect').length>0) return true;
|
2014-11-20 22:27:41 +00:00
|
|
|
return false;
|
2014-10-18 16:02:06 +00:00
|
|
|
}
|