visible.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * @description This module is used to check if elements are visible or not.
  3. * @copyright 2015 by Tobias Reich
  4. */
  5. visible = {}
  6. visible.albums = function() {
  7. if (header.dom('#tools_albums').css('display')==='block') return true
  8. return false
  9. }
  10. visible.album = function() {
  11. if (header.dom('#tools_album').css('display')==='block') return true
  12. return false
  13. }
  14. visible.photo = function() {
  15. if ($('#imageview.fadeIn').length>0) return true
  16. return false
  17. }
  18. visible.search = function() {
  19. if (search.hash!==null) return true
  20. return false
  21. }
  22. visible.sidebar = function() {
  23. if (sidebar.dom().hasClass('active')===true) return true
  24. return false
  25. }
  26. visible.sidebarbutton = function() {
  27. if (visible.photo()) return true
  28. if (visible.album() && $('#button_info_album:visible').length>0) return true
  29. return false
  30. }
  31. visible.header = function() {
  32. if (header.dom().hasClass('hidden')===true) return false
  33. return true
  34. }
  35. visible.message = function() {
  36. return basicModal.visible()
  37. }
  38. visible.contextMenu = function() {
  39. return basicContext.visible()
  40. }
  41. visible.multiselect = function() {
  42. if ($('#multiselect').length>0) return true
  43. return false
  44. }