@sapui5/sap.suite.ui.generic.template 1.123.1 → 1.124.1
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 +1 -1
- package/src/sap/suite/ui/generic/template/.library +4 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +16 -9
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/CtxMenuHandler.js +77 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/util/FilterUtil.js +52 -51
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +5 -4
- package/src/sap/suite/ui/generic/template/ListReport/controller/CtxMenuHandler.js +20 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties +3 -0
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +130 -99
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/CtxMenuHandler.js +8 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageSortingHandler.js +2 -5
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageStripHelper.js +4 -3
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/PasteHandler.js +12 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +15 -3
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/InlineCreationRowsHelper.js +12 -15
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/RequiredPropHelper.js +4 -3
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +5 -2
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +12 -12
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartTable.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/detailTemplates/detailUtils.js +3 -3
- package/src/sap/suite/ui/generic/template/extensionAPI/extensionAPI.js +2 -0
- package/src/sap/suite/ui/generic/template/fragments/AnalyticalTableColumns.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/fragments/ContactDetails.fragment.xml +15 -9
- package/src/sap/suite/ui/generic/template/fragments/ContactDetailsQuickViewGroupReplica.fragment.xml +6 -3
- package/src/sap/suite/ui/generic/template/fragments/FileUploader.fragment.xml +1 -0
- package/src/sap/suite/ui/generic/template/fragments/QuickViewSmartForm.fragment.xml +6 -3
- package/src/sap/suite/ui/generic/template/fragments/TableColumns.fragment.xml +12 -0
- package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +5 -9
- package/src/sap/suite/ui/generic/template/js/RuntimeFormatters.js +2 -3
- package/src/sap/suite/ui/generic/template/lib/AdaptiveCardHelper.js +2 -4
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +24 -16
- package/src/sap/suite/ui/generic/template/lib/CRUDActionHandler.js +5 -5
- package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +3 -2
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +68 -57
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +30 -7
- package/src/sap/suite/ui/generic/template/lib/ContactCardDetailHelper.js +4 -18
- package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +20 -18
- package/src/sap/suite/ui/generic/template/lib/ShareUtils.js +141 -126
- package/src/sap/suite/ui/generic/template/lib/cards/DTCardHelper.js +48 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +5 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +1 -1
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsCardHelper.js +14 -7
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsFECardProvider.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsHandler.js +54 -17
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/library.js +7 -5
- package/src/sap/suite/ui/generic/template/listTemplates/controller/IappStateHandler.js +5 -0
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +6 -0
- package/src/sap/suite/ui/generic/template/listTemplates/listUtils.js +2 -5
- package/src/sap/suite/ui/generic/template/support/lib/CommonChecks.js +4 -6
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal/library.source.less +10 -1
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ALPConstants.less +47 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/AnalyticalListPage.less +475 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ListReport.less +33 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ObjectPage.less +391 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/QuickCreate.less +96 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/QuickView.less +108 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/alr_zen.css +136 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/base.less +7 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/crosstab_library.css +20 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/library.source.less +9 -0
- package/ui5.yaml +1 -0
|
@@ -33,13 +33,16 @@ sap.ui.define([
|
|
|
33
33
|
"sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/InlineCreationRowsHelper",
|
|
34
34
|
"sap/suite/ui/generic/template/ObjectPage/controller/RelatedAppsHandler",
|
|
35
35
|
"sap/ui/core/Lib",
|
|
36
|
-
"sap/suite/ui/generic/template/ObjectPage/controller/PasteHandler"
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
"sap/suite/ui/generic/template/ObjectPage/controller/PasteHandler",
|
|
37
|
+
"sap/suite/ui/generic/template/lib/insights/InsightsHandler",
|
|
38
|
+
"sap/suite/ui/generic/template/lib/cards/DTCardHelper"
|
|
39
|
+
|
|
40
|
+
], function (ControllerExtension, MessageBox, Filter, Sorter, ManagedObjectModel, SelectionVariant, controlHelper,
|
|
41
|
+
testableHelper, detailUtils, MessageSortingHandler, MessageStripHelper, SectionTitleHandler, SideContentHandler, ExtensionAPI,
|
|
39
42
|
ResponsiveTable, ShareUtils, FeLogger, MultipleViewsHandler, MessageUtils, KeyCodes, merge, FilterProcessor,
|
|
40
|
-
StableIdHelper, extend, isEmptyObject, FeError,
|
|
41
|
-
CreateWithDialogHandler, Device, whitespaceReplacer, deepExtend, CtxMenuHandler,
|
|
42
|
-
InlineCreationRowsHelper, RelatedAppsHandler, Lib, PasteHandler
|
|
43
|
+
StableIdHelper, extend, isEmptyObject, FeError,
|
|
44
|
+
CreateWithDialogHandler, Device, whitespaceReplacer, deepExtend, CtxMenuHandler,
|
|
45
|
+
InlineCreationRowsHelper, RelatedAppsHandler, Lib, PasteHandler, InsightsHandler, DTCardHelper
|
|
43
46
|
) {
|
|
44
47
|
"use strict";
|
|
45
48
|
var sClassName = "ObjectPage.controller.ControllerImplementation";
|
|
@@ -100,12 +103,12 @@ sap.ui.define([
|
|
|
100
103
|
// any asynchronous actions triggered by applying the state are not considered - promise is resolved as soon, as synchronous
|
|
101
104
|
// processing is completed
|
|
102
105
|
var fnInitialStateAppliedResolve = null; // resolve function for oStateAppliedAfterBindPromise
|
|
103
|
-
|
|
106
|
+
|
|
104
107
|
var mTablesWithSelectionChangeDuringDraftEdit = Object.create(null); // initialized in draft edit; collects the ids of all tables that have a selection change during the edit session
|
|
105
108
|
|
|
106
109
|
// This represents the global state of object page which affects the data loading of sub-sections.
|
|
107
110
|
// There are different states, for which data loading of a sub-sections might be waiting for,
|
|
108
|
-
// We use this variable to keep track whether those things have completed or not.
|
|
111
|
+
// We use this variable to keep track whether those things have completed or not.
|
|
109
112
|
// This state is reset in every rebind cycle (by method resetWaitForState) and set appropriately (by method setWaitForState) whenever some events happen like, header data available, stateApplied, layoutFinished.
|
|
110
113
|
// Currently structure of this state looks like
|
|
111
114
|
// oWaitForState = {
|
|
@@ -129,7 +132,7 @@ sap.ui.define([
|
|
|
129
132
|
|
|
130
133
|
// Map would contain the SubSections which has come to ViewPort once for the current ObjectPage context
|
|
131
134
|
// and the onSubSectionEnteredExtension is called. When the OP context is changed in the beforeRebind method
|
|
132
|
-
// the Map will be reset the states
|
|
135
|
+
// the Map will be reset the states
|
|
133
136
|
var mSubSectionsInitState = Object.create(null);
|
|
134
137
|
|
|
135
138
|
function adjustAndProvideBindingParamsForSmartTableOrChart(oEvent) {
|
|
@@ -157,7 +160,7 @@ sap.ui.define([
|
|
|
157
160
|
oTemplateUtils.oServices.oViewDependencyHelper.setAllPagesDirty([oComponent.getId()]);
|
|
158
161
|
oTemplateUtils.oServices.oViewDependencyHelper.unbindChildren(oComponent);
|
|
159
162
|
// Draft activation is a kind of cross navigation -> invalidate paginator info
|
|
160
|
-
|
|
163
|
+
|
|
161
164
|
var bNavToListOnSave = oComponent.getNavToListOnSave();
|
|
162
165
|
var sEditFlow = oTemplateUtils.oServices.oApplication.getEditFlowOfRoot();
|
|
163
166
|
if (sEditFlow === "direct" && bEditNextObject) {
|
|
@@ -165,7 +168,7 @@ sap.ui.define([
|
|
|
165
168
|
} else if (sEditFlow === "direct" && bNavToListOnSave !== false ) {
|
|
166
169
|
oTemplateUtils.oServices.oApplication.invalidatePaginatorInfo();
|
|
167
170
|
oTemplateUtils.oServices.oApplication.navigateAfterActivation(false);
|
|
168
|
-
|
|
171
|
+
|
|
169
172
|
} else {
|
|
170
173
|
oTemplateUtils.oServices.oApplication.invalidatePaginatorInfo();
|
|
171
174
|
var oActiveContext = !bNavToListOnSave && oResponse.context;
|
|
@@ -185,7 +188,7 @@ sap.ui.define([
|
|
|
185
188
|
};
|
|
186
189
|
oTemplateUtils.oComponentUtils.fire(oController, "AfterActivate", oEvent);
|
|
187
190
|
}
|
|
188
|
-
|
|
191
|
+
|
|
189
192
|
// Contains the common code when returning to display mode via save or cancel in a non-draft scenario
|
|
190
193
|
function fnReturnToDisplayNonDraft(){
|
|
191
194
|
if (mTablesWithSelectionChangeDuringDraftEdit){ // will not be fulfilled in the create case
|
|
@@ -195,7 +198,7 @@ sap.ui.define([
|
|
|
195
198
|
mTablesWithSelectionChangeDuringDraftEdit = Object.create(null);
|
|
196
199
|
}
|
|
197
200
|
}
|
|
198
|
-
|
|
201
|
+
|
|
199
202
|
function onValidateDraft(oEvent) {
|
|
200
203
|
var oSourceElement = oEvent.getSource();
|
|
201
204
|
oTemplateUtils.oServices.oApplication.addSideEffectPromise(new Promise(function (fnResolve, fnReject) {
|
|
@@ -348,9 +351,9 @@ sap.ui.define([
|
|
|
348
351
|
fnImpl = onActivateImpl.bind(null, true);
|
|
349
352
|
sButtonId = sBtnId;
|
|
350
353
|
} else {
|
|
351
|
-
fnImpl = onActivateImpl.bind(null, false);
|
|
354
|
+
fnImpl = onActivateImpl.bind(null, false);
|
|
352
355
|
var oSourceElement = vSaveCase.getSource();
|
|
353
|
-
sButtonId = controlHelper.isMenuButton(oSourceElement) ?
|
|
356
|
+
sButtonId = controlHelper.isMenuButton(oSourceElement) ?
|
|
354
357
|
StableIdHelper.getStableId({
|
|
355
358
|
type: "ObjectPageAction",
|
|
356
359
|
subType: "ActivateMenu"}) :
|
|
@@ -561,31 +564,41 @@ sap.ui.define([
|
|
|
561
564
|
};
|
|
562
565
|
});
|
|
563
566
|
} else {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
title: oTemplatePrivateModel.getProperty("/objectPage/headerInfo/objectTitle"),
|
|
571
|
-
subtitle: oTemplatePrivateModel.getProperty("/objectPage/headerInfo/objectSubtitle"),
|
|
572
|
-
customUrl: ShareUtils.getCustomUrl(),
|
|
573
|
-
currentUrl: sCurrentUrl,
|
|
574
|
-
appId: oAppManifest.id,
|
|
575
|
-
bEnableCollaborationShareAsCard: (oOwnerComponent.getAppComponent().getObjectPageHeaderType() === "Dynamic" &&
|
|
576
|
-
oTemplatePrivateModel.getProperty("/objectPage/displayMode") < 2) &&
|
|
577
|
-
oOwnerComponent.getAppComponent().getCollaborationSettings().isShareAsCardEnabled !== false &&
|
|
578
|
-
!isSubObjectPage
|
|
579
|
-
|
|
580
|
-
};
|
|
567
|
+
var getDtCardManifestPromise = new Promise(function (fnResolve) {
|
|
568
|
+
oState.oDTCardHelper.getCardManifest(DTCardHelper.CardTypes.ADAPTIVE).then(function (oCardManifest) {
|
|
569
|
+
fnResolve(oCardManifest);
|
|
570
|
+
}).catch(function () {
|
|
571
|
+
oLogger.info("Design time card is not available");
|
|
572
|
+
fnResolve(null);
|
|
581
573
|
});
|
|
582
574
|
});
|
|
575
|
+
return Promise.all([getDtCardManifestPromise, ShareUtils.getCurrentUrl()]).then(function (aResolvedPromises) {
|
|
576
|
+
var oCardManifest = aResolvedPromises[0];
|
|
577
|
+
var sCurrentUrl = aResolvedPromises[1];
|
|
578
|
+
return {
|
|
579
|
+
serviceUrl: "",
|
|
580
|
+
appTitle: oAppManifest ? oAppManifest.title : "",
|
|
581
|
+
objectShellTitle: oTemplatePrivateModel.getProperty("/objectPage/headerInfo/objectShellTitle"),
|
|
582
|
+
title: oTemplatePrivateModel.getProperty("/objectPage/headerInfo/objectTitle"),
|
|
583
|
+
subtitle: oTemplatePrivateModel.getProperty("/objectPage/headerInfo/objectSubtitle"),
|
|
584
|
+
customUrl: ShareUtils.getCustomUrl(),
|
|
585
|
+
currentUrl: sCurrentUrl,
|
|
586
|
+
appId: oAppManifest.id,
|
|
587
|
+
bEnableCollaborationShareAsCard: !!oCardManifest || ((oOwnerComponent.getAppComponent().getObjectPageHeaderType() === "Dynamic" &&
|
|
588
|
+
oTemplatePrivateModel.getProperty("/objectPage/displayMode") < 2) &&
|
|
589
|
+
oOwnerComponent.getAppComponent().getCollaborationSettings().isShareAsCardEnabled !== false &&
|
|
590
|
+
!isSubObjectPage),
|
|
591
|
+
oDtCardManifest: oCardManifest
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
});
|
|
595
|
+
|
|
583
596
|
}
|
|
584
597
|
}
|
|
585
598
|
};
|
|
586
599
|
ShareUtils.openSharePopup(oTemplateUtils.oCommonUtils, oButton, oFragmentController, oController);
|
|
587
600
|
}
|
|
588
|
-
|
|
601
|
+
|
|
589
602
|
var fnDeleteConfirmationOnDelete;
|
|
590
603
|
|
|
591
604
|
function getObjectPageDeleteDialog() {
|
|
@@ -667,7 +680,7 @@ sap.ui.define([
|
|
|
667
680
|
function onDelete() {
|
|
668
681
|
oTemplateUtils.oCommonUtils.executeIfControlReady(onDeleteImpl, "delete");
|
|
669
682
|
}
|
|
670
|
-
|
|
683
|
+
|
|
671
684
|
function isObjectPageScrolledToTop(){
|
|
672
685
|
var aObjectPageSections = oObjectPage.getSections() || [];
|
|
673
686
|
var oFirstVisibleSection = aObjectPageSections.find(function(oSection){
|
|
@@ -718,9 +731,9 @@ sap.ui.define([
|
|
|
718
731
|
});
|
|
719
732
|
}
|
|
720
733
|
var oBusyHelper = oTemplateUtils.oServices.oApplication.getBusyHelper();
|
|
721
|
-
oBusyHelper.setBusy(Promise.allSettled(aWaitForSmartFieldsPromise)); // setting the app busy will trigger the setting of focus finally
|
|
734
|
+
oBusyHelper.setBusy(Promise.allSettled(aWaitForSmartFieldsPromise)); // setting the app busy will trigger the setting of focus finally
|
|
722
735
|
}
|
|
723
|
-
oTemplateUtils.oServices.oApplication.setNextFocus(fnFocusForEdit.bind(null, bMoveToTop));
|
|
736
|
+
oTemplateUtils.oServices.oApplication.setNextFocus(fnFocusForEdit.bind(null, bMoveToTop));
|
|
724
737
|
}
|
|
725
738
|
|
|
726
739
|
var fnExpiredLockDialog; // declare function already here, to avoid usage before declaration
|
|
@@ -865,7 +878,7 @@ sap.ui.define([
|
|
|
865
878
|
var iSuccessfullyDeletedCount = 0;
|
|
866
879
|
var iFailedToDeleteCount;
|
|
867
880
|
var oEntity = oController.getView().getModel().getObject(aContexts[0].getPath());
|
|
868
|
-
|
|
881
|
+
|
|
869
882
|
var oDeletePromise = oTemplateUtils.oServices.oCRUDManager.deleteEntities({
|
|
870
883
|
pathes: aDeleteContextPaths,
|
|
871
884
|
suppressRefreshAllComponents: true,
|
|
@@ -880,7 +893,7 @@ sap.ui.define([
|
|
|
880
893
|
iFailedToDeleteCount = aFailedPath.length;
|
|
881
894
|
}
|
|
882
895
|
iSuccessfullyDeletedCount = aDeleteContextPaths.length - iFailedToDeleteCount;
|
|
883
|
-
|
|
896
|
+
|
|
884
897
|
var sMessage = "";
|
|
885
898
|
if (iSuccessfullyDeletedCount > 0) {
|
|
886
899
|
var oInnerTable = oSmartTable.getTable();
|
|
@@ -973,8 +986,8 @@ sap.ui.define([
|
|
|
973
986
|
return;
|
|
974
987
|
}
|
|
975
988
|
|
|
976
|
-
// For draft synchronization process, we do not wait until deletion operation is confirmed by the user because if we do, there may be a scenario wherein
|
|
977
|
-
// the user confirms the deletion just when the activation of the transient context(s) has started but not yet completed. In that case, since transient
|
|
989
|
+
// For draft synchronization process, we do not wait until deletion operation is confirmed by the user because if we do, there may be a scenario wherein
|
|
990
|
+
// the user confirms the deletion just when the activation of the transient context(s) has started but not yet completed. In that case, since transient
|
|
978
991
|
// context(s) is not yet converted to draft context, it gets deleted from the UI but the rows would have been created in the backend and is also shown
|
|
979
992
|
// in the table when table is refreshed. That's why draft synchronization is done at an early point of time which prevents the above mentioned
|
|
980
993
|
// complicated situation.
|
|
@@ -992,19 +1005,19 @@ sap.ui.define([
|
|
|
992
1005
|
aNonDeletableContexts.push(oContext);
|
|
993
1006
|
}
|
|
994
1007
|
});
|
|
995
|
-
|
|
1008
|
+
|
|
996
1009
|
var oDialogParameter = {};
|
|
997
1010
|
oDialogParameter.undeletableCount = 0;
|
|
998
1011
|
oDialogParameter.tableMode = sTableMode;
|
|
999
1012
|
if (aContexts.length > 1) {
|
|
1000
1013
|
oDialogParameter.title = oTemplateUtils.oCommonUtils.getText("ST_GENERIC_DELETE_TITLE_WITH_COUNT", [aContexts.length]);
|
|
1001
1014
|
oDialogParameter.text = oTemplateUtils.oCommonUtils.getContextText("DELETE_SELECTED_ITEMS", oSmartTable.getId());
|
|
1002
|
-
|
|
1015
|
+
|
|
1003
1016
|
} else {
|
|
1004
1017
|
oDialogParameter.title = oTemplateUtils.oCommonUtils.getText("ST_GENERIC_DELETE_TITLE");
|
|
1005
1018
|
oDialogParameter.text = oTemplateUtils.oCommonEventHandlers.getSelectedItemContextForDeleteMessage(oSmartTable, aContexts[0], true);
|
|
1006
1019
|
}
|
|
1007
|
-
|
|
1020
|
+
|
|
1008
1021
|
if (aNonDeletableContexts.length > 0) {
|
|
1009
1022
|
oDialogParameter.undeletableText = oTemplateUtils.oCommonUtils.getContextText("DELETE_UNDELETABLE_ITEMS", oSmartTable.getId(), null,
|
|
1010
1023
|
[aNonDeletableContexts.length, aContexts.length]);
|
|
@@ -1014,7 +1027,7 @@ sap.ui.define([
|
|
|
1014
1027
|
oDialogParameter.text = oTemplateUtils.oCommonUtils.getText("DELETE_UNDELETABLE_ITEM");
|
|
1015
1028
|
}
|
|
1016
1029
|
}
|
|
1017
|
-
|
|
1030
|
+
|
|
1018
1031
|
var oBeforeLineItemDeleteProperties = {
|
|
1019
1032
|
sUiElementId: sUiElementId,
|
|
1020
1033
|
aContexts: aContexts
|
|
@@ -1322,7 +1335,7 @@ sap.ui.define([
|
|
|
1322
1335
|
var oSelectedSectionInfo = fnGetSelectedSectionInfo(oEvent);
|
|
1323
1336
|
fnSectionChanged(oSelectedSectionInfo.sNewSectionId, oSelectedSectionInfo.sNewSubSectionId);
|
|
1324
1337
|
}
|
|
1325
|
-
|
|
1338
|
+
|
|
1326
1339
|
function fnFocusOnFirstActionButton(){
|
|
1327
1340
|
setTimeout(function(){
|
|
1328
1341
|
var oObjectHeader = oObjectPage.getHeaderTitle();
|
|
@@ -1332,11 +1345,11 @@ sap.ui.define([
|
|
|
1332
1345
|
return oAction.getVisible() && oAction.getEnabled && oAction.getEnabled();
|
|
1333
1346
|
});
|
|
1334
1347
|
if (oActionButton){
|
|
1335
|
-
controlHelper.focusControl(oActionButton.getId());
|
|
1348
|
+
controlHelper.focusControl(oActionButton.getId());
|
|
1336
1349
|
}
|
|
1337
1350
|
}, 0);
|
|
1338
1351
|
}
|
|
1339
|
-
|
|
1352
|
+
|
|
1340
1353
|
// Returns a Promise that resolves to the control the focus should be set to when entering edit mode
|
|
1341
1354
|
// bFocusAtTop determines whether the search should start at the first subsection of the page or at the currently selected subsection.
|
|
1342
1355
|
// Note that this call also moves the selected section and subsection to the identified control.
|
|
@@ -1359,7 +1372,7 @@ sap.ui.define([
|
|
|
1359
1372
|
if (sSelectedSection === oControl.getId()){
|
|
1360
1373
|
sSelectedSection = null;
|
|
1361
1374
|
}
|
|
1362
|
-
if (sSelectedSection){ // sSelectedSection was not yet processed, but we want to get only sections that come after that
|
|
1375
|
+
if (sSelectedSection){ // sSelectedSection was not yet processed, but we want to get only sections that come after that
|
|
1363
1376
|
return false;
|
|
1364
1377
|
}
|
|
1365
1378
|
oSelectedSection = oControl;
|
|
@@ -1372,7 +1385,7 @@ sap.ui.define([
|
|
|
1372
1385
|
if (sSelectedSubSection){ // sSelectedSubSection was not yet processed, but we want to get only subsections that come after that
|
|
1373
1386
|
return false;
|
|
1374
1387
|
}
|
|
1375
|
-
// Scroll to the given subsection and make sure that controls and bindings for this subsection are initialized (necessary because of lazy loading)
|
|
1388
|
+
// Scroll to the given subsection and make sure that controls and bindings for this subsection are initialized (necessary because of lazy loading)
|
|
1376
1389
|
fnSubSectionEntered(oControl);
|
|
1377
1390
|
oObjectPage.setSelectedSection(oSelectedSection);
|
|
1378
1391
|
oSelectedSection.setSelectedSubSection(oControl);
|
|
@@ -1380,7 +1393,7 @@ sap.ui.define([
|
|
|
1380
1393
|
}
|
|
1381
1394
|
if (controlHelper.isSmartField(oControl)){ // check whether the SmartField is the correct target for focussing
|
|
1382
1395
|
return controlHelper.getSmartFieldIsFocussableForInputPromise(oControl).then(function(bIsFocussable){
|
|
1383
|
-
return bIsFocussable && oControl; // If the SmartField has turned out to be focussable take it. Otherwise no need to investigate the subtree below it.
|
|
1396
|
+
return bIsFocussable && oControl; // If the SmartField has turned out to be focussable take it. Otherwise no need to investigate the subtree below it.
|
|
1384
1397
|
});
|
|
1385
1398
|
}
|
|
1386
1399
|
if (controlHelper.isSmartTable(oControl)){
|
|
@@ -1404,7 +1417,7 @@ sap.ui.define([
|
|
|
1404
1417
|
}
|
|
1405
1418
|
return false;
|
|
1406
1419
|
});
|
|
1407
|
-
|
|
1420
|
+
|
|
1408
1421
|
}
|
|
1409
1422
|
return null;
|
|
1410
1423
|
});
|
|
@@ -1422,7 +1435,7 @@ sap.ui.define([
|
|
|
1422
1435
|
return oTargetControl;
|
|
1423
1436
|
}); // Normalize the return value such that it always is a Promise
|
|
1424
1437
|
}
|
|
1425
|
-
|
|
1438
|
+
|
|
1426
1439
|
function fnFocusForEdit(bFocusAtTop){
|
|
1427
1440
|
setTimeout(function(){
|
|
1428
1441
|
var oFocusControlPromise = getFocusForEditPromise(bFocusAtTop);
|
|
@@ -1507,12 +1520,12 @@ sap.ui.define([
|
|
|
1507
1520
|
subType: "CreateWithDialog",
|
|
1508
1521
|
sFacet: sFacetId
|
|
1509
1522
|
});
|
|
1510
|
-
|
|
1523
|
+
|
|
1511
1524
|
var oCreationDialog = sIdForCreateWithDialog && oController.byId(sIdForCreateWithDialog);
|
|
1512
1525
|
var oSmartTable = oTemplateUtils.oCommonUtils.getOwnerControl(oCreateButton, true);
|
|
1513
1526
|
var sSmartTableCreationMode = fnGetSmartTableCreationMode(oSmartTable);
|
|
1514
1527
|
var bIsInlineCreationRowsEnabled = ["creationRows", "creationRowsHiddenInEditMode"].includes(sSmartTableCreationMode);
|
|
1515
|
-
|
|
1528
|
+
|
|
1516
1529
|
if (oCreationDialog) {
|
|
1517
1530
|
oCreateWithDialogHandler.createWithDialog(oCreationDialog, oCreateButton);
|
|
1518
1531
|
} else if (bIsInlineCreationRowsEnabled) {
|
|
@@ -1536,7 +1549,7 @@ sap.ui.define([
|
|
|
1536
1549
|
oLogger.info("Filtering message " + oMessage.getMessage() + " (id: " + oMessage.getId() + ") for table " + oTable.getId() + " returns " + bRet);
|
|
1537
1550
|
return bRet;
|
|
1538
1551
|
}
|
|
1539
|
-
|
|
1552
|
+
|
|
1540
1553
|
function fnDataStateClose(oEvent){
|
|
1541
1554
|
oState.oMessageStripHelper.onClose(oEvent);
|
|
1542
1555
|
}
|
|
@@ -1554,12 +1567,12 @@ sap.ui.define([
|
|
|
1554
1567
|
}
|
|
1555
1568
|
});
|
|
1556
1569
|
}
|
|
1557
|
-
|
|
1570
|
+
|
|
1558
1571
|
function onDataReceivedForTable(oControl) {
|
|
1559
1572
|
setNoDataTextIfRequired(oControl);
|
|
1560
1573
|
}
|
|
1561
|
-
|
|
1562
|
-
|
|
1574
|
+
|
|
1575
|
+
|
|
1563
1576
|
// Common Implementation for switching between active and draft version used by static and dynamic header
|
|
1564
1577
|
function fnSwitchDraftAndActiveImpl(bHasDraftEntity, fnFocusAfterSwitch){
|
|
1565
1578
|
oTemplateUtils.oServices.oApplicationController.synchronizeDraftAsync().then(function() {
|
|
@@ -1571,7 +1584,7 @@ sap.ui.define([
|
|
|
1571
1584
|
fnSwitch();
|
|
1572
1585
|
}));
|
|
1573
1586
|
}, true);
|
|
1574
|
-
});
|
|
1587
|
+
});
|
|
1575
1588
|
}
|
|
1576
1589
|
|
|
1577
1590
|
// Implementation of draft toggle for dynamic header
|
|
@@ -1613,7 +1626,7 @@ sap.ui.define([
|
|
|
1613
1626
|
bHasFiltersOrSearches = oSearchField && oSearchField.getValue().trim();
|
|
1614
1627
|
}
|
|
1615
1628
|
sTextId = bHasFiltersOrSearches ? "NOITEMS_SMARTTABLE_WITH_FILTER" : "NOITEMS_SMARTTABLE";
|
|
1616
|
-
}
|
|
1629
|
+
}
|
|
1617
1630
|
var sNoDataText = oTemplateUtils.oCommonUtils.getContextText(sTextId, sSmartTableId);
|
|
1618
1631
|
oSmartTable.setNoData(sNoDataText);
|
|
1619
1632
|
}
|
|
@@ -1623,7 +1636,7 @@ sap.ui.define([
|
|
|
1623
1636
|
oViewProxy.refreshFacets = function (mRefreshInfos) {
|
|
1624
1637
|
var fnRefreshSubSection = function (oSubSection) {
|
|
1625
1638
|
var oSubSectionInfoObject = oTemplateUtils.oInfoObjectHandler.getControlInformation(oSubSection.getId());
|
|
1626
|
-
if (oSubSectionInfoObject) { // In case editableHeaderContent is enabled in manifest, There will be a HeaderFacet in edit mode for SubSectionInfo is not created. This just needs to be skipped
|
|
1639
|
+
if (oSubSectionInfoObject) { // In case editableHeaderContent is enabled in manifest, There will be a HeaderFacet in edit mode for SubSectionInfo is not created. This just needs to be skipped
|
|
1627
1640
|
oSubSectionInfoObject.refresh(mRefreshInfos, false);
|
|
1628
1641
|
}
|
|
1629
1642
|
};
|
|
@@ -1739,11 +1752,11 @@ sap.ui.define([
|
|
|
1739
1752
|
// This method is part of the infrastructure that ensures that data loading is triggered for all subsections it is needed for.
|
|
1740
1753
|
// This method is called when a state change happens that may must trigger data-loading for additional sub-sections.
|
|
1741
1754
|
// This is: If either a property of oWaitForState is set to true or bWaitForViewPort is set to false.
|
|
1742
|
-
// The method will ensure data loading for all affected sub-sections in an asynchronous way.
|
|
1755
|
+
// The method will ensure data loading for all affected sub-sections in an asynchronous way.
|
|
1743
1756
|
function fnHandleStateChangeForAllSubSections() {
|
|
1744
1757
|
// Check the info objects for all relevant sub-sections.
|
|
1745
1758
|
// If bWaitForViewPort is true (normal case) only sub-sections are relevant which do not wait for the section to have entered the view-port.
|
|
1746
|
-
// Otherwise all sub-sections are relevant.
|
|
1759
|
+
// Otherwise all sub-sections are relevant.
|
|
1747
1760
|
var sCategory = bWaitForViewPort ? "subSectionNotWaitingForViewPort" : "subSection";
|
|
1748
1761
|
var oView = oController.getView();
|
|
1749
1762
|
oTemplateUtils.oInfoObjectHandler.executeForAllInformationObjects(sCategory, function (oSubSectionInfoObj) {
|
|
@@ -1802,7 +1815,7 @@ sap.ui.define([
|
|
|
1802
1815
|
// Check if initialization code is executed for the SubSection. If not initialize the same
|
|
1803
1816
|
var sSubSectionId = oSubSection.getId();
|
|
1804
1817
|
if (!mSubSectionsInitState[sSubSectionId]) {
|
|
1805
|
-
// Execute Application specific logic which needs to be executed
|
|
1818
|
+
// Execute Application specific logic which needs to be executed
|
|
1806
1819
|
oController.onSubSectionEnteredExtension(oSubSection);
|
|
1807
1820
|
mSubSectionsInitState[sSubSectionId] = true;
|
|
1808
1821
|
}
|
|
@@ -1936,7 +1949,7 @@ sap.ui.define([
|
|
|
1936
1949
|
}
|
|
1937
1950
|
resolveStateApplied();
|
|
1938
1951
|
};
|
|
1939
|
-
|
|
1952
|
+
|
|
1940
1953
|
oViewProxy.prepareForControlNavigation = function(sTargetControlId){
|
|
1941
1954
|
var bUseIconTabBar = oObjectPage.getUseIconTabBar();
|
|
1942
1955
|
if (!bUseIconTabBar) {
|
|
@@ -1948,23 +1961,23 @@ sap.ui.define([
|
|
|
1948
1961
|
if (bFound){
|
|
1949
1962
|
return oAncestor.getId();
|
|
1950
1963
|
}
|
|
1951
|
-
sTargetSubSectionId = oAncestor.getId();
|
|
1964
|
+
sTargetSubSectionId = oAncestor.getId();
|
|
1952
1965
|
});
|
|
1953
1966
|
var sSelectedSectionId = sTargetSectionId && oObjectPage.getSelectedSection();
|
|
1954
1967
|
if (sTargetSectionId !== sSelectedSectionId) {
|
|
1955
1968
|
oObjectPage.setSelectedSection(sTargetSectionId);
|
|
1956
1969
|
fnSectionChanged(sTargetSectionId, sTargetSubSectionId);
|
|
1957
|
-
}
|
|
1970
|
+
}
|
|
1958
1971
|
};
|
|
1959
|
-
|
|
1972
|
+
|
|
1960
1973
|
// This function implements the method prepareForMessageHandling as described in class sap.suite.ui.generic.template.lib.TemplateAssembler.
|
|
1961
1974
|
// (Nearly) the same functionality is also provided for the message popover (see MessageButtonHost, below)
|
|
1962
1975
|
// However, in this case we have an additional challenge: The content of the popover may change while it is open.
|
|
1963
1976
|
// Therefore, an additional function is provided for the function getPrepareMessageDisplayPromise which is added to the message button host:
|
|
1964
|
-
// If oItemBinding is provided, then the returned Promise resolves to an object which has a single property getSubtitle.
|
|
1977
|
+
// If oItemBinding is provided, then the returned Promise resolves to an object which has a single property getSubtitle.
|
|
1965
1978
|
// This is a function(sMsgId, sFallback) which returns the subtitle for the message with the given id. This is partially redundant with the content of
|
|
1966
1979
|
// property mMessageToSubtitle of oHelperModel. However, the value returned by this function may be updated while the popover is open.
|
|
1967
|
-
// In order to give the popover the chance to react on such changes property heartBeat of oHelperModel will be modified in such cases.
|
|
1980
|
+
// In order to give the popover the chance to react on such changes property heartBeat of oHelperModel will be modified in such cases.
|
|
1968
1981
|
function fnPrepareForMessageHandling(aMessages, oItemBinding, oHelperModel, sBindingPath){
|
|
1969
1982
|
var bNeedsPreparation = aMessages.some(function(oMessage){ // check whether there is at least one message which cannot be positioned on a not-table currently
|
|
1970
1983
|
var sId = oTemplateUtils.oCommonUtils.getPositionableControlId(oMessage.controlIds, true);
|
|
@@ -2001,7 +2014,7 @@ sap.ui.define([
|
|
|
2001
2014
|
if (isEmptyObject(aHiddenColumnInfo.columnKeyToHiddenPath)) {
|
|
2002
2015
|
return;
|
|
2003
2016
|
}
|
|
2004
|
-
|
|
2017
|
+
|
|
2005
2018
|
var aHiddenColumns = aHiddenColumnInfo.staticHiddenColumns.slice(); // start with a copy of the list of statically hidden columns
|
|
2006
2019
|
// Now add the dynamically hidden columns if applicable
|
|
2007
2020
|
var fnOnChange = bFirstTimeForContext && fnExecuteDynamicColumnHide.bind(null, false, oSmartTableInfoObject);
|
|
@@ -2078,7 +2091,7 @@ sap.ui.define([
|
|
|
2078
2091
|
oTemplateUtils.oInfoObjectHandler.initializeSubSectionInfoObject(oSubSectionSettings);
|
|
2079
2092
|
}
|
|
2080
2093
|
}
|
|
2081
|
-
|
|
2094
|
+
|
|
2082
2095
|
function onSelectionChange(oEvent){
|
|
2083
2096
|
var oEventSource = oEvent.getSource();
|
|
2084
2097
|
oTemplateUtils.oCommonUtils.setEnabledToolbarButtons(oEventSource);
|
|
@@ -2114,7 +2127,8 @@ sap.ui.define([
|
|
|
2114
2127
|
});
|
|
2115
2128
|
// reset Wait for state
|
|
2116
2129
|
resetWaitForState();
|
|
2117
|
-
|
|
2130
|
+
oState.oInsightsHandler = new InsightsHandler(oState, oController, oTemplateUtils);
|
|
2131
|
+
|
|
2118
2132
|
// Initialize the information objects for SubSections & child aggregations
|
|
2119
2133
|
fnInitializeSubSections();
|
|
2120
2134
|
|
|
@@ -2132,16 +2146,16 @@ sap.ui.define([
|
|
|
2132
2146
|
var oMessageButtonHost = { // Functionality required by the message popover
|
|
2133
2147
|
controller: oController,
|
|
2134
2148
|
getPrepareMessageDisplayPromise: fnPrepareForMessageHandling
|
|
2135
|
-
};
|
|
2149
|
+
};
|
|
2136
2150
|
oBase.onInit(null, oMessageButtonHost);
|
|
2137
2151
|
fnEnsureTitleTransfer();
|
|
2138
2152
|
oTemplateUtils.oCommonUtils.executeGlobalSideEffect();
|
|
2139
|
-
|
|
2153
|
+
|
|
2140
2154
|
oViewProxy.beforeRebind = function (oWaitForPromise) {
|
|
2141
2155
|
// Reset the mSubSectionInitState map as the binding context is changed
|
|
2142
2156
|
mSubSectionsInitState = Object.create(null);
|
|
2143
2157
|
|
|
2144
|
-
|
|
2158
|
+
|
|
2145
2159
|
resetWaitForState();
|
|
2146
2160
|
oWaitForPromise.then(function () {
|
|
2147
2161
|
setWaitForState("bRebindCompleted");
|
|
@@ -2155,7 +2169,7 @@ sap.ui.define([
|
|
|
2155
2169
|
}
|
|
2156
2170
|
oTemplateUtils.oInfoObjectHandler.executeForAllInformationObjects("subSection", function (oInfoObject) {
|
|
2157
2171
|
// Need to access the SubSection early and could not use the general mechanism of
|
|
2158
|
-
// oInfoObject.getControlAsync as this is resolved only after SubSection enters
|
|
2172
|
+
// oInfoObject.getControlAsync as this is resolved only after SubSection enters
|
|
2159
2173
|
// viewport. As the View Lazy Loading could be applied only to children of subsection, subsection
|
|
2160
2174
|
// control should be rendered on view initialization
|
|
2161
2175
|
var oSubSection = oController.byId(oInfoObject.getId());
|
|
@@ -2165,12 +2179,12 @@ sap.ui.define([
|
|
|
2165
2179
|
}
|
|
2166
2180
|
});
|
|
2167
2181
|
};
|
|
2168
|
-
|
|
2182
|
+
|
|
2169
2183
|
oViewProxy.afterRebind = function () {
|
|
2170
2184
|
oLogger.info("Call of _triggerVisibleSubSectionsEvents (afterRebind)");
|
|
2171
2185
|
oObjectPage._triggerVisibleSubSectionsEvents();
|
|
2172
2186
|
};
|
|
2173
|
-
|
|
2187
|
+
|
|
2174
2188
|
// This is the fallback implementation. Note that certain scenarios are already covered in-place (Edit, Save, Cancel)
|
|
2175
2189
|
oViewProxy.setFocus = function(oBeforeData, oAdditionalData){
|
|
2176
2190
|
var aActiveComponentsBefore = oBeforeData.activeComponents;
|
|
@@ -2197,12 +2211,12 @@ sap.ui.define([
|
|
|
2197
2211
|
var oUiModel = oObjectPage.getModel("ui");
|
|
2198
2212
|
var bEditable = oUiModel.getProperty("/editable");
|
|
2199
2213
|
if (bEditable){
|
|
2200
|
-
fnFocusForEdit(true);
|
|
2214
|
+
fnFocusForEdit(true);
|
|
2201
2215
|
} else {
|
|
2202
2216
|
fnFocusOnFirstActionButton();
|
|
2203
2217
|
}
|
|
2204
2218
|
};
|
|
2205
|
-
|
|
2219
|
+
|
|
2206
2220
|
oObjectPage.attachEvent("subSectionEnteredViewPort", function (oEvent) {
|
|
2207
2221
|
var oSubSection = oEvent.getParameter("subSection");
|
|
2208
2222
|
oLogger.info("Viewport entered ", "Subsection: " + oSubSection.getId());
|
|
@@ -2213,12 +2227,18 @@ sap.ui.define([
|
|
|
2213
2227
|
oState.oCreateWithDialogHandler = oCreateWithDialogHandler;
|
|
2214
2228
|
oMultipleViewsHandler = new MultipleViewsHandler(oController, oTemplateUtils, oTemplateUtils.oComponentUtils.stateChanged);
|
|
2215
2229
|
oState.oMultipleViewsHandler = oMultipleViewsHandler;
|
|
2216
|
-
|
|
2230
|
+
|
|
2217
2231
|
oState.oMessageStripHelper = new MessageStripHelper(oMultipleViewsHandler, oController, oTemplateUtils, oBase.state.messageButtonHelper);
|
|
2218
2232
|
oState.oInlineCreationRowsHelper = new InlineCreationRowsHelper(oObjectPage, oTemplateUtils, fnGetSmartTableCreationMode, oController, oState.oMessageStripHelper);
|
|
2219
2233
|
oState.oSectionTitleHandler = new SectionTitleHandler(oController, oObjectPage);
|
|
2220
2234
|
|
|
2221
2235
|
var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
|
|
2236
|
+
|
|
2237
|
+
|
|
2238
|
+
var oCardProviderInstance = oTemplateUtils.oServices.oInsightsFECardProvider && oTemplateUtils.oServices.oInsightsFECardProvider.getCardProviderInsightsInstance();
|
|
2239
|
+
|
|
2240
|
+
oState.oDTCardHelper = new DTCardHelper(oController);
|
|
2241
|
+
|
|
2222
2242
|
oTemplateUtils.oComponentUtils.attach(oController, "PageDataLoaded", function (oEvent) {
|
|
2223
2243
|
var aStreamEnabledAssociatedEntities = oTemplateUtils.oComponentUtils.getParameterModelForTemplating().getObject("/templateSpecific/streamEnabledAssociatedEntites");
|
|
2224
2244
|
if (aStreamEnabledAssociatedEntities && aStreamEnabledAssociatedEntities.length > 0) {
|
|
@@ -2226,10 +2246,17 @@ sap.ui.define([
|
|
|
2226
2246
|
var oStreamData = oTemplateUtils.oCommonUtils.getStreamData(aStreamEnabledAssociatedEntities[i], oEvent.context);
|
|
2227
2247
|
oTemplateUtils.oCommonUtils.setStreamData(oStreamData, aStreamEnabledAssociatedEntities[i]);
|
|
2228
2248
|
}
|
|
2229
|
-
}
|
|
2249
|
+
}
|
|
2230
2250
|
var oStreamDataSelf = oTemplateUtils.oCommonUtils.getStreamData(null, oEvent.context);
|
|
2231
2251
|
oTemplateUtils.oCommonUtils.setStreamData(oStreamDataSelf);
|
|
2232
2252
|
oTemplateUtils.oComponentUtils.hidePlaceholder();
|
|
2253
|
+
|
|
2254
|
+
if (oCardProviderInstance) {
|
|
2255
|
+
oTemplateUtils.oServices.oInsightsFECardProvider.fnRegisterComponentForProvider(oState.oInsightsHandler, oController.getView().getId());
|
|
2256
|
+
oState.oInsightsHandler.getCardsToShare("DT_CARD").then(function (aShareCards) {
|
|
2257
|
+
oCardProviderInstance.onViewUpdate(true, aShareCards);
|
|
2258
|
+
});
|
|
2259
|
+
}
|
|
2233
2260
|
});
|
|
2234
2261
|
var oMenuButton = oController.byId(StableIdHelper.getStableId({
|
|
2235
2262
|
type: "ObjectPageAction",
|
|
@@ -2245,7 +2272,7 @@ sap.ui.define([
|
|
|
2245
2272
|
onEditAndActiveToggle: function () { // Implementation of draft toggle for static header
|
|
2246
2273
|
var oUIModel = oObjectPage.getModel("ui");
|
|
2247
2274
|
var bIsEditable = oUIModel.getProperty("/editable");
|
|
2248
|
-
|
|
2275
|
+
|
|
2249
2276
|
// as the toggling is implemented by two buttons which are made visible/invisible vice versa we have to create the id of the other button which will become visible now
|
|
2250
2277
|
var fnFocusAfterSwitch = function(){
|
|
2251
2278
|
var sOtherButtonId = oController.createId(StableIdHelper.getStableId({
|
|
@@ -2254,15 +2281,15 @@ sap.ui.define([
|
|
|
2254
2281
|
}));
|
|
2255
2282
|
setTimeout(controlHelper.focusControl.bind(null, sOtherButtonId), 0);
|
|
2256
2283
|
};
|
|
2257
|
-
fnSwitchDraftAndActiveImpl(!bIsEditable, fnFocusAfterSwitch);
|
|
2284
|
+
fnSwitchDraftAndActiveImpl(!bIsEditable, fnFocusAfterSwitch);
|
|
2258
2285
|
},
|
|
2259
|
-
|
|
2286
|
+
|
|
2260
2287
|
addEntry: fnAddEntry,
|
|
2261
|
-
|
|
2288
|
+
|
|
2262
2289
|
onCancelCreateWithPopUpDialog: function () {
|
|
2263
2290
|
oCreateWithDialogHandler.onCancelPopUpDialog();
|
|
2264
2291
|
},
|
|
2265
|
-
|
|
2292
|
+
|
|
2266
2293
|
onSaveCreateWithPopUpDialog: function (oEvent) {
|
|
2267
2294
|
oCreateWithDialogHandler.onSavePopUpDialog(oEvent);
|
|
2268
2295
|
},
|
|
@@ -2295,10 +2322,10 @@ sap.ui.define([
|
|
|
2295
2322
|
},
|
|
2296
2323
|
|
|
2297
2324
|
onSelectionChange: onSelectionChange,
|
|
2298
|
-
|
|
2325
|
+
|
|
2299
2326
|
checkUpdateFinished: function (oEvent) {
|
|
2300
|
-
// in case of the table get refreshed through table filter or sort
|
|
2301
|
-
// onDataReceived may not be called
|
|
2327
|
+
// in case of the table get refreshed through table filter or sort
|
|
2328
|
+
// onDataReceived may not be called
|
|
2302
2329
|
oTemplateUtils.oCommonUtils.setEnabledToolbarButtons(oEvent.getSource());
|
|
2303
2330
|
},
|
|
2304
2331
|
// selectionChange for MultiSelectionPlugin
|
|
@@ -2321,7 +2348,7 @@ sap.ui.define([
|
|
|
2321
2348
|
oCancelPromise.then(function () {
|
|
2322
2349
|
if (!bIsDraftEnabled) {
|
|
2323
2350
|
fnReturnToDisplayNonDraft();
|
|
2324
|
-
}
|
|
2351
|
+
}
|
|
2325
2352
|
if (bIsEditFlowDirect){
|
|
2326
2353
|
oViewProxy.navigateUp();
|
|
2327
2354
|
}
|
|
@@ -2460,7 +2487,7 @@ sap.ui.define([
|
|
|
2460
2487
|
// Attach dataReceived event
|
|
2461
2488
|
oEvent.mParameters.bindingParams.events["dataReceived"] = onDataReceivedForTable.bind(null, oSmartTable);
|
|
2462
2489
|
oState.oInlineCreationRowsHelper.onBeforeRebindControl(oEvent);
|
|
2463
|
-
|
|
2490
|
+
|
|
2464
2491
|
// Set data loading text when data is loading
|
|
2465
2492
|
oSmartTable.setNoData(oTemplateUtils.oCommonUtils.getText("WAITING_SMARTTABLE"));
|
|
2466
2493
|
var oBindingParams = adjustAndProvideBindingParamsForSmartTableOrChart(oEvent);
|
|
@@ -2550,13 +2577,17 @@ sap.ui.define([
|
|
|
2550
2577
|
sectionChange: fnSectionChangedEvent,
|
|
2551
2578
|
onSwitchTabs: fnOnSwitchTabs,
|
|
2552
2579
|
uploadStream: function(oEvent) {
|
|
2553
|
-
oTemplateUtils.oCommonEventHandlers.uploadStream(oEvent);
|
|
2580
|
+
oTemplateUtils.oCommonEventHandlers.uploadStream(oEvent);
|
|
2554
2581
|
},
|
|
2555
2582
|
|
|
2556
2583
|
handleUploadComplete: function(oEvent) {
|
|
2557
2584
|
oTemplateUtils.oCommonEventHandlers.handleUploadComplete(oEvent);
|
|
2558
2585
|
},
|
|
2559
2586
|
|
|
2587
|
+
handleTypeMismatch: function(oEvent) {
|
|
2588
|
+
oTemplateUtils.oCommonEventHandlers.handleTypeMismatch(oEvent);
|
|
2589
|
+
},
|
|
2590
|
+
|
|
2560
2591
|
removeStream: function(oEvent) {
|
|
2561
2592
|
oTemplateUtils.oCommonEventHandlers.removeStream(oEvent);
|
|
2562
2593
|
},
|
|
@@ -2597,7 +2628,7 @@ sap.ui.define([
|
|
|
2597
2628
|
var oTable = oSmartTable.getTable();
|
|
2598
2629
|
var oInfoObject = oTemplateUtils.oInfoObjectHandler.setInformationWithControl(oSmartTable);
|
|
2599
2630
|
oState.oSectionTitleHandler.setAsTitleOwner(oSmartTable, true);
|
|
2600
|
-
// TableObserver is required to get the Smart Table's editable property for Smart
|
|
2631
|
+
// TableObserver is required to get the Smart Table's editable property for Smart
|
|
2601
2632
|
// MultiInput Control
|
|
2602
2633
|
var oModel = new ManagedObjectModel(oSmartTable);
|
|
2603
2634
|
oSmartTable.setModel(oModel, "tableobserver");
|
|
@@ -2611,7 +2642,7 @@ sap.ui.define([
|
|
|
2611
2642
|
oTemplateUtils.oCommonUtils.checkToolbarIntentsSupported(oSmartTable);
|
|
2612
2643
|
var bIsMTable = controlHelper.isMTable(oTable);
|
|
2613
2644
|
if (bIsMTable || controlHelper.isUiTable(oTable)) {
|
|
2614
|
-
var sTableId = oTable.getId();
|
|
2645
|
+
var sTableId = oTable.getId();
|
|
2615
2646
|
var fnOnSubSectionVisibilityChanged = function () {
|
|
2616
2647
|
if (bIsMTable && !mTableThresholdInfo[sTableId]) {
|
|
2617
2648
|
mTableThresholdInfo[sTableId] = oTable.getGrowingThreshold && oTable.getGrowingThreshold(); // store the default growingthreshold value of the table
|
|
@@ -2623,7 +2654,7 @@ sap.ui.define([
|
|
|
2623
2654
|
// By the time table is initialized, the subSectionVisibilityChange event may have already been triggered.
|
|
2624
2655
|
// We ensure that the table occupies whole space whenever applicable by calling this method on table init.
|
|
2625
2656
|
// Subsequently, this method is called every time the subsection visibility is changed.
|
|
2626
|
-
fnOnSubSectionVisibilityChanged();
|
|
2657
|
+
fnOnSubSectionVisibilityChanged();
|
|
2627
2658
|
}
|
|
2628
2659
|
if (fnGetSmartTableCreationMode(oSmartTable) === "inline" && !oSmartTable.data("CrossNavigation")) {
|
|
2629
2660
|
oTable.addEventDelegate({
|
|
@@ -2676,7 +2707,7 @@ sap.ui.define([
|
|
|
2676
2707
|
setVMVisibilityForVendor: function () {
|
|
2677
2708
|
var oUriParameters = new URL(window.location.href).searchParams;
|
|
2678
2709
|
var sUiLayer = oUriParameters.get("sap-ui-layer");
|
|
2679
|
-
return sUiLayer && sUiLayer.toUpperCase() === "VENDOR";
|
|
2710
|
+
return !!(sUiLayer && sUiLayer.toUpperCase() === "VENDOR");
|
|
2680
2711
|
},
|
|
2681
2712
|
|
|
2682
2713
|
/*
|
|
@@ -2695,4 +2726,4 @@ sap.ui.define([
|
|
|
2695
2726
|
}
|
|
2696
2727
|
};
|
|
2697
2728
|
return oMethods;
|
|
2698
|
-
});
|
|
2729
|
+
});
|