mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-11 13:29:49 +00:00
(fix) XSRF supprot for all calendar operations
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user