(js) Respect user's default classification

pull/91/head
Francis Lachapelle 2015-07-16 11:21:55 -04:00
parent d58030a475
commit ee0e45cad6
1 changed files with 8 additions and 0 deletions

View File

@ -278,6 +278,14 @@
this.status = 'not-specified';
angular.extend(this, data);
Component.$Preferences.ready().then(function() {
var type = (_this.type == 'appointment')? 'Events' : 'Tasks';
// Set default values from user's defaults
_this.classification = _this.classification
|| Component.$Preferences.defaults['SOGoCalendar' + type + 'DefaultClassification'].toLowerCase();
});
if (this.startDate)
this.start = new Date(this.startDate.substring(0,10) + ' ' + this.startDate.substring(11,16));
if (this.endDate)