(js) Set default Calendar view to 'week'

pull/186/head
Francis Lachapelle 2015-12-09 11:55:21 -05:00
parent 8ad854e30d
commit 903c4280f4
1 changed files with 7 additions and 4 deletions

View File

@ -117,10 +117,13 @@
if ($location.url().length === 0) {
// Restore user's last view
Preferences.ready().then(function() {
var view = /(.+)view/.exec(Preferences.settings.Calendar.View);
if (view) {
$location.replace().url('/calendar/' + view[1]);
}
var url = '/calendar/',
view = /(.+)view/.exec(Preferences.settings.Calendar.View);
if (view)
url += view[1];
else
url += 'week';
$location.replace().url(url);
});
}
}