Merge branch 'dev' of tforgione/adejs into master
This commit is contained in:
commit
38959d6ad0
|
@ -1,4 +1,4 @@
|
||||||
const cal = require('./calendar');
|
const cal = require('calendar');
|
||||||
|
|
||||||
function computeUserTable(user, callback) {
|
function computeUserTable(user, callback) {
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,11 @@ function fromIcal(string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
cal.Type = {
|
cal.Type = {
|
||||||
TP: 1,
|
TD: 1,
|
||||||
CTD: 2,
|
TP: 2,
|
||||||
CM: 3,
|
CTD: 3,
|
||||||
Other: 4,
|
CM: 4,
|
||||||
|
Other: 5,
|
||||||
}
|
}
|
||||||
|
|
||||||
cal.getTypeName = function(type) {
|
cal.getTypeName = function(type) {
|
||||||
|
@ -37,7 +38,9 @@ cal.getTypeName = function(type) {
|
||||||
|
|
||||||
cal.getFactor = function(type) {
|
cal.getFactor = function(type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case cal.Type.TP: return 1;
|
case cal.Type.TP:
|
||||||
|
case cal.Type.TD:
|
||||||
|
return 1;
|
||||||
case cal.Type.CTD: return 1.25;
|
case cal.Type.CTD: return 1.25;
|
||||||
case cal.Type.CM: return 1.5;
|
case cal.Type.CM: return 1.5;
|
||||||
default: return 0;
|
default: return 0;
|
||||||
|
@ -62,6 +65,8 @@ cal.Event = class {
|
||||||
this.type = cal.Type.CTD;
|
this.type = cal.Type.CTD;
|
||||||
} else if (this.name.indexOf("TP") !== -1) {
|
} else if (this.name.indexOf("TP") !== -1) {
|
||||||
this.type = cal.Type.TP;
|
this.type = cal.Type.TP;
|
||||||
|
} else if (this.name.indexOf("TD") !== -1) {
|
||||||
|
this.type = cal.Type.TD;
|
||||||
} else if (this.name.indexOf("CM") !== -1) {
|
} else if (this.name.indexOf("CM") !== -1) {
|
||||||
this.type = cal.Type.CM;
|
this.type = cal.Type.CM;
|
||||||
}
|
}
|
Loading…
Reference in New Issue