@sapui5/sap.fe.templates 1.97.0 → 1.98.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/sap/fe/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/Component.js +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +3 -3
- package/src/sap/fe/templates/ListComponent.js +1 -1
- package/src/sap/fe/templates/ListReport/Component.js +1 -1
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +2 -2
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +2 -1
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +86 -86
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +7 -3
- package/src/sap/fe/templates/ListReport/overrides/MassEdit.js +95 -0
- package/src/sap/fe/templates/ListReport/overrides/Share.js +37 -22
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +54 -32
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +21 -1
- package/src/sap/fe/templates/ObjectPage/Component.js +17 -15
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +16 -1
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +103 -88
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +100 -73
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +1 -1
- package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +1 -1
- package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +13 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +48 -44
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +1 -21
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +24 -5
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +1 -4
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContentLazyLoader.fragment.xml +181 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionFormContent.fragment.xml +1 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +1 -0
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +1 -1
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +1 -1
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +134 -124
- package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +1 -1
- package/src/sap/fe/templates/TableScroller.js +1 -1
- package/src/sap/fe/templates/controls/Table.fragment.xml +1 -1
- package/src/sap/fe/templates/library.js +2 -2
- package/src/sap/fe/templates/messagebundle.properties +24 -1
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +1 -1
- package/src/sap/fe/templates/messagebundle_es.properties +8 -8
- package/src/sap/fe/templates/messagebundle_fr.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ja.properties +1 -1
- package/src/sap/fe/templates/messagebundle_tr.properties +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderImage.fragment.xml +0 -24
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
<core:FragmentDefinition
|
|
2
|
+
xmlns:uxap="sap.uxap"
|
|
3
|
+
xmlns:core="sap.ui.core"
|
|
4
|
+
xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
|
|
5
|
+
xmlns:fpm="sap.fe.macros.fpm"
|
|
6
|
+
xmlns:macro="sap.fe.macros"
|
|
7
|
+
xmlns:layout="sap.ui.layout"
|
|
8
|
+
xmlns:dt="sap.ui.dt"
|
|
9
|
+
xmlns="sap.m"
|
|
10
|
+
xmlns:opcontrol="sap.fe.templates.ObjectPage.controls"
|
|
11
|
+
template:require="{
|
|
12
|
+
fpm: 'sap/fe/macros/fpm/fpm',
|
|
13
|
+
MODEL: 'sap/ui/model/odata/v4/AnnotationHelper',
|
|
14
|
+
OP: 'sap/fe/templates/ObjectPage/AnnotationHelper',
|
|
15
|
+
COMMON: 'sap/fe/macros/CommonHelper',
|
|
16
|
+
ID: 'sap/fe/core/helpers/StableIdHelper'
|
|
17
|
+
}"
|
|
18
|
+
>
|
|
19
|
+
<!-- We want to ensure that statically non visible sections are non visible-->
|
|
20
|
+
<template:if test="{subSection>visible}">
|
|
21
|
+
<template:if test="{= ${subSection>type} === 'XMLFragment'}">
|
|
22
|
+
<template:then>
|
|
23
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.FormActions" type="XML" />
|
|
24
|
+
<uxap:blocks>
|
|
25
|
+
<uxap:ObjectPageLazyLoader stashed="true" id="{= ID.generate(['fe', ${subSection>key}])}">
|
|
26
|
+
<opcontrol:SubSectionBlock>
|
|
27
|
+
<opcontrol:content>
|
|
28
|
+
<template:if test="{= ${subSection>sideContent} !== undefined}">
|
|
29
|
+
<template:then>
|
|
30
|
+
<layout:DynamicSideContent
|
|
31
|
+
id="{= ID.generate(['fe', ${subSection>key}, 'SideContentLayout'])}"
|
|
32
|
+
showMainContent="true"
|
|
33
|
+
showSideContent="{subSection>sideContent/visible}"
|
|
34
|
+
sideContentFallDown="BelowM"
|
|
35
|
+
containerQuery="true"
|
|
36
|
+
equalSplit="{subSection>sideContent/equalSplit}"
|
|
37
|
+
>
|
|
38
|
+
<layout:mainContent>
|
|
39
|
+
<core:Fragment
|
|
40
|
+
fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionCustomSection"
|
|
41
|
+
type="XML"
|
|
42
|
+
/>
|
|
43
|
+
</layout:mainContent>
|
|
44
|
+
<layout:sideContent>
|
|
45
|
+
<core:Fragment
|
|
46
|
+
fragmentName="sap.fe.templates.ObjectPage.view.fragments.SideContentCustomContainer"
|
|
47
|
+
type="XML"
|
|
48
|
+
/>
|
|
49
|
+
</layout:sideContent>
|
|
50
|
+
</layout:DynamicSideContent>
|
|
51
|
+
</template:then>
|
|
52
|
+
<template:else>
|
|
53
|
+
<core:Fragment
|
|
54
|
+
fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionCustomSection"
|
|
55
|
+
type="XML"
|
|
56
|
+
/>
|
|
57
|
+
</template:else>
|
|
58
|
+
</template:if>
|
|
59
|
+
</opcontrol:content>
|
|
60
|
+
</opcontrol:SubSectionBlock>
|
|
61
|
+
</uxap:ObjectPageLazyLoader>
|
|
62
|
+
</uxap:blocks>
|
|
63
|
+
|
|
64
|
+
</template:then>
|
|
65
|
+
<template:elseif test="{= ${subSection>type} === 'Form'}">
|
|
66
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.FormActions" type="XML" />
|
|
67
|
+
<uxap:blocks>
|
|
68
|
+
<uxap:ObjectPageLazyLoader stashed="true" id="{= ID.generate(['fe', ${subSection>key}])}">
|
|
69
|
+
<opcontrol:SubSectionBlock>
|
|
70
|
+
<opcontrol:content>
|
|
71
|
+
<template:if test="{= ${subSection>sideContent} !== undefined}">
|
|
72
|
+
<template:then>
|
|
73
|
+
<layout:DynamicSideContent
|
|
74
|
+
id="{= ID.generate(['fe', ${subSection>key}, 'SideContentLayout'])}"
|
|
75
|
+
showMainContent="true"
|
|
76
|
+
showSideContent="{subSection>sideContent/visible}"
|
|
77
|
+
sideContentFallDown="BelowM"
|
|
78
|
+
containerQuery="true"
|
|
79
|
+
equalSplit="{subSection>sideContent/equalSplit}"
|
|
80
|
+
>
|
|
81
|
+
<layout:mainContent>
|
|
82
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionFormContent" type="XML" />
|
|
83
|
+
</layout:mainContent>
|
|
84
|
+
<layout:sideContent>
|
|
85
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SideContentCustomContainer" type="XML" />
|
|
86
|
+
</layout:sideContent>
|
|
87
|
+
</layout:DynamicSideContent>
|
|
88
|
+
|
|
89
|
+
</template:then>
|
|
90
|
+
<template:else>
|
|
91
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionFormContent" type="XML" />
|
|
92
|
+
</template:else>
|
|
93
|
+
</template:if>
|
|
94
|
+
</opcontrol:content>
|
|
95
|
+
</opcontrol:SubSectionBlock>
|
|
96
|
+
</uxap:ObjectPageLazyLoader>
|
|
97
|
+
</uxap:blocks>
|
|
98
|
+
<template:if test="{subSection>formDefinition/hasFacetsNotPartOfPreview}">
|
|
99
|
+
<template:then>
|
|
100
|
+
<!-- Button "Show More / Less" is displayed for a collection facets that contains at least one reference facets with annotation "PartOfPreview === TRUE" -->
|
|
101
|
+
<uxap:moreBlocks>
|
|
102
|
+
<template:if test="{= ${subSection>level} === 2}">
|
|
103
|
+
<Title text="{subSection>title}" />
|
|
104
|
+
</template:if>
|
|
105
|
+
<opcontrol:SubSectionBlock>
|
|
106
|
+
<opcontrol:content>
|
|
107
|
+
<template:if test="{= ${subSection>sideContent} !== undefined}">
|
|
108
|
+
<template:then>
|
|
109
|
+
<layout:DynamicSideContent
|
|
110
|
+
id="{= ID.generate(['fe', ${subSection>key}, 'MoreSideContentLayout'])}"
|
|
111
|
+
showMainContent="true"
|
|
112
|
+
showSideContent="{subSection>sideContent/visible}"
|
|
113
|
+
sideContentFallDown="BelowM"
|
|
114
|
+
containerQuery="true"
|
|
115
|
+
equalSplit="{subSection>sideContent/equalSplit}"
|
|
116
|
+
>
|
|
117
|
+
<layout:mainContent>
|
|
118
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionMoreFormContent" type="XML" />
|
|
119
|
+
</layout:mainContent>
|
|
120
|
+
<layout:sideContent>
|
|
121
|
+
<!--No Side Content for MoreBlocks so far-->
|
|
122
|
+
</layout:sideContent>
|
|
123
|
+
</layout:DynamicSideContent>
|
|
124
|
+
</template:then>
|
|
125
|
+
<template:else>
|
|
126
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionMoreFormContent" type="XML" />
|
|
127
|
+
</template:else>
|
|
128
|
+
</template:if>
|
|
129
|
+
</opcontrol:content>
|
|
130
|
+
</opcontrol:SubSectionBlock>
|
|
131
|
+
</uxap:moreBlocks>
|
|
132
|
+
</template:then>
|
|
133
|
+
</template:if>
|
|
134
|
+
</template:elseif>
|
|
135
|
+
<template:elseif test="{= ${subSection>type} === 'DataVisualization'}">
|
|
136
|
+
<uxap:blocks>
|
|
137
|
+
<uxap:ObjectPageLazyLoader stashed="true" id="{= ID.generate(['fe', ${subSection>key}])}">
|
|
138
|
+
<template:if test="{= ${subSection>level} === 2}">
|
|
139
|
+
<Title
|
|
140
|
+
text="{subSection>title}"
|
|
141
|
+
visible="{= ${subSection>visible} && ${subSection>title} !=='undefined' && ${subSection>showTitle} ? true : false}"
|
|
142
|
+
/>
|
|
143
|
+
</template:if>
|
|
144
|
+
<opcontrol:SubSectionBlock visible="{subSection>visible}">
|
|
145
|
+
<opcontrol:content>
|
|
146
|
+
<template:if test="{= ${subSection>sideContent} !== undefined}">
|
|
147
|
+
<template:then>
|
|
148
|
+
<layout:DynamicSideContent
|
|
149
|
+
id="{= ID.generate(['fe', ${subSection>key}, 'SideContentLayout'])}"
|
|
150
|
+
showMainContent="true"
|
|
151
|
+
showSideContent="{subSection>sideContent/visible}"
|
|
152
|
+
sideContentFallDown="BelowM"
|
|
153
|
+
containerQuery="true"
|
|
154
|
+
equalSplit="{subSection>sideContent/equalSplit}"
|
|
155
|
+
>
|
|
156
|
+
<layout:mainContent>
|
|
157
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionPresentationVisualization" type="XML" />
|
|
158
|
+
</layout:mainContent>
|
|
159
|
+
<layout:sideContent>
|
|
160
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SideContentCustomContainer" type="XML" />
|
|
161
|
+
</layout:sideContent>
|
|
162
|
+
</layout:DynamicSideContent>
|
|
163
|
+
</template:then>
|
|
164
|
+
<template:else>
|
|
165
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionPresentationVisualization" type="XML" />
|
|
166
|
+
</template:else>
|
|
167
|
+
</template:if>
|
|
168
|
+
</opcontrol:content>
|
|
169
|
+
</opcontrol:SubSectionBlock>
|
|
170
|
+
</uxap:ObjectPageLazyLoader>
|
|
171
|
+
</uxap:blocks>
|
|
172
|
+
</template:elseif>
|
|
173
|
+
<template:elseif test="{= ${subSection>type} === 'Unknown'}">
|
|
174
|
+
<Text text="{subSection>text}" />
|
|
175
|
+
</template:elseif>
|
|
176
|
+
<template:else>
|
|
177
|
+
|
|
178
|
+
</template:else>
|
|
179
|
+
</template:if>
|
|
180
|
+
</template:if>
|
|
181
|
+
</core:FragmentDefinition>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define(
|
|
6
6
|
[
|
|
@@ -156,14 +156,13 @@ sap.ui.define(
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
var oAppComponent = that.getAppComponent();
|
|
159
|
-
var oData = { oView: oView, oAppComponent: oAppComponent };
|
|
160
159
|
that._scrollTablesToLastNavigatedItems();
|
|
161
160
|
if (oAppComponent.getEnvironmentCapabilities().getCapabilities().UShell) {
|
|
162
|
-
that.
|
|
161
|
+
that._computeTitleHierarchy(oView);
|
|
163
162
|
}
|
|
164
163
|
var bForceFocus = oAppComponent.getRouterProxy().isFocusForced();
|
|
165
164
|
oAppComponent.getRouterProxy().setFocusForced(false); // reset
|
|
166
|
-
if (oView.getController() && oView.getController().onPageReady) {
|
|
165
|
+
if (oView.getController() && oView.getController().onPageReady && oView.getParent().onPageReady) {
|
|
167
166
|
oView.getParent().onPageReady({ forceFocus: bForceFocus });
|
|
168
167
|
}
|
|
169
168
|
if (that.onContainerReady) {
|
|
@@ -182,12 +181,12 @@ sap.ui.define(
|
|
|
182
181
|
/**
|
|
183
182
|
* This function returns the TitleHierarchy cache ( or initializes it if undefined).
|
|
184
183
|
*
|
|
185
|
-
* @name sap.fe.templates.RootContainer.controller.BaseController#
|
|
184
|
+
* @name sap.fe.templates.RootContainer.controller.BaseController#_getTitleHierarchyCache
|
|
186
185
|
* @memberof sap.fe.templates.RootContainer.controller.BaseController
|
|
187
186
|
*
|
|
188
187
|
* @returns {object} The TitleHierarchy cache
|
|
189
188
|
*/
|
|
190
|
-
|
|
189
|
+
_getTitleHierarchyCache: function() {
|
|
191
190
|
if (!this.oTitleHierarchyCache) {
|
|
192
191
|
this.oTitleHierarchyCache = {};
|
|
193
192
|
}
|
|
@@ -219,53 +218,86 @@ sap.ui.define(
|
|
|
219
218
|
},
|
|
220
219
|
|
|
221
220
|
/**
|
|
222
|
-
*
|
|
221
|
+
* Fetches the value of the HeaderInfo title for a given path.
|
|
223
222
|
*
|
|
224
|
-
* @
|
|
225
|
-
* @
|
|
226
|
-
* @param {*} sPath path of the context to retrieve title information from MetaModel
|
|
227
|
-
* @param {*} oAppComponent reference to the oAppComponent
|
|
228
|
-
*
|
|
229
|
-
* @returns {promise} oTitleinformation returned as promise
|
|
223
|
+
* @param {string} sPath The path to the entity
|
|
224
|
+
* @returns {Promise} A promise containing the value of the title, or an empty string if no HeaderInfo title annotation is available
|
|
230
225
|
*/
|
|
226
|
+
_fetchTitleValue: function(sPath) {
|
|
227
|
+
var oAppComponent = this.getAppComponent(),
|
|
228
|
+
oModel = this.getView().getModel(),
|
|
229
|
+
oMetaModel = oAppComponent.getMetaModel(),
|
|
230
|
+
sMetaPath = oMetaModel.getMetaPath(sPath);
|
|
231
231
|
|
|
232
|
-
addNewEntryInCacheTitle: function(sPath, oAppComponent) {
|
|
233
|
-
var oTitleModel = this.getView().getModel();
|
|
234
|
-
var that = this;
|
|
235
|
-
var sEntityPath = sPath.replace(/ *\([^)]*\) */g, "");
|
|
236
232
|
var sTitleExpression = AnnotationHelper.format(
|
|
237
|
-
|
|
238
|
-
{ context:
|
|
233
|
+
oMetaModel.getProperty(sMetaPath + "/@com.sap.vocabularies.UI.v1.HeaderInfo/Title/Value"),
|
|
234
|
+
{ context: oMetaModel.createBindingContext("/") }
|
|
239
235
|
);
|
|
240
236
|
var oTitleExpression = BindingParser.complexParser(sTitleExpression);
|
|
241
|
-
|
|
242
|
-
var oBindingViewContext = oTitleModel.createBindingContext(sPath);
|
|
237
|
+
|
|
243
238
|
if (oTitleExpression) {
|
|
244
239
|
var sTitlePath = oTitleExpression.parts ? oTitleExpression.parts[0].path : oTitleExpression.path;
|
|
245
240
|
var fnTitleFormatter = oTitleExpression.formatter;
|
|
246
|
-
var
|
|
241
|
+
var oBindingViewContext = oModel.createBindingContext(sPath);
|
|
242
|
+
var oPropertyBinding = oModel.bindProperty(sTitlePath, oBindingViewContext);
|
|
243
|
+
|
|
247
244
|
oPropertyBinding.initialize();
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
oTitleHierarchyCache[sPath] = that._computeTitleInfo(sTypeName, sTargetValue, sIntent);
|
|
260
|
-
resolve(oTitleHierarchyCache[sPath]);
|
|
261
|
-
oPropertyBinding.detachChange(fnChange);
|
|
262
|
-
};
|
|
263
|
-
if (oPropertyBinding) {
|
|
245
|
+
|
|
246
|
+
return new Promise(function(resolve) {
|
|
247
|
+
var fnChange = function(oEvent) {
|
|
248
|
+
var sTargetValue = fnTitleFormatter
|
|
249
|
+
? fnTitleFormatter(oEvent.getSource().getValue())
|
|
250
|
+
: oEvent.getSource().getValue();
|
|
251
|
+
|
|
252
|
+
oPropertyBinding.detachChange(fnChange);
|
|
253
|
+
resolve(sTargetValue);
|
|
254
|
+
};
|
|
255
|
+
|
|
264
256
|
oPropertyBinding.attachChange(fnChange);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
257
|
+
});
|
|
258
|
+
} else {
|
|
259
|
+
return Promise.resolve("");
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
|
|
263
|
+
_getAppSpecificHash: function() {
|
|
264
|
+
return HashChanger.getInstance().hrefForAppSpecificHash ? HashChanger.getInstance().hrefForAppSpecificHash("") : "";
|
|
265
|
+
},
|
|
266
|
+
|
|
267
|
+
_getHash: function() {
|
|
268
|
+
return HashChanger.getInstance().getHash();
|
|
269
|
+
},
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* This function returns titleInformation from a path.
|
|
273
|
+
* It updates the cache to store Title Information if necessary
|
|
274
|
+
*
|
|
275
|
+
* @name sap.fe.templates.RootContainer.controller.BaseController#getTitleInfoFromPath
|
|
276
|
+
* @memberof sap.fe.templates.RootContainer.controller.BaseController
|
|
277
|
+
* @param {*} sPath path of the context to retrieve title information from MetaModel
|
|
278
|
+
*
|
|
279
|
+
* @returns {promise} oTitleinformation returned as promise
|
|
280
|
+
*/
|
|
281
|
+
|
|
282
|
+
getTitleInfoFromPath: function(sPath) {
|
|
283
|
+
var oTitleHierarchyCache = this._getTitleHierarchyCache();
|
|
284
|
+
|
|
285
|
+
if (oTitleHierarchyCache[sPath]) {
|
|
286
|
+
// The title info is already stored in the cache
|
|
287
|
+
return Promise.resolve(oTitleHierarchyCache[sPath]);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
var oMetaModel = this.getAppComponent().getMetaModel();
|
|
291
|
+
var that = this;
|
|
292
|
+
var sEntityPath = oMetaModel.getMetaPath(sPath);
|
|
293
|
+
var sTypeName = oMetaModel.getProperty(sEntityPath + "/@com.sap.vocabularies.UI.v1.HeaderInfo/TypeName");
|
|
294
|
+
var sAppSpecificHash = this._getAppSpecificHash();
|
|
295
|
+
var sIntent = sAppSpecificHash + sPath.slice(1);
|
|
296
|
+
|
|
297
|
+
return this._fetchTitleValue(sPath).then(function(sTitle) {
|
|
298
|
+
var oTitleInfo = that._computeTitleInfo(sTypeName, sTitle, sIntent);
|
|
299
|
+
oTitleHierarchyCache[sPath] = oTitleInfo;
|
|
300
|
+
return oTitleInfo;
|
|
269
301
|
});
|
|
270
302
|
},
|
|
271
303
|
/**
|
|
@@ -281,7 +313,7 @@ sap.ui.define(
|
|
|
281
313
|
* @param {*} aHierarchy Shell title hierarchy
|
|
282
314
|
* @returns {*} Copy of shell title hierarchy containing all elements as strings
|
|
283
315
|
*/
|
|
284
|
-
|
|
316
|
+
_ensureHierarchyElementsAreStrings: function(aHierarchy) {
|
|
285
317
|
var aHierarchyShell = [];
|
|
286
318
|
for (var level in aHierarchy) {
|
|
287
319
|
var oHierarchy = aHierarchy[level];
|
|
@@ -294,113 +326,91 @@ sap.ui.define(
|
|
|
294
326
|
return aHierarchyShell;
|
|
295
327
|
},
|
|
296
328
|
|
|
329
|
+
_getTargetTypeFromHash: function(sHash) {
|
|
330
|
+
var oAppComponent = this.getAppComponent();
|
|
331
|
+
var sTargetType = "";
|
|
332
|
+
|
|
333
|
+
var aRoutes = oAppComponent.getManifestEntry("/sap.ui5/routing/routes");
|
|
334
|
+
for (var j = 0; j < aRoutes.length; j++) {
|
|
335
|
+
var oRoute = oAppComponent.getRouter().getRoute(aRoutes[j].name);
|
|
336
|
+
if (oRoute.match(sHash)) {
|
|
337
|
+
var sTarget = Array.isArray(aRoutes[j].target) ? aRoutes[j].target[0] : aRoutes[j].target;
|
|
338
|
+
sTargetType = oAppComponent.getRouter().getTarget(sTarget)._oOptions.name;
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
return sTargetType;
|
|
344
|
+
},
|
|
345
|
+
|
|
297
346
|
/**
|
|
298
347
|
* This function is updating the shell title after each navigation.
|
|
299
348
|
*
|
|
300
349
|
* @memberof sap.fe.templates.RootContainer.controller.BaseController
|
|
301
|
-
* @param {*}
|
|
350
|
+
* @param {*} oView The current view
|
|
351
|
+
* @returns {*} A Promise that is resolved when the menu is filled properly
|
|
302
352
|
*/
|
|
303
|
-
|
|
353
|
+
_computeTitleHierarchy: function(oView) {
|
|
304
354
|
var that = this,
|
|
305
|
-
|
|
306
|
-
oAppComponent = oData.oAppComponent,
|
|
355
|
+
oAppComponent = this.getAppComponent(),
|
|
307
356
|
oContext = oView.getBindingContext(),
|
|
308
357
|
oCurrentPage = oView.getParent(),
|
|
309
358
|
aTitleInformationPromises = [],
|
|
310
|
-
sAppSpecificHash =
|
|
311
|
-
? HashChanger.getInstance().hrefForAppSpecificHash("")
|
|
312
|
-
: "",
|
|
359
|
+
sAppSpecificHash = this._getAppSpecificHash(),
|
|
313
360
|
sAppTitle = oAppComponent.getMetadata().getManifestEntry("sap.app").title || "",
|
|
314
361
|
sAppSubTitle = oAppComponent.getMetadata().getManifestEntry("sap.app").appSubTitle || "",
|
|
315
|
-
|
|
316
|
-
oPageTitleInformationPromise,
|
|
362
|
+
oPageTitleInformation,
|
|
317
363
|
sNewPath;
|
|
318
364
|
|
|
319
|
-
if (this.bIsComputingTitleHierachy === true) {
|
|
320
|
-
Log.warning("computeTitleHierarchy already running ... this call is canceled");
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
this.bIsComputingTitleHierachy = true;
|
|
324
|
-
|
|
325
365
|
if (oCurrentPage && oCurrentPage._getPageTitleInformation) {
|
|
326
366
|
if (oContext) {
|
|
367
|
+
// If the first page of the application is a LR, use the title and subtitle from the manifest
|
|
368
|
+
if (this._getTargetTypeFromHash("") === "sap.fe.templates.ListReport") {
|
|
369
|
+
aTitleInformationPromises.push(
|
|
370
|
+
Promise.resolve(that._computeTitleInfo(sAppTitle, sAppSubTitle, sAppSpecificHash))
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Then manage other pages
|
|
327
375
|
sNewPath = oContext.getPath();
|
|
328
376
|
var aPathParts = sNewPath.split("/"),
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
aPathParts.
|
|
333
|
-
|
|
334
|
-
aPathParts.forEach(function(sPathPart
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
} else if (typeof aRoutes[this.index].target === "object") {
|
|
342
|
-
for (var k = 0; k < aRoutes[this.index].target.length; k++) {
|
|
343
|
-
return sTarget === aRoutes[this.index].target[k];
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
};
|
|
347
|
-
for (var j = 0; j < aRoutes.length; j++) {
|
|
348
|
-
var oRoute = oAppComponent.getRouter().getRoute(aRoutes[j].name);
|
|
349
|
-
if (oRoute.match(aPathParts[i])) {
|
|
350
|
-
var sTarget = Object.keys(aTargets).find(fnTargetTypeEval, { index: j });
|
|
351
|
-
sTargetType = oAppComponent.getRouter().getTarget(sTarget)._oOptions.name;
|
|
352
|
-
break;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
if (sTargetType === "sap.fe.templates.ListReport") {
|
|
356
|
-
aTitleInformationPromises.push(
|
|
357
|
-
Promise.resolve(that._computeTitleInfo(sAppTitle, sAppSubTitle, sAppRootPath))
|
|
358
|
-
);
|
|
359
|
-
}
|
|
360
|
-
} else if (i < iNbPathParts) {
|
|
361
|
-
sPath += "/" + sPathPart;
|
|
362
|
-
var oMetaModel = oAppComponent.getMetaModel(),
|
|
363
|
-
sParameterPath = oMetaModel.getMetaPath(sPath),
|
|
364
|
-
bIsParameterized = oMetaModel.getObject(
|
|
365
|
-
sParameterPath + "/@com.sap.vocabularies.Common.v1.ResultContext"
|
|
366
|
-
);
|
|
367
|
-
if (bIsParameterized) {
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
if (!that.getTitleHierarchyCache()[sPath]) {
|
|
371
|
-
aTitleInformationPromises.push(that.addNewEntryInCacheTitle(sPath, oAppComponent));
|
|
372
|
-
} else {
|
|
373
|
-
aTitleInformationPromises.push(Promise.resolve(that.getTitleHierarchyCache()[sPath]));
|
|
374
|
-
}
|
|
377
|
+
sPath = "";
|
|
378
|
+
|
|
379
|
+
aPathParts.shift(); // Remove the first segment (empty string) as it has been managed above
|
|
380
|
+
aPathParts.pop(); // Remove the last segment as it corresponds to the current page and shouldn't appear in the menu
|
|
381
|
+
|
|
382
|
+
aPathParts.forEach(function(sPathPart) {
|
|
383
|
+
sPath += "/" + sPathPart;
|
|
384
|
+
var oMetaModel = oAppComponent.getMetaModel(),
|
|
385
|
+
sParameterPath = oMetaModel.getMetaPath(sPath),
|
|
386
|
+
bIsParameterized = oMetaModel.getObject(sParameterPath + "/@com.sap.vocabularies.Common.v1.ResultContext");
|
|
387
|
+
if (!bIsParameterized) {
|
|
388
|
+
aTitleInformationPromises.push(that.getTitleInfoFromPath(sPath));
|
|
375
389
|
}
|
|
376
390
|
});
|
|
377
391
|
}
|
|
378
|
-
oPageTitleInformationPromise = oCurrentPage._getPageTitleInformation().then(function(oPageTitleInformation) {
|
|
379
|
-
var sPageHash = HashChanger.getInstance().getHash();
|
|
380
|
-
var aParts = sPageHash.split("/");
|
|
381
|
-
if (aParts[aParts.length - 1].indexOf("?") === -1) {
|
|
382
|
-
sPageHash += "?restoreHistory=true";
|
|
383
|
-
} else {
|
|
384
|
-
sPageHash += "&restoreHistory=true";
|
|
385
|
-
}
|
|
386
392
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
393
|
+
// Current page
|
|
394
|
+
oPageTitleInformation = oCurrentPage._getPageTitleInformation();
|
|
395
|
+
oPageTitleInformation = that._computeTitleInfo(
|
|
396
|
+
oPageTitleInformation.title,
|
|
397
|
+
oPageTitleInformation.subtitle,
|
|
398
|
+
sAppSpecificHash + this._getHash()
|
|
399
|
+
);
|
|
400
|
+
|
|
401
|
+
if (oContext) {
|
|
402
|
+
that._getTitleHierarchyCache()[sNewPath] = oPageTitleInformation;
|
|
403
|
+
} else {
|
|
404
|
+
that._getTitleHierarchyCache()[sAppSpecificHash] = oPageTitleInformation;
|
|
405
|
+
}
|
|
396
406
|
} else {
|
|
397
407
|
aTitleInformationPromises.push(Promise.reject("Title information missing in HeaderInfo"));
|
|
398
408
|
}
|
|
399
|
-
Promise.all(aTitleInformationPromises)
|
|
409
|
+
return Promise.all(aTitleInformationPromises)
|
|
400
410
|
.then(function(aTitleInfoHierarchy) {
|
|
401
411
|
// workaround for shell which is expecting all elements being of type string
|
|
402
|
-
var aTitleInfoHierarchyShell = that.
|
|
403
|
-
sTitle =
|
|
412
|
+
var aTitleInfoHierarchyShell = that._ensureHierarchyElementsAreStrings(aTitleInfoHierarchy),
|
|
413
|
+
sTitle = oPageTitleInformation.title;
|
|
404
414
|
oAppComponent.getShellServices().setHierarchy(aTitleInfoHierarchyShell.reverse());
|
|
405
415
|
oAppComponent.getShellServices().setTitle(sTitle);
|
|
406
416
|
})
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
visible="{= ${converterContext>hasMultiVisualizations} ? '{= ${pageInternal>alpContentView} !== \'Chart\'}' : 'true' }"
|
|
21
21
|
tabTitle="{view>title}"
|
|
22
22
|
fieldMode='{= ${converterContext>templateType} === "ListReport" ? "nowrapper" : ""}'
|
|
23
|
-
stateChanged='{= ${converterContext>template} !== "ObjectPage" ? ".handlers.
|
|
23
|
+
stateChanged='{= ${converterContext>template} !== "ObjectPage" ? ".handlers.onStateChanged" : undefined}'
|
|
24
24
|
>
|
|
25
25
|
</macro:Table>
|
|
26
26
|
</core:FragmentDefinition>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Initialization Code and shared classes of library sap.fe.templates
|
|
@@ -46,7 +46,7 @@ sap.ui.define(
|
|
|
46
46
|
interfaces: [],
|
|
47
47
|
controls: [],
|
|
48
48
|
elements: [],
|
|
49
|
-
version: "1.
|
|
49
|
+
version: "1.98.0",
|
|
50
50
|
noLibraryCSS: true
|
|
51
51
|
});
|
|
52
52
|
if (!sap.fe.templates.ObjectPage) {
|
|
@@ -10,7 +10,7 @@ T_LR_VARIANT_APPLY_AUTOMATICALLY_WHEN_FILTER_SET=If predefined filter values are
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
# XTIT,25: Default Header Title for the Object Page with no Header Info
|
|
13
|
-
T_ANNOTATION_HELPER_DEFAULT_OBJECT_PAGE_HEADER_TITLE_NO_HEADER_INFO =
|
|
13
|
+
T_ANNOTATION_HELPER_DEFAULT_OBJECT_PAGE_HEADER_TITLE_NO_HEADER_INFO = Unnamed Object
|
|
14
14
|
|
|
15
15
|
# XTIT,25: Default Title for the Draft Object
|
|
16
16
|
T_NEW_OBJECT = New Object
|
|
@@ -208,3 +208,26 @@ T_SEGMENTED_BUTTON_TOOLTIP_VISUAL = Visual Filters
|
|
|
208
208
|
|
|
209
209
|
# XTOL,25
|
|
210
210
|
T_SEGMENTED_BUTTON_TOOLTIP_COMPACT = Compact Filters
|
|
211
|
+
|
|
212
|
+
#------------Mass Edit texts-----------------------
|
|
213
|
+
|
|
214
|
+
#XMSG: Message to confirm non-editable contexts
|
|
215
|
+
T_MASS_EDIT_CONFIRM_MESSAGE={0} of {1} products can''t be edited.\nDo you want to edit the remaining {2} products?
|
|
216
|
+
|
|
217
|
+
#XMSG: Message to confirm non-editable contexts detail header
|
|
218
|
+
T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_HEADER=Possible Causes
|
|
219
|
+
|
|
220
|
+
#XMSG: Message details cause grouping text
|
|
221
|
+
T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_REASON=Selected products are excluded if:
|
|
222
|
+
|
|
223
|
+
#XMSG: Message details cause for draft products to confirm non-editable contexts
|
|
224
|
+
T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_REASON_DRAFT=Somebody is working on the product (a draft exists or changes haven''t been saved).
|
|
225
|
+
|
|
226
|
+
#XMSG: Message details cause for non-editable products to confirm non-editable contexts.
|
|
227
|
+
T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_REASON_NON_EDITABLE=Editing isn''t allowed for the product.
|
|
228
|
+
|
|
229
|
+
# XBUT,30: Text for Confirm Mass Edit.
|
|
230
|
+
T_MASS_EDIT_CONFIRM_BUTTON_TEXT=Edit
|
|
231
|
+
|
|
232
|
+
# XBUT,30: Text for the cancel Mass Edit.
|
|
233
|
+
T_MASS_EDIT_CANCEL_BUTTON_TEXT=Cancel
|
|
@@ -4,7 +4,7 @@ T_LR_VARIANT_APPLY_AUTOMATICALLY_WHEN_FILTER_SET=[[[\u012C\u0192 \u03C1\u0157\u0
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
T_ANNOTATION_HELPER_DEFAULT_OBJECT_PAGE_HEADER_TITLE_NO_HEADER_INFO=[[[
|
|
7
|
+
T_ANNOTATION_HELPER_DEFAULT_OBJECT_PAGE_HEADER_TITLE_NO_HEADER_INFO=[[[\u016E\u014B\u014B\u0105\u0271\u0113\u018C \u014E\u0183\u0135\u0113\u010B\u0163\u2219\u2219\u2219\u2219\u2219]]]
|
|
8
8
|
|
|
9
9
|
T_NEW_OBJECT=[[[\u0143\u0113\u0175 \u014E\u0183\u0135\u0113\u010B\u0163\u2219\u2219\u2219\u2219]]]
|
|
10
10
|
|