visible.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. controls: function() {
  29. if (lychee.loadingBar.css('opacity')<1) return false;
  30. else return true;
  31. },
  32. message: function() {
  33. if ($('.message').length>0) return true;
  34. else return false;
  35. },
  36. signin: function() {
  37. if ($('.message .sign_in').length>0) return true;
  38. else return false;
  39. },
  40. contextMenu: function() {
  41. if ($('.contextmenu').length>0) return true;
  42. else return false;
  43. },
  44. multiselect: function() {
  45. if ($('#multiselect').length>0) return true;
  46. else return false;
  47. }
  48. };