Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add button to export event to calendar #22

Merged
merged 1 commit into from
Feb 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion webapp/controller/Detail.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@ sap.ui.define([
/* =========================================================== */
/* event handlers */
/* =========================================================== */

/**
* Event handler when the Export to Calendar button has been clicked
*/
onCalendarExport: function(){
var iId = this.getView().getBindingContext().getProperty("ID");
// get uri to service
var sExportService = this.getOwnerComponent().getManifestEntry("sap.app").dataSources.mainService.uri;
sExportService = sExportService.replace("service.xsodata/", "ExportCalendar.xsjs?ID=" + iId);
window.open(sExportService, '_blank');
},

/**
* Event handler when the Register button has been clicked
* @param {object} oEvent an event containing the total number of items in the list
Expand Down
3 changes: 3 additions & 0 deletions webapp/i18n/i18n.properties
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ detailLineItemTableUnitNumberColumn=
#XTIT: Title for the registration button
detailRegister=Register

#XTIT: Title for the export to calendar button
exportCalendar=Export to calendar

#XTIT: Title for the update registration button
detailUpdateRegistration=Update registration

Expand Down
6 changes: 6 additions & 0 deletions webapp/view/Detail.view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@
</semantic:content>

<semantic:customFooterContent>
<Button
id="ical"
tooltip="{i18n>exportCalendar}"
icon="sap-icon://appointment"
visible="{= ${Participant/RSVP} === 'Y' || ${Participant/RSVP} === 'W'}"
press="onCalendarExport" />
</semantic:customFooterContent>

<semantic:positiveAction>
Expand Down