config.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. $(document).ready(
  2. function()
  3. {
  4. // Toggle Single Portlet
  5. $('a.toggle').click(function()
  6. {
  7. $(this).parent('div').next('div').toggle();
  8. return false;
  9. }
  10. );
  11. // Invert All Portlets
  12. $('a#all_invert').click(function()
  13. {
  14. $('div.portlet_content').toggle();
  15. return false;
  16. }
  17. );
  18. // Expand All Portlets
  19. $('a#all_expand').click(function()
  20. {
  21. $('div.portlet_content:hidden').show();
  22. return false;
  23. }
  24. );
  25. // Collapse All Portlets
  26. $('a#all_collapse').click(function()
  27. {
  28. $('div.portlet_content:visible').hide();
  29. return false;
  30. }
  31. );
  32. // Open All Portlets
  33. $('a#all_open').click(function()
  34. {
  35. $('div.portlet:hidden').show();
  36. $('a#all_open:visible').hide();
  37. $('a#all_close:hidden').show();
  38. return false;
  39. }
  40. );
  41. // Close All Portlets
  42. $('a#all_close').click(function()
  43. {
  44. $('div.portlet:visible').hide();
  45. $('a#all_close:visible').hide();
  46. $('a#all_open:hidden').show();
  47. return false;
  48. }
  49. );
  50. // Controls Drag + Drop
  51. $('#columns td').Sortable(
  52. {
  53. accept: 'portlet',
  54. helperclass: 'sort_placeholder',
  55. opacity: 0.7,
  56. tolerance: 'intersect'
  57. }
  58. );
  59. }
  60. );