effort.js 794 B

1234567891011121314151617181920212223242526272829303132333435
  1. var defaultProject = $('#project').prop("outerHTML");
  2. var defaultExecution = $('#execution').prop("outerHTML");
  3. $(function()
  4. {
  5. if($('#effortList thead th.w-work').width() < 150) $('#effortList thead th.w-work').width(150);
  6. flushWidth('#sidebar .detail');
  7. resetWorkWidth();
  8. if(parseInt($('#product').val()) > 0)
  9. {
  10. $('#product').trigger('change');
  11. }
  12. else if($('#project') && parseInt($('#project').val()) > 0)
  13. {
  14. $('#project').trigger('change');
  15. }
  16. });
  17. /**
  18. * Reset work width.
  19. * .
  20. * @access public
  21. * @return void
  22. */
  23. function resetWorkWidth()
  24. {
  25. $work = $('#effortForm thead th.c-work');
  26. if($work.width() < 180) $work.width(180);
  27. }
  28. $('#mainContent .sidebar-toggle').click(function()
  29. {
  30. setTimeout("resetWorkWidth()", 100);
  31. })