(js) Use more one-time bindings in Calendar module

This commit is contained in:
Francis Lachapelle
2017-06-22 11:56:16 -04:00
parent 9bde9b66ef
commit e8ec8180a8
7 changed files with 134 additions and 115 deletions
@@ -672,6 +672,19 @@
return (this.occurrenceId && this.userHasRSVP);
};
/**
* @function showPercentComplete
* @memberof Component.prototype
* @desc Check if the percent completion should be displayed with respect to the
* component's type and status.
* @returns true if the percent completion should be displayed
*/
Component.prototype.showPercentComplete = function() {
return (this.type == 'task' &&
this.percentComplete > 0 &&
this.status != 'cancelled');
};
/**
* @function enablePercentComplete
* @memberof Component.prototype
@@ -681,7 +694,7 @@
*/
Component.prototype.enablePercentComplete = function() {
return (this.type == 'task' &&
this.percentComplete > 0 &&
this.status != 'not-specified' &&
this.status != 'cancelled');
};