(fix) XSRF supprot for all calendar operations
parent
5f2a862bc8
commit
f3f1f6dcb4
|
@ -8,7 +8,7 @@
|
|||
xmlns:label="OGo:label"
|
||||
className="UIxPageFrame"
|
||||
title="title"
|
||||
const:jsFiles="Common.js, vendor/ng-sortable.min.js, Preferences.services.js, Contacts.services.js, Mailer.services.js, vendor/angular-file-upload.min.js, Scheduler.js, Scheduler.services.js">
|
||||
const:jsFiles="Common.js, vendor/ng-sortable.min.js, Preferences.services.js, Contacts.services.js, Mailer.services.js, vendor/angular-file-upload.min.js, Scheduler.js, Scheduler.services.js, vendor/FileSaver.min.js">
|
||||
<script type="text/javascript">
|
||||
var firstDayOfWeek = <var:string value="firstDayOfWeek"/>;
|
||||
var dayStartHour = <var:string value="dayStartHour"/>;
|
||||
|
@ -121,7 +121,7 @@
|
|||
</md-button>
|
||||
</md-menu-item>
|
||||
<md-menu-item>
|
||||
<md-button ng-click="app.exportCalendar(calendar)">
|
||||
<md-button ng-click="calendar.export()">
|
||||
<var:string label:value="Export"/>
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue