Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function buildBillableCheckbox(projectParam, taskParam) {
  2.         var billableCheckbox = AJS.$("#worktime-dialog #billable");
  3.         var isChecked = false;
  4.         if (projectParam != null && taskParam != null) {
  5.             if ((taskParam.accountableType != null && taskParam.accountableType != "none")
  6.                 || (taskParam.accountableType == null && projectParam.billable == "true") ) {
  7.                 isChecked = true;
  8.             }
  9.             billableCheckbox.prop('checked', isChecked);
  10.             if (!isChecked) {
  11.                 AJS.$('#worktime-dialog #reasonsNotAccountable').parent().show();
  12.             } else {
  13.                 AJS.$('#worktime-dialog #reasonsNotAccountable').parent().hide();
  14.             }
  15.         }
  16.         billableChange(); //enable billable change trigger
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement