-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d955ad8
commit e8c6d11
Showing
6 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
app/travel_processor/webapp/ext/fragment/ServingTimeOfMeals.fragment.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"> | ||
<SegmentedButton core:require="{handler: 'sap/fe/cap/travel/ext/fragment/ServingTimeOfMeals'}" id="SB1" | ||
selectionChange="handler.onSelectionChange" | ||
enabled="{ui>/isEditable}" | ||
selectedKey="{= ${DeliveryPreference_code}}"> | ||
<items> | ||
<SegmentedButtonItem id="_IDGenSegmentedButtonItem1" text="{i18n>early}" key="S" /> | ||
<SegmentedButtonItem id="_IDGenSegmentedButtonItem2" text="{i18n>mid}" key="M" /> | ||
<SegmentedButtonItem id="_IDGenSegmentedButtonItem3" text="{i18n>late}" key="L" /> | ||
</items> | ||
</SegmentedButton> | ||
</core:FragmentDefinition> |
13 changes: 13 additions & 0 deletions
13
app/travel_processor/webapp/ext/fragment/ServingTimeOfMeals.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
sap.ui.define([ | ||
"sap/m/MessageToast" | ||
], function(MessageToast) { | ||
'use strict'; | ||
|
||
return { | ||
onSelectionChange: function(oEvent) { | ||
var sNewDeliveryPreferenceCode = oEvent.getParameter("item").getKey(); | ||
var oSegmBtn = oEvent.getSource(); | ||
oSegmBtn.getBindingContext().setProperty("DeliveryPreference_code", sNewDeliveryPreferenceCode); | ||
} | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
code;name;descr | ||
S;SoonAfterTakeoff;Delivery as early as possible after the take-off | ||
M;Midflight;Not too early not too late | ||
L;Late;Late in the flight while still allowing you to finish the meal or drink before the landing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters