Added default stylesheet and less structure to create new themes

This commit is contained in:
knsv
2015-03-01 16:29:41 +01:00
parent 3c5a19e5a7
commit ead74558ea
22 changed files with 880 additions and 27 deletions

View File

@@ -94,8 +94,9 @@ var getEndDate = function(prevTime, dateFormat, str){
str = str.trim();
// Check for actual date
if(moment(str,dateFormat,true).isValid()){
return moment(str,dateFormat).toDate();
if(moment(str,dateFormat.trim(),true).isValid()){
return moment(str,dateFormat.trim()).toDate();
}
var d = moment(prevTime);

View File

@@ -227,15 +227,36 @@ module.exports.draw = function (text, id) {
}
}
var taskType = '';
if(d.active){
if (d.crit) {
taskType = 'activeCritText'+secNum;
}else{
taskType = 'activeText'+secNum;
}
}
if (d.done) {
if (d.crit) {
taskType = taskType + ' doneCritText'+secNum;
}else{
taskType = taskType + ' doneText'+secNum;
}
}else{
if (d.crit) {
taskType = taskType + ' critText'+secNum;
}
}
// Check id text width > width of rectangle
if (textWidth > (endX - startX)) {
if (endX + textWidth + 1.5*conf.sidePadding > w) {
return 'taskTextOutsideLeft taskTextOutside' + secNum;
return 'taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;
} else {
return 'taskTextOutsideRight taskTextOutside' + secNum;
return 'taskTextOutsideRight taskTextOutside' + secNum+ ' ' + taskType;
}
} else {
return 'taskText taskText' + secNum;
return 'taskText taskText' + secNum+ ' ' + taskType;
}
});