m.common.js 631 B

12345678910111213141516171819
  1. function checkTaskLeft(noticeFinish)
  2. {
  3. var hasZero = false;
  4. var length = $("input[name^='left']").length;
  5. if(length >= 2)
  6. {
  7. $("input[name^='left']").each(function()
  8. {
  9. if($(this).attr('disabled') != 'disabled' && parseFloat($(this).val(), 10) === 0) hasZero = true;
  10. })
  11. }
  12. else if(length == 1)
  13. {
  14. var objectType = $("input[name^='left']").parents('tr').next().find('#objectType').val();
  15. if(objectType == 'task' && parseFloat($("input[name^='left']").val(), 10) === 0) hasZero = true;
  16. }
  17. if(hasZero) return confirm(noticeFinish);
  18. return true;
  19. }