visible.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * @name Visible Module
  3. * @description This module is used to check if elements are visible or not.
  4. * @author Tobias Reich
  5. * @copyright 2014 by Tobias Reich
  6. */
  7. visible = {
  8. albums: function() {
  9. if ($('#tools_albums').css('display')==='block') return true;
  10. else return false;
  11. },
  12. album: function() {
  13. if ($('#tools_album').css('display')==='block') return true;
  14. else return false;
  15. },
  16. photo: function() {
  17. if ($('#imageview.fadeIn').length>0) return true;
  18. else return false;
  19. },
  20. search: function() {
  21. if (search.code!==null&&search.code!=='') return true;
  22. else return false;
  23. },
  24. infobox: function() {
  25. if ($('#infobox.active').length>0) return true;
  26. else return false;
  27. },
  28. infoboxbutton: function() {
  29. if (visible.albums()) return false;
  30. if (visible.photo()) return true;
  31. if (visible.album()&&$('#button_info_album:visible').length>0) return true;
  32. else return false;
  33. },
  34. controls: function() {
  35. if (lychee.loadingBar.css('opacity')<1) return false;
  36. else return true;
  37. },
  38. message: function() {
  39. if ($('.message').length>0) return true;
  40. else return false;
  41. },
  42. signin: function() {
  43. if ($('.message .sign_in').length>0) return true;
  44. else return false;
  45. },
  46. contextMenu: function() {
  47. if ($('.contextmenu').length>0) return true;
  48. else return false;
  49. },
  50. multiselect: function() {
  51. if ($('#multiselect').length>0) return true;
  52. else return false;
  53. }
  54. };