@sapui5/sap.fe.templates 1.97.0 → 1.100.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 +9 -5
- package/src/sap/fe/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/Component.js +3 -2
- package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +5 -4
- package/src/sap/fe/templates/ListComponent.js +3 -2
- package/src/sap/fe/templates/ListReport/Component.js +18 -3
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +12 -6
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +33 -26
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +206 -125
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +18 -13
- package/src/sap/fe/templates/ListReport/overrides/Share.js +46 -29
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +131 -86
- package/src/sap/fe/templates/ListReport/view/fragments/CollectionVisualization.fragment.xml +8 -0
- package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +75 -13
- package/src/sap/fe/templates/ObjectPage/Component.js +21 -29
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +18 -2
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +76 -94
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +166 -155
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +10 -3
- package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +3 -2
- package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +3 -2
- package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +6 -2
- package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +3 -2
- package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +3 -2
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +3 -2
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +15 -2
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +50 -45
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +3 -22
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +1 -1
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +2 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/CollaborationDraft.fragment.xml +36 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +5 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderFacet.fragment.xml +1 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderFacetCustomContainer.fragment.xml +1 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/Heading.fragment.xml +33 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingAvatar.fragment.xml +17 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingTitle.fragment.xml +18 -0
- 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 +4 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +4 -3
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +6 -3
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +6 -3
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +136 -125
- package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +3 -2
- package/src/sap/fe/templates/TableScroller.js +3 -2
- package/src/sap/fe/templates/controls/Table.fragment.xml +1 -1
- package/src/sap/fe/templates/library.js +4 -3
- package/src/sap/fe/templates/messagebundle.properties +15 -8
- package/src/sap/fe/templates/messagebundle_ar.properties +9 -6
- package/src/sap/fe/templates/messagebundle_bg.properties +9 -6
- package/src/sap/fe/templates/messagebundle_ca.properties +9 -6
- package/src/sap/fe/templates/messagebundle_cs.properties +9 -6
- package/src/sap/fe/templates/messagebundle_cy.properties +9 -6
- package/src/sap/fe/templates/messagebundle_da.properties +9 -6
- package/src/sap/fe/templates/messagebundle_de.properties +9 -6
- package/src/sap/fe/templates/messagebundle_el.properties +10 -7
- package/src/sap/fe/templates/messagebundle_en.properties +9 -6
- package/src/sap/fe/templates/messagebundle_en_GB.properties +9 -6
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +10 -7
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +10 -7
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +10 -7
- package/src/sap/fe/templates/messagebundle_es.properties +17 -14
- package/src/sap/fe/templates/messagebundle_es_MX.properties +9 -6
- package/src/sap/fe/templates/messagebundle_et.properties +9 -6
- package/src/sap/fe/templates/messagebundle_fi.properties +9 -6
- package/src/sap/fe/templates/messagebundle_fr.properties +10 -7
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +9 -6
- package/src/sap/fe/templates/messagebundle_hi.properties +9 -6
- package/src/sap/fe/templates/messagebundle_hr.properties +10 -7
- package/src/sap/fe/templates/messagebundle_hu.properties +9 -6
- package/src/sap/fe/templates/messagebundle_id.properties +11 -8
- package/src/sap/fe/templates/messagebundle_it.properties +9 -6
- package/src/sap/fe/templates/messagebundle_iw.properties +9 -6
- package/src/sap/fe/templates/messagebundle_ja.properties +10 -7
- package/src/sap/fe/templates/messagebundle_kk.properties +9 -6
- package/src/sap/fe/templates/messagebundle_ko.properties +9 -6
- package/src/sap/fe/templates/messagebundle_lt.properties +9 -6
- package/src/sap/fe/templates/messagebundle_lv.properties +9 -6
- package/src/sap/fe/templates/messagebundle_ms.properties +9 -6
- package/src/sap/fe/templates/messagebundle_nl.properties +9 -6
- package/src/sap/fe/templates/messagebundle_no.properties +9 -6
- package/src/sap/fe/templates/messagebundle_pl.properties +9 -6
- package/src/sap/fe/templates/messagebundle_pt.properties +12 -9
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +10 -7
- package/src/sap/fe/templates/messagebundle_ro.properties +9 -6
- package/src/sap/fe/templates/messagebundle_ru.properties +9 -6
- package/src/sap/fe/templates/messagebundle_sh.properties +9 -6
- package/src/sap/fe/templates/messagebundle_sk.properties +9 -6
- package/src/sap/fe/templates/messagebundle_sl.properties +9 -6
- package/src/sap/fe/templates/messagebundle_sv.properties +10 -7
- package/src/sap/fe/templates/messagebundle_th.properties +9 -6
- package/src/sap/fe/templates/messagebundle_tr.properties +10 -7
- package/src/sap/fe/templates/messagebundle_uk.properties +10 -7
- package/src/sap/fe/templates/messagebundle_vi.properties +9 -6
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +9 -6
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +9 -6
- package/ui5.yaml +0 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderImage.fragment.xml +0 -24
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
sap.ui.define(
|
|
6
7
|
[
|
|
7
8
|
"sap/fe/core/PageController",
|
|
8
9
|
"sap/fe/core/controllerextensions/InternalRouting",
|
|
9
10
|
"./overrides/InternalRouting",
|
|
10
|
-
"sap/fe/core/controllerextensions/SideEffects",
|
|
11
11
|
"sap/fe/core/controllerextensions/EditFlow",
|
|
12
12
|
"sap/fe/core/controllerextensions/InternalEditFlow",
|
|
13
13
|
"sap/fe/core/controllerextensions/PageReady",
|
|
@@ -41,13 +41,16 @@ sap.ui.define(
|
|
|
41
41
|
"sap/ui/model/json/JSONModel",
|
|
42
42
|
"sap/fe/core/controllerextensions/Paginator",
|
|
43
43
|
"./overrides/Paginator",
|
|
44
|
-
"sap/fe/core/controllerextensions/Placeholder"
|
|
44
|
+
"sap/fe/core/controllerextensions/Placeholder",
|
|
45
|
+
"sap/base/util/UriParameters",
|
|
46
|
+
"sap/fe/core/controllerextensions/MassEdit",
|
|
47
|
+
"sap/fe/core/actions/collaboration/ActivitySync",
|
|
48
|
+
"sap/fe/core/actions/collaboration/Manage"
|
|
45
49
|
],
|
|
46
50
|
function(
|
|
47
51
|
PageController,
|
|
48
52
|
InternalRouting,
|
|
49
53
|
InternalRoutingOverride,
|
|
50
|
-
SideEffects,
|
|
51
54
|
EditFlow,
|
|
52
55
|
InternalEditFlow,
|
|
53
56
|
PageReady,
|
|
@@ -81,7 +84,11 @@ sap.ui.define(
|
|
|
81
84
|
JSONModel,
|
|
82
85
|
Paginator,
|
|
83
86
|
PaginatorOverride,
|
|
84
|
-
Placeholder
|
|
87
|
+
Placeholder,
|
|
88
|
+
UriParameters,
|
|
89
|
+
MassEdit,
|
|
90
|
+
collaborationActivitySync,
|
|
91
|
+
collaborationManage
|
|
85
92
|
) {
|
|
86
93
|
"use strict";
|
|
87
94
|
|
|
@@ -100,7 +107,6 @@ sap.ui.define(
|
|
|
100
107
|
}
|
|
101
108
|
},
|
|
102
109
|
placeholder: Placeholder,
|
|
103
|
-
sideEffects: SideEffects,
|
|
104
110
|
editFlow: EditFlow,
|
|
105
111
|
share: Share.override(ShareOverrides),
|
|
106
112
|
_editFlow: InternalEditFlow.override(EditFlowOverrides),
|
|
@@ -112,7 +118,7 @@ sap.ui.define(
|
|
|
112
118
|
getNavigationMode: function() {
|
|
113
119
|
var bIsStickyEditMode =
|
|
114
120
|
this._oView.getController().getStickyEditMode && this._oView.getController().getStickyEditMode();
|
|
115
|
-
return bIsStickyEditMode ? "explace" :
|
|
121
|
+
return bIsStickyEditMode ? "explace" : undefined;
|
|
116
122
|
}
|
|
117
123
|
}),
|
|
118
124
|
viewState: ViewState.override(ViewStateOverrides),
|
|
@@ -121,6 +127,7 @@ sap.ui.define(
|
|
|
121
127
|
return true;
|
|
122
128
|
}
|
|
123
129
|
}),
|
|
130
|
+
massEdit: MassEdit,
|
|
124
131
|
|
|
125
132
|
getExtensionAPI: function(sId) {
|
|
126
133
|
if (sId) {
|
|
@@ -152,7 +159,7 @@ sap.ui.define(
|
|
|
152
159
|
});
|
|
153
160
|
oInternalModelContext.setProperty("batchGroups", this._getBatchGroupsForView());
|
|
154
161
|
oInternalModelContext.setProperty("errorNavigationSectionFlag", false);
|
|
155
|
-
if (oObjectPage.getEnableLazyLoading()) {
|
|
162
|
+
if (!this.getView().getViewData().useNewLazyLoading && oObjectPage.getEnableLazyLoading()) {
|
|
156
163
|
//Attaching the event to make the subsection context binding active when it is visible.
|
|
157
164
|
oObjectPage.attachEvent("subSectionEnteredViewPort", this._handleSubSectionEnteredViewPort.bind(this));
|
|
158
165
|
}
|
|
@@ -203,8 +210,8 @@ sap.ui.define(
|
|
|
203
210
|
aTables = this._findTables(),
|
|
204
211
|
oFastCreationRow,
|
|
205
212
|
oObjectPage = this.byId("fe::ObjectPage"),
|
|
206
|
-
oBinding = mParameters.listBinding,
|
|
207
213
|
oInternalModelContext = that.getView().getBindingContext("internal"),
|
|
214
|
+
oInternalModel = that.getView().getModel("internal"),
|
|
208
215
|
aBatchGroups = oInternalModelContext.getProperty("batchGroups"),
|
|
209
216
|
iViewLevel = this.getView().getViewData().viewLevel;
|
|
210
217
|
|
|
@@ -260,29 +267,37 @@ sap.ui.define(
|
|
|
260
267
|
});
|
|
261
268
|
|
|
262
269
|
//Set the Binding for Paginators using ListBinding ID
|
|
263
|
-
if (
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
oBinding.
|
|
281
|
-
|
|
282
|
-
|
|
270
|
+
if (iViewLevel > 1) {
|
|
271
|
+
var oBinding = mParameters && mParameters.listBinding,
|
|
272
|
+
oPaginatorCurrentContext = oInternalModel.getProperty("/paginatorCurrentContext");
|
|
273
|
+
if (oPaginatorCurrentContext) {
|
|
274
|
+
var oBindingToUse = oPaginatorCurrentContext.getBinding();
|
|
275
|
+
this.paginator.initialize(oBindingToUse, oPaginatorCurrentContext);
|
|
276
|
+
oInternalModel.setProperty("/paginatorCurrentContext", null);
|
|
277
|
+
} else if (oBinding) {
|
|
278
|
+
if (oBinding.isA("sap.ui.model.odata.v4.ODataListBinding")) {
|
|
279
|
+
this.paginator.initialize(oBinding, oContext);
|
|
280
|
+
} else {
|
|
281
|
+
//if the binding type is not ODataListBinding because of a deeplink navigation or a refresh of the page
|
|
282
|
+
// we need to create it
|
|
283
|
+
var sContextPath = oBinding.getPath().replace(/\([^\)]*\)*$/, ""); //removing the last tuple
|
|
284
|
+
oBinding = new sap.ui.model.odata.v4.ODataListBinding(
|
|
285
|
+
oBinding.oModel,
|
|
286
|
+
"",
|
|
287
|
+
oBinding.oModel.createBindingContext(sContextPath)
|
|
288
|
+
);
|
|
289
|
+
|
|
290
|
+
oBinding.getContexts(0);
|
|
291
|
+
oBinding.attachEvent("change", function _setListBindingAsync() {
|
|
292
|
+
if (oBinding.getContexts().length > 0) {
|
|
293
|
+
that.paginator.initialize(oBinding, oContext);
|
|
294
|
+
oBinding.detachEvent("change", _setListBindingAsync);
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
}
|
|
283
298
|
}
|
|
284
299
|
}
|
|
285
|
-
if (oObjectPage.getEnableLazyLoading()) {
|
|
300
|
+
if (!this.getView().getViewData().useNewLazyLoading && oObjectPage.getEnableLazyLoading()) {
|
|
286
301
|
var aSections = oObjectPage.getSections(),
|
|
287
302
|
bUseIconTabBar = oObjectPage.getUseIconTabBar(),
|
|
288
303
|
iSkip = 2,
|
|
@@ -295,7 +310,9 @@ sap.ui.define(
|
|
|
295
310
|
// In IconTabBar mode keep the second section bound if there is an editable header and we are switching to display mode
|
|
296
311
|
if (iSkip < 1 || (bUseIconTabBar && (iSection > 1 || (iSection === 1 && !bEditableHeader && !bIsInEditMode)))) {
|
|
297
312
|
var oSubSection = aSubSections[iSubSection];
|
|
298
|
-
oSubSection.
|
|
313
|
+
if (oSubSection.data().isVisibilityDynamic !== "true") {
|
|
314
|
+
oSubSection.setBindingContext(null);
|
|
315
|
+
}
|
|
299
316
|
}
|
|
300
317
|
}
|
|
301
318
|
}
|
|
@@ -322,30 +339,39 @@ sap.ui.define(
|
|
|
322
339
|
},
|
|
323
340
|
|
|
324
341
|
_getFirstEmptyMandatoryFieldFromSubSection: function(aSubSections) {
|
|
325
|
-
|
|
326
|
-
var
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
var aFormElements = aFormContainers[formContainer].getFormElements();
|
|
343
|
-
|
|
344
|
-
for (var formElement = 0; aFormElements && formElement < aFormElements.length; formElement++) {
|
|
345
|
-
var aFields = aFormElements[formElement].getFields();
|
|
342
|
+
if (aSubSections) {
|
|
343
|
+
for (var subSection = 0; subSection < aSubSections.length; subSection++) {
|
|
344
|
+
var aBlocks = aSubSections[subSection].getBlocks();
|
|
345
|
+
|
|
346
|
+
if (aBlocks) {
|
|
347
|
+
for (var block = 0; block < aBlocks.length; block++) {
|
|
348
|
+
var aFormContainers;
|
|
349
|
+
|
|
350
|
+
if (aBlocks[block].isA("sap.ui.layout.form.Form")) {
|
|
351
|
+
aFormContainers = aBlocks[block].getFormContainers();
|
|
352
|
+
} else if (
|
|
353
|
+
aBlocks[block].getContent &&
|
|
354
|
+
aBlocks[block].getContent() &&
|
|
355
|
+
aBlocks[block].getContent().isA("sap.ui.layout.form.Form")
|
|
356
|
+
) {
|
|
357
|
+
aFormContainers = aBlocks[block].getContent().getFormContainers();
|
|
358
|
+
}
|
|
346
359
|
|
|
347
|
-
if (
|
|
348
|
-
|
|
360
|
+
if (aFormContainers) {
|
|
361
|
+
for (var formContainer = 0; formContainer < aFormContainers.length; formContainer++) {
|
|
362
|
+
var aFormElements = aFormContainers[formContainer].getFormElements();
|
|
363
|
+
if (aFormElements) {
|
|
364
|
+
for (var formElement = 0; formElement < aFormElements.length; formElement++) {
|
|
365
|
+
var aFields = aFormElements[formElement].getFields();
|
|
366
|
+
|
|
367
|
+
// The first field is not necessarily an InputBase (e.g. could be a Text)
|
|
368
|
+
// So we need to check whether it has a getRequired method
|
|
369
|
+
if (aFields[0].getRequired && aFields[0].getRequired() && !aFields[0].getValue()) {
|
|
370
|
+
return aFields[0];
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
349
375
|
}
|
|
350
376
|
}
|
|
351
377
|
}
|
|
@@ -379,24 +405,32 @@ sap.ui.define(
|
|
|
379
405
|
},
|
|
380
406
|
|
|
381
407
|
_onBackNavigationInDraft: function(oContext) {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
408
|
+
if (
|
|
409
|
+
this.getAppComponent()
|
|
410
|
+
.getRouterProxy()
|
|
411
|
+
.checkIfBackHasSameContext()
|
|
412
|
+
) {
|
|
413
|
+
// Back nav will keep the same context --> no need to display the dialog
|
|
414
|
+
history.back();
|
|
415
|
+
} else {
|
|
416
|
+
CommonUtils.fnProcessDataLossOrDraftDiscardConfirmation(
|
|
417
|
+
function() {
|
|
418
|
+
history.back();
|
|
419
|
+
},
|
|
420
|
+
Function.prototype,
|
|
421
|
+
oContext,
|
|
422
|
+
this,
|
|
423
|
+
false
|
|
424
|
+
);
|
|
425
|
+
}
|
|
391
426
|
},
|
|
392
427
|
|
|
393
428
|
_onAfterBinding: function(oBindingContext, mParameters) {
|
|
394
429
|
var oObjectPage = this.byId("fe::ObjectPage"),
|
|
395
430
|
that = this,
|
|
396
|
-
aTables = this._findTables()
|
|
397
|
-
aFormContainers = this._findFormContainers();
|
|
431
|
+
aTables = this._findTables();
|
|
398
432
|
|
|
399
|
-
this.
|
|
433
|
+
this._sideEffects.clearPropertiesStatus();
|
|
400
434
|
|
|
401
435
|
// TODO: this is only a temp solution as long as the model fix the cache issue and we use this additional
|
|
402
436
|
// binding with ownRequest
|
|
@@ -415,25 +449,6 @@ sap.ui.define(
|
|
|
415
449
|
// 2. Another problem is, that FormContainers assigned to a 'MoreBlock' does not have an
|
|
416
450
|
// internal model context at all.
|
|
417
451
|
|
|
418
|
-
aFormContainers.forEach(function(oFormContainer) {
|
|
419
|
-
var oInternalModelContext,
|
|
420
|
-
oInternalModel = oObjectPage.getModel("internal"),
|
|
421
|
-
sPageContextPath = "/pages/" + that.getView().getId(),
|
|
422
|
-
sFormContainerContextPath = "controls/" + that.getView().getLocalId(oFormContainer.getId()),
|
|
423
|
-
SHOW_DETAILS = "showDetails";
|
|
424
|
-
if (oFormContainer.getModel("internal") === undefined) {
|
|
425
|
-
oFormContainer.setModel(oInternalModel, "internal");
|
|
426
|
-
oFormContainer.setBindingContext(
|
|
427
|
-
oInternalModel.createBindingContext(sPageContextPath + "/" + sFormContainerContextPath),
|
|
428
|
-
"internal"
|
|
429
|
-
);
|
|
430
|
-
oFormContainer.bindElement({ path: "", model: "internal" });
|
|
431
|
-
} else {
|
|
432
|
-
oFormContainer.bindElement({ path: sFormContainerContextPath, model: "internal" });
|
|
433
|
-
}
|
|
434
|
-
oInternalModelContext = oFormContainer.getBindingContext("internal");
|
|
435
|
-
oInternalModelContext.setProperty(SHOW_DETAILS, false);
|
|
436
|
-
});
|
|
437
452
|
aTables.forEach(function(oTable) {
|
|
438
453
|
var oInternalModelContext = oTable.getBindingContext("internal");
|
|
439
454
|
oInternalModelContext.setProperty("creationRowFieldValidity", {});
|
|
@@ -548,6 +563,23 @@ sap.ui.define(
|
|
|
548
563
|
// Compute Edit Mode
|
|
549
564
|
oFinalUIState = this._editFlow.computeEditMode(oBindingContext);
|
|
550
565
|
|
|
566
|
+
if (ModelHelper.isCollaborationDraftSupported(oModel.getMetaModel())) {
|
|
567
|
+
oFinalUIState
|
|
568
|
+
.then(function() {
|
|
569
|
+
if (
|
|
570
|
+
that
|
|
571
|
+
.getView()
|
|
572
|
+
.getModel("ui")
|
|
573
|
+
.getProperty("/isEditable")
|
|
574
|
+
) {
|
|
575
|
+
collaborationActivitySync.connect(that.getView());
|
|
576
|
+
}
|
|
577
|
+
})
|
|
578
|
+
.catch(function(oError) {
|
|
579
|
+
Log.error("Error while waiting for the final UI State", oError);
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
|
|
551
583
|
// update related apps once Data is received in case of binding cache is not available
|
|
552
584
|
// TODO: this is only a temp solution since we need to call _updateRelatedApps method only after data for Object Page is received (if there is no binding)
|
|
553
585
|
if (oBindingContext.getBinding().oCache) {
|
|
@@ -574,8 +606,10 @@ sap.ui.define(
|
|
|
574
606
|
});
|
|
575
607
|
});
|
|
576
608
|
|
|
577
|
-
|
|
578
|
-
|
|
609
|
+
if (!this.getView().getViewData().useNewLazyLoading) {
|
|
610
|
+
// should be called only after binding is ready hence calling it in onAfterBinding
|
|
611
|
+
oObjectPage._triggerVisibleSubSectionsEvents();
|
|
612
|
+
}
|
|
579
613
|
}
|
|
580
614
|
},
|
|
581
615
|
onPageReady: function(mParameters) {
|
|
@@ -666,7 +700,7 @@ sap.ui.define(
|
|
|
666
700
|
icon: ""
|
|
667
701
|
};
|
|
668
702
|
|
|
669
|
-
return
|
|
703
|
+
return oTitleInfo;
|
|
670
704
|
},
|
|
671
705
|
|
|
672
706
|
_executeHeaderShortcut: function(sId) {
|
|
@@ -737,27 +771,31 @@ sap.ui.define(
|
|
|
737
771
|
Log.error(err);
|
|
738
772
|
}
|
|
739
773
|
var that = this;
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
oMessagePopover.
|
|
749
|
-
|
|
774
|
+
if (
|
|
775
|
+
!this.getAppComponent()
|
|
776
|
+
.getRootContainer()
|
|
777
|
+
.getCurrentPage()
|
|
778
|
+
.isA("sap.m.MessagePage")
|
|
779
|
+
) {
|
|
780
|
+
var oMessageButton = that.getView().byId("fe::FooterBar::MessageButton"),
|
|
781
|
+
oMessagePopover = oMessageButton.oMessagePopover,
|
|
782
|
+
oItemBinding = oMessagePopover.getBinding("items");
|
|
783
|
+
|
|
784
|
+
if (oItemBinding.getLength() > 0 && !oMessagePopover.isOpen()) {
|
|
785
|
+
oMessageButton.setVisible(true);
|
|
786
|
+
// workaround to ensure that oMessageButton is rendered when openBy is called
|
|
787
|
+
setTimeout(function() {
|
|
788
|
+
oMessagePopover.openBy(oMessageButton);
|
|
789
|
+
}, 0);
|
|
790
|
+
}
|
|
750
791
|
}
|
|
751
792
|
return oRet;
|
|
752
793
|
},
|
|
753
794
|
|
|
754
795
|
_editDocument: function(oContext) {
|
|
755
|
-
var oModel = this.getView().getModel("ui")
|
|
756
|
-
mParameters = {
|
|
757
|
-
prepareOnEdit: this.getView().getViewData().prepareOnEdit
|
|
758
|
-
};
|
|
796
|
+
var oModel = this.getView().getModel("ui");
|
|
759
797
|
BusyLocker.lock(oModel);
|
|
760
|
-
return this.editFlow.editDocument.apply(this.editFlow, [oContext
|
|
798
|
+
return this.editFlow.editDocument.apply(this.editFlow, [oContext]).finally(function() {
|
|
761
799
|
BusyLocker.unlock(oModel);
|
|
762
800
|
});
|
|
763
801
|
},
|
|
@@ -792,20 +830,27 @@ sap.ui.define(
|
|
|
792
830
|
);
|
|
793
831
|
}
|
|
794
832
|
});
|
|
795
|
-
return Promise.all(aWaitCreateDocuments)
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
.saveDocument(oContext, mParameters)
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
833
|
+
return Promise.all(aWaitCreateDocuments)
|
|
834
|
+
.then(function(aBindings) {
|
|
835
|
+
var mParameters = {
|
|
836
|
+
bExecuteSideEffectsOnError: bExecuteSideEffectsOnError,
|
|
837
|
+
bindings: aBindings
|
|
838
|
+
};
|
|
839
|
+
return that.editFlow.saveDocument(oContext, mParameters).catch(that._showMessagePopover.bind(that));
|
|
840
|
+
})
|
|
841
|
+
.finally(function() {
|
|
842
|
+
if (BusyLocker.isLocked(oModel)) {
|
|
843
|
+
BusyLocker.unlock(oModel);
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
},
|
|
847
|
+
|
|
848
|
+
_manageCollaboration: function() {
|
|
849
|
+
collaborationManage.openManageDialog(this.getView());
|
|
850
|
+
},
|
|
851
|
+
|
|
852
|
+
_showCollaborationUserDetails: function(event) {
|
|
853
|
+
collaborationManage.showUserDetails(event, this.getView());
|
|
809
854
|
},
|
|
810
855
|
|
|
811
856
|
_cancelDocument: function(oContext, mParameters) {
|
|
@@ -886,37 +931,6 @@ sap.ui.define(
|
|
|
886
931
|
return aBlocks;
|
|
887
932
|
},
|
|
888
933
|
|
|
889
|
-
_findFormContainers: function() {
|
|
890
|
-
var aSubSections = this._getAllSubSections(),
|
|
891
|
-
aFormContainers = [];
|
|
892
|
-
|
|
893
|
-
function _collectFormContainersInBlocks(aBlocks) {
|
|
894
|
-
for (var i = 0; i < aBlocks.length; i++) {
|
|
895
|
-
var oElement = aBlocks[i].getContent instanceof Function && aBlocks[i].getContent();
|
|
896
|
-
if (oElement && oElement.isA && oElement.isA("sap.ui.layout.DynamicSideContent")) {
|
|
897
|
-
oElement = oElement.getMainContent instanceof Function && oElement.getMainContent();
|
|
898
|
-
if (oElement && oElement.length > 0) {
|
|
899
|
-
oElement = oElement[0];
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
if (
|
|
903
|
-
oElement &&
|
|
904
|
-
oElement.isA &&
|
|
905
|
-
oElement.isA("sap.ui.layout.form.Form") &&
|
|
906
|
-
oElement.getFormContainers instanceof Function
|
|
907
|
-
) {
|
|
908
|
-
aFormContainers = aFormContainers.concat(oElement.getFormContainers());
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
for (var i = 0; i < aSubSections.length; i++) {
|
|
914
|
-
_collectFormContainersInBlocks(aSubSections[i].getBlocks());
|
|
915
|
-
_collectFormContainersInBlocks(aSubSections[i].getMoreBlocks());
|
|
916
|
-
}
|
|
917
|
-
return aFormContainers;
|
|
918
|
-
},
|
|
919
|
-
|
|
920
934
|
//TODO: This is needed for two workarounds - to be removed again
|
|
921
935
|
_findTables: function() {
|
|
922
936
|
var aSubSections = this._getAllSubSections(),
|
|
@@ -1088,7 +1102,6 @@ sap.ui.define(
|
|
|
1088
1102
|
aPathParts.forEach(function(sPathPart, i) {
|
|
1089
1103
|
sPath += "/" + sPathPart;
|
|
1090
1104
|
var oRootViewController = oAppComponent.getRootViewController();
|
|
1091
|
-
var oTitleHierarchyCache = oRootViewController.getTitleHierarchyCache();
|
|
1092
1105
|
var pWaitForTitleHiearchyInfo;
|
|
1093
1106
|
var sParameterPath = oMetaModel.getMetaPath(sPath);
|
|
1094
1107
|
var bResultContext = oMetaModel.getObject(sParameterPath + "/@com.sap.vocabularies.Common.v1.ResultContext");
|
|
@@ -1097,11 +1110,9 @@ sap.ui.define(
|
|
|
1097
1110
|
iSkipParameterized = 1;
|
|
1098
1111
|
return;
|
|
1099
1112
|
}
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
pWaitForTitleHiearchyInfo = Promise.resolve(oTitleHierarchyCache[sPath]);
|
|
1104
|
-
}
|
|
1113
|
+
|
|
1114
|
+
pWaitForTitleHiearchyInfo = oRootViewController.getTitleInfoFromPath(sPath);
|
|
1115
|
+
|
|
1105
1116
|
pWaitForTitleHiearchyInfo
|
|
1106
1117
|
.then(function(oTitleHiearchyInfo) {
|
|
1107
1118
|
var idx = i - iSkipParameterized,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
sap.ui.define(
|
|
6
7
|
["sap/m/HBox", "sap/m/HBoxRenderer", "sap/ui/core/StashedControlSupport"],
|
|
@@ -16,6 +17,12 @@ sap.ui.define(
|
|
|
16
17
|
*/
|
|
17
18
|
title: {
|
|
18
19
|
type: "string"
|
|
20
|
+
},
|
|
21
|
+
/*
|
|
22
|
+
* Fallback title to be displayed if no title is available (only needed for displaying stashed header facets in Flex dialog)
|
|
23
|
+
*/
|
|
24
|
+
fallbackTitle: {
|
|
25
|
+
type: "string"
|
|
19
26
|
}
|
|
20
27
|
},
|
|
21
28
|
designtime: "sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime"
|
|
@@ -44,7 +51,7 @@ sap.ui.define(
|
|
|
44
51
|
* Return the title property.
|
|
45
52
|
*/
|
|
46
53
|
StashableHBox.prototype.getTitle = function() {
|
|
47
|
-
return this.title;
|
|
54
|
+
return this.title || this.getFallbackTitle();
|
|
48
55
|
};
|
|
49
56
|
|
|
50
57
|
/*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
sap.ui.define(
|
|
6
7
|
["sap/m/VBox", "sap/m/VBoxRenderer", "sap/ui/core/StashedControlSupport"],
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
// Provides the Design Time Metadata for the sap.m.FlexBox control
|
|
6
7
|
sap.ui.define([], function() {
|
|
7
8
|
"use strict";
|
|
8
9
|
return {
|
|
10
|
+
actions: {
|
|
11
|
+
remove: null
|
|
12
|
+
},
|
|
9
13
|
aggregations: {
|
|
10
14
|
items: {
|
|
11
15
|
domRef: ":sap-domref",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
|
|
6
7
|
// Provides the Design Time Metadata for the sap.fe.templates.ObjectPage.controls.StashableHBox control
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
|
|
6
7
|
// Provides the Design Time Metadata for the sap.fe.templates.ObjectPage.controls.StashableVBox control
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
sap.ui.define(["sap/fe/core/CommonUtils", "sap/fe/navigation/SelectionVariant"], function(CommonUtils, SelectionVariant) {
|
|
6
7
|
"use strict";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
sap.ui.define(["sap/fe/core/CommonUtils", "sap/fe/navigation/SelectionVariant"], function(CommonUtils, SelectionVariant) {
|
|
6
7
|
"use strict";
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
sap.ui.define([], function() {
|
|
6
7
|
"use strict";
|
|
7
8
|
return {
|
|
9
|
+
onBeforeContextUpdate: function(oListBinding, iCurrentContextIndex, iIndexUpdate) {
|
|
10
|
+
var oCurrentView = this.getView(),
|
|
11
|
+
oControlContext = oCurrentView && oCurrentView.getBindingContext(),
|
|
12
|
+
aCurrentContexts = oListBinding && oListBinding.getCurrentContexts(),
|
|
13
|
+
oPaginatorCurrentContext = aCurrentContexts[iCurrentContextIndex];
|
|
14
|
+
|
|
15
|
+
if (oPaginatorCurrentContext && oControlContext && oPaginatorCurrentContext.getPath() !== oControlContext.getPath()) {
|
|
16
|
+
// Prevent default update of context index in Object Page Paginator when view context is different from the paginator context.
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
|
|
8
21
|
onContextUpdate: function(oContext) {
|
|
9
22
|
var that = this;
|
|
10
23
|
that.base._routing.navigateToContext(oContext, { callExtension: true });
|