(fix) XSRF supprot for all calendar operations

This commit is contained in:
Ludovic Marcotte
2016-05-04 14:52:06 -04:00
parent 5f2a862bc8
commit f3f1f6dcb4
3 changed files with 12 additions and 7 deletions
@@ -438,6 +438,16 @@
});
};
/**
* @function export
* @memberof Calendar.prototype
* @desc Export the calendar
* @returns a promise of the HTTP operation
*/
Calendar.prototype.export = function() {
return Calendar.$$resource.download(this.id + '.ics', 'export', null, {type: 'application/octet-stream'});
};
/**
* @function $setActivation
* @memberof Calendar.prototype
@@ -20,7 +20,6 @@
vm.renameFolder = renameFolder;
vm.share = share;
vm.importCalendar = importCalendar;
vm.exportCalendar = exportCalendar;
vm.showOnly = showOnly;
vm.showAll = showAll;
vm.showLinks = showLinks;
@@ -241,10 +240,6 @@
}
}
function exportCalendar(calendar) {
window.location.href = ApplicationBaseURL + '/' + calendar.id + '.ics' + '/export';
}
function showOnly(calendar) {
_.forEach(Calendar.$findAll(), function(o) {
if (calendar.id == o.id)