browse.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. $(function()
  2. {
  3. if($('#demandList thead th.c-title').width() < 150) $('#demandList thead th.c-title').width(150);
  4. $(document).on('click', '.demand-toggle', function(e)
  5. {
  6. var $toggle = $(this);
  7. var id = $(this).data('id');
  8. var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed');
  9. $toggle.closest('[data-ride="table"]').find('tr.parent-' + id).toggle(!isCollapsed);
  10. e.stopPropagation();
  11. e.preventDefault();
  12. });
  13. toggleFold('#demandForm', unfoldStories, poolID, 'demand');
  14. adjustTableFooter();
  15. $('body').on('click', '#toggleFold', adjustTableFooter);
  16. $('body').on('click', '.icon.icon-angle-double-right', adjustTableFooter);
  17. })
  18. /**
  19. * Adjust the table footer style.
  20. *
  21. * @access public
  22. * @return void
  23. */
  24. function adjustTableFooter()
  25. {
  26. if($('.main-col').height() < $(window).height())
  27. {
  28. $('.table.with-footer-fixed').css('margin-bottom', '0');
  29. $('.table-footer').removeClass('fixed-footer');
  30. $('.table-footer').css({"left":"0", "bottom":"0", "width":"unset"});
  31. }
  32. }