@openui5/sap.ui.rta 1.113.0 → 1.114.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/THIRDPARTY.txt +1 -1
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +1 -1
- package/src/sap/ui/rta/RuntimeAuthoring.js +157 -53
- package/src/sap/ui/rta/Utils.js +35 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +6 -5
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +4 -2
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +1 -1
- package/src/sap/ui/rta/command/LREPSerializer.js +4 -2
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +1 -1
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +93 -76
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +40 -2
- package/src/sap/ui/rta/messagebundle_ar.properties +12 -4
- package/src/sap/ui/rta/messagebundle_bg.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ca.properties +12 -4
- package/src/sap/ui/rta/messagebundle_cs.properties +12 -4
- package/src/sap/ui/rta/messagebundle_cy.properties +12 -4
- package/src/sap/ui/rta/messagebundle_da.properties +12 -4
- package/src/sap/ui/rta/messagebundle_de.properties +12 -4
- package/src/sap/ui/rta/messagebundle_el.properties +12 -4
- package/src/sap/ui/rta/messagebundle_en.properties +10 -2
- package/src/sap/ui/rta/messagebundle_en_GB.properties +10 -2
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +7 -2
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -2
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +10 -2
- package/src/sap/ui/rta/messagebundle_es.properties +12 -4
- package/src/sap/ui/rta/messagebundle_es_MX.properties +12 -4
- package/src/sap/ui/rta/messagebundle_et.properties +12 -4
- package/src/sap/ui/rta/messagebundle_fi.properties +12 -4
- package/src/sap/ui/rta/messagebundle_fr.properties +12 -4
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +12 -4
- package/src/sap/ui/rta/messagebundle_hi.properties +12 -4
- package/src/sap/ui/rta/messagebundle_hr.properties +12 -4
- package/src/sap/ui/rta/messagebundle_hu.properties +12 -4
- package/src/sap/ui/rta/messagebundle_id.properties +12 -4
- package/src/sap/ui/rta/messagebundle_it.properties +12 -4
- package/src/sap/ui/rta/messagebundle_iw.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ja.properties +16 -8
- package/src/sap/ui/rta/messagebundle_kk.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ko.properties +16 -8
- package/src/sap/ui/rta/messagebundle_lt.properties +12 -4
- package/src/sap/ui/rta/messagebundle_lv.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ms.properties +16 -8
- package/src/sap/ui/rta/messagebundle_nl.properties +12 -4
- package/src/sap/ui/rta/messagebundle_no.properties +12 -4
- package/src/sap/ui/rta/messagebundle_pl.properties +12 -4
- package/src/sap/ui/rta/messagebundle_pt.properties +12 -4
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ro.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ru.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sh.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sk.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sl.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sv.properties +12 -4
- package/src/sap/ui/rta/messagebundle_th.properties +12 -4
- package/src/sap/ui/rta/messagebundle_tr.properties +12 -4
- package/src/sap/ui/rta/messagebundle_uk.properties +12 -4
- package/src/sap/ui/rta/messagebundle_vi.properties +12 -4
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +12 -4
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +12 -4
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/CompVariant.js +6 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +4 -2
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
- package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
- package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
- package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
- package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +1 -1
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +1 -1
- package/src/sap/ui/rta/plugin/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
- package/src/sap/ui/rta/plugin/Resize.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +11 -24
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +17 -13
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -1
- package/src/sap/ui/rta/service/Action.js +1 -1
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- package/src/sap/ui/rta/service/Outline.js +4 -1
- package/src/sap/ui/rta/service/Property.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/service/SupportTools.js +1 -1
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +59 -20
- package/src/sap/ui/rta/toolbar/Adaptation.js +161 -12
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +24 -0
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +68 -37
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +5 -23
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +121 -35
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +12 -10
- package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +1 -1
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ReloadManager.js +32 -21
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +15 -6
- package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +16 -9
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
hAlign="Left">
|
|
49
49
|
<Text text="{i18n>CLM_HEADER_ADAPTATIONS_TITLE}" />
|
|
50
50
|
</Column>
|
|
51
|
-
<Column width="
|
|
51
|
+
<Column width="6rem"
|
|
52
52
|
minScreenWidth="tablet"
|
|
53
53
|
demandPopin="true"
|
|
54
54
|
popinDisplay="Inline"
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
hAlign="Left">
|
|
68
68
|
<Text text="{i18n>CLM_HEADER_ADAPTATIONS_CHANGED_ON}" />
|
|
69
69
|
</Column>
|
|
70
|
+
<!--
|
|
70
71
|
<Column width="7rem"
|
|
71
72
|
minScreenWidth="tablet"
|
|
72
73
|
demandPopin="true"
|
|
@@ -74,6 +75,7 @@
|
|
|
74
75
|
hAlign="Left">
|
|
75
76
|
<Text text="{i18n>CLM_HEADER_ADAPTATIONS_ACTIONS}" />
|
|
76
77
|
</Column>
|
|
78
|
+
-->
|
|
77
79
|
</columns>
|
|
78
80
|
<dragDropConfig>
|
|
79
81
|
<dnd:DragDropInfo sourceAggregation="items"
|
|
@@ -85,24 +87,12 @@
|
|
|
85
87
|
<ColumnListItem>
|
|
86
88
|
<cells>
|
|
87
89
|
<Text text="{contextBased>rank}"/>
|
|
88
|
-
<CustomListItem>
|
|
89
|
-
<HBox>
|
|
90
|
-
<VBox class="sapUiSmallMarginTopBottom">
|
|
91
90
|
<Text wrapping="false" maxLines="1" text="{contextBased>title}"
|
|
92
91
|
tooltip="{contextBased>title}"/>
|
|
93
|
-
</VBox>
|
|
94
|
-
</HBox>
|
|
95
|
-
</CustomListItem>
|
|
96
92
|
<Text text="{ parts: ['contextBased>contexts/role'], formatter: '.formatContextColumnCell'}"
|
|
97
93
|
tooltip="{ parts: ['contextBased>contexts/role'], formatter: '.formatContextColumnTooltip'}" />
|
|
98
94
|
<Text text="{ parts: ['contextBased>createdBy', 'contextBased>createdAt'], formatter: '.formatCreatedChangedOnColumnCell'}"/>
|
|
99
|
-
<Text text="{ parts: ['contextBased>changedBy', 'contextBased>changedAt'], formatter: '.formatCreatedChangedOnColumnCell'}"/>
|
|
100
|
-
<MenuButton text="{i18n>CLM_HEADER_ADAPTATIONS_ACTIONS}">
|
|
101
|
-
<menu>
|
|
102
|
-
<Menu itemSelected="onMenuAction">
|
|
103
|
-
</Menu>
|
|
104
|
-
</menu>
|
|
105
|
-
</MenuButton>
|
|
95
|
+
<Text text="{ parts: ['contextBased>changedBy', 'contextBased>changedAt'], formatter: '.formatCreatedChangedOnColumnCell'}"/>
|
|
106
96
|
</cells>
|
|
107
97
|
</ColumnListItem>
|
|
108
98
|
</items>
|
|
@@ -126,12 +116,6 @@
|
|
|
126
116
|
popinDisplay="Inline"
|
|
127
117
|
hAlign="Left">
|
|
128
118
|
</Column>
|
|
129
|
-
<Column width="7rem"
|
|
130
|
-
minScreenWidth="tablet"
|
|
131
|
-
demandPopin="true"
|
|
132
|
-
popinDisplay="Inline"
|
|
133
|
-
hAlign="Left">
|
|
134
|
-
</Column>
|
|
135
119
|
</columns>
|
|
136
120
|
<items>
|
|
137
121
|
<ColumnListItem highlight="Information">
|
|
@@ -146,8 +130,6 @@
|
|
|
146
130
|
</HBox>
|
|
147
131
|
</CustomListItem>
|
|
148
132
|
<Text text="" />
|
|
149
|
-
<MenuButton text="{i18n>CLM_HEADER_ADAPTATIONS_ACTIONS}">
|
|
150
|
-
</MenuButton>
|
|
151
133
|
</cells>
|
|
152
134
|
</ColumnListItem>
|
|
153
135
|
</items>
|
|
@@ -163,7 +145,7 @@
|
|
|
163
145
|
<endButton>
|
|
164
146
|
<Button id="manageAdaptations-closeButton"
|
|
165
147
|
text="{i18n>APP_CTX_DIALOG_CANCEL}"
|
|
166
|
-
press=".
|
|
148
|
+
press=".onCancel"/>
|
|
167
149
|
</endButton>
|
|
168
150
|
</Dialog>
|
|
169
151
|
</core:FragmentDefinition>
|
|
@@ -8,25 +8,25 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/base/ManagedObject",
|
|
9
9
|
"sap/base/Log",
|
|
10
10
|
"sap/base/strings/formatMessage",
|
|
11
|
+
"sap/ui/core/BusyIndicator",
|
|
11
12
|
"sap/ui/core/Fragment",
|
|
12
13
|
"sap/ui/core/library",
|
|
13
14
|
"sap/ui/fl/Layer",
|
|
14
15
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
15
16
|
"sap/ui/fl/write/api/ContextSharingAPI",
|
|
16
17
|
"sap/ui/rta/Utils",
|
|
17
|
-
"sap/ui/model/Binding",
|
|
18
18
|
"sap/ui/model/json/JSONModel"
|
|
19
19
|
], function(
|
|
20
20
|
ManagedObject,
|
|
21
21
|
Log,
|
|
22
22
|
formatMessage,
|
|
23
|
+
BusyIndicator,
|
|
23
24
|
Fragment,
|
|
24
25
|
coreLibrary,
|
|
25
26
|
Layer,
|
|
26
27
|
ContextBasedAdaptationsAPI,
|
|
27
28
|
ContextSharingAPI,
|
|
28
29
|
Utils,
|
|
29
|
-
Binding,
|
|
30
30
|
JSONModel
|
|
31
31
|
) {
|
|
32
32
|
"use strict";
|
|
@@ -41,7 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
* @class
|
|
42
42
|
*
|
|
43
43
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
44
|
+
* @version 1.114.1
|
|
45
45
|
*
|
|
46
46
|
* @constructor
|
|
47
47
|
* @private
|
|
@@ -62,7 +62,8 @@ sap.ui.define([
|
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
SaveAsAdaptation.prototype.openAddAdaptationDialog = function(sLayer) {
|
|
65
|
+
SaveAsAdaptation.prototype.openAddAdaptationDialog = function(sLayer, bIsEditMode) {
|
|
66
|
+
this._bIsEditMode = bIsEditMode;
|
|
66
67
|
if (!this._oAddAdaptationDialogPromise) {
|
|
67
68
|
this._oAddAdaptationDialogPromise = Fragment.load({
|
|
68
69
|
name: "sap.ui.rta.toolbar.contextBased.SaveAsAdaptationDialog",
|
|
@@ -78,15 +79,25 @@ sap.ui.define([
|
|
|
78
79
|
this._oAddAdaptationDialog.attachBeforeClose(clearComponent.bind(this));
|
|
79
80
|
oDialog.addStyleClass(Utils.getRtaStyleClassName());
|
|
80
81
|
this.getToolbar().addDependent(this._oAddAdaptationDialog);
|
|
82
|
+
this.oDialogModel = new JSONModel();
|
|
83
|
+
this._oAddAdaptationDialog.setModel(this.oDialogModel, "dialogModel");
|
|
81
84
|
}.bind(this));
|
|
82
85
|
} else {
|
|
83
|
-
this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input")
|
|
86
|
+
var oInputField = this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input");
|
|
87
|
+
oInputField.setValue("");
|
|
88
|
+
oInputField.setValueState(ValueState.None);
|
|
84
89
|
}
|
|
85
90
|
return this._oAddAdaptationDialogPromise.then(function() {
|
|
86
91
|
return createContextSharingComponent.call(this, sLayer);
|
|
87
92
|
}.bind(this)).then(function() {
|
|
88
93
|
var oRtaInformation = this.getToolbar().getRtaInformation();
|
|
89
94
|
this.oAdaptationsModel = ContextBasedAdaptationsAPI.getAdaptationsModel({ control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer });
|
|
95
|
+
if (bIsEditMode) {
|
|
96
|
+
enableEditMode.call(this);
|
|
97
|
+
} else {
|
|
98
|
+
this.oDialogModel.setProperty("/title", this.oTextResources.getText("SAC_DIALOG_HEADER"));
|
|
99
|
+
this.oDialogModel.refresh(true);
|
|
100
|
+
}
|
|
90
101
|
return openDialog.call(this);
|
|
91
102
|
}.bind(this));
|
|
92
103
|
};
|
|
@@ -97,24 +108,49 @@ sap.ui.define([
|
|
|
97
108
|
return this._oAddAdaptationDialog.open();
|
|
98
109
|
}
|
|
99
110
|
|
|
111
|
+
// ------ enables dialog for editing -----
|
|
112
|
+
function enableEditMode() {
|
|
113
|
+
this.oDialogModel.setProperty("/title", this.oTextResources.getText("EAC_DIALOG_HEADER"));
|
|
114
|
+
this.oDialogModel.refresh(true);
|
|
115
|
+
var oDisplayedAdaptation = this.oAdaptationsModel.getProperty("/displayedAdaptation");
|
|
116
|
+
this._mEditProperties = {
|
|
117
|
+
adaptationId: oDisplayedAdaptation.id,
|
|
118
|
+
title: oDisplayedAdaptation.title,
|
|
119
|
+
priority: oDisplayedAdaptation.rank - 1,
|
|
120
|
+
roles: oDisplayedAdaptation.contexts.role
|
|
121
|
+
};
|
|
122
|
+
this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input").setValue(this._mEditProperties.title);
|
|
123
|
+
this._oContextComponentInstance.setSelectedContexts({role: this._mEditProperties.roles});
|
|
124
|
+
}
|
|
125
|
+
|
|
100
126
|
// ------ formatting ------
|
|
101
127
|
function formatPriorityText(aAdaptations) {
|
|
102
|
-
var aItems = [{ key: 0, title: this.oTextResources.getText("TXT_SELECT_FIRST_PRIO") }];
|
|
128
|
+
var aItems = [{ key: "0", title: this.oTextResources.getText("TXT_SELECT_FIRST_PRIO") }];
|
|
103
129
|
var sPriorityTextTemplate = this.oTextResources.getText("TXT_SELECT_PRIO");
|
|
130
|
+
var iCurrentPriority = this._mEditProperties ? this._mEditProperties.priority : undefined;
|
|
131
|
+
// create the data for the priority selection model
|
|
132
|
+
// selected is the currently or by default selected priority
|
|
133
|
+
// priority is the array with all available priorities together with the displayed text defined in text template
|
|
104
134
|
aAdaptations.forEach(function(oAdaptation, iIndex) {
|
|
135
|
+
if (iCurrentPriority !== undefined && iCurrentPriority === iIndex) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
var iKey = aItems.length;
|
|
105
139
|
aItems.push({
|
|
106
|
-
key:
|
|
107
|
-
title: formatMessage(sPriorityTextTemplate, [oAdaptation.title,
|
|
140
|
+
key: iKey.toString(),
|
|
141
|
+
title: formatMessage(sPriorityTextTemplate, [oAdaptation.title, iKey + 1])
|
|
108
142
|
});
|
|
109
143
|
});
|
|
110
|
-
this.
|
|
111
|
-
|
|
112
|
-
priority: aItems
|
|
113
|
-
});
|
|
114
|
-
this._oAddAdaptationDialog.setModel(this.oPrioritySelectionModel, "prioritySelectionModel");
|
|
144
|
+
this.oDialogModel.setProperty("/selected", iCurrentPriority ? aItems[iCurrentPriority].key : aItems[0].key);
|
|
145
|
+
this.oDialogModel.setProperty("/priority", aItems);
|
|
115
146
|
}
|
|
116
147
|
|
|
117
148
|
function onAdaptationTitleChange() {
|
|
149
|
+
checkAdaptationsNameConstraints.call(this);
|
|
150
|
+
enableSaveAsButton.call(this);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function onContextRoleChange() {
|
|
118
154
|
enableSaveAsButton.call(this);
|
|
119
155
|
}
|
|
120
156
|
|
|
@@ -128,25 +164,52 @@ sap.ui.define([
|
|
|
128
164
|
oContextBasedAdaptation.contexts = this._oContextComponentInstance.getSelectedContexts();
|
|
129
165
|
oContextBasedAdaptation.priority = getAdaptationPriority.call(this);
|
|
130
166
|
var oRtaInformation = this.getToolbar().getRtaInformation();
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
167
|
+
if (this._bIsEditMode) {
|
|
168
|
+
oContextBasedAdaptation.adaptationId = this._mEditProperties.adaptationId;
|
|
169
|
+
ContextBasedAdaptationsAPI.update({
|
|
170
|
+
control: oRtaInformation.rootControl,
|
|
171
|
+
layer: oRtaInformation.flexSettings.layer,
|
|
172
|
+
contextBasedAdaptation: oContextBasedAdaptation,
|
|
173
|
+
adaptationId: this._mEditProperties.adaptationId
|
|
174
|
+
})
|
|
175
|
+
.then(function(oContextBasedAdaptation, oResponse) {
|
|
176
|
+
if (oResponse.status === 200) {
|
|
177
|
+
this.oAdaptationsModel.updateAdaptationContent(oContextBasedAdaptation);
|
|
178
|
+
}
|
|
179
|
+
}.bind(this, oContextBasedAdaptation))
|
|
180
|
+
.catch(function(oError) {
|
|
181
|
+
Log.error(oError.stack);
|
|
182
|
+
var sMessage = "MSG_LREP_TRANSFER_ERROR";
|
|
183
|
+
var oOptions = { titleKey: "EAC_DIALOG_HEADER" };
|
|
184
|
+
oOptions.details = oError.userMessage;
|
|
185
|
+
Utils.showMessageBox("error", sMessage, oOptions);
|
|
186
|
+
});
|
|
187
|
+
} else {
|
|
188
|
+
BusyIndicator.show();
|
|
189
|
+
ContextBasedAdaptationsAPI.create({
|
|
190
|
+
control: oRtaInformation.rootControl,
|
|
191
|
+
layer: oRtaInformation.flexSettings.layer,
|
|
192
|
+
contextBasedAdaptation: oContextBasedAdaptation
|
|
193
|
+
}).then(function() {
|
|
194
|
+
BusyIndicator.hide();
|
|
195
|
+
this.getToolbar().fireEvent("switchAdaptation", {adaptationId: oContextBasedAdaptation.id, trigger: "SaveAs"});
|
|
196
|
+
}.bind(this)).catch(function(oError) {
|
|
197
|
+
BusyIndicator.hide();
|
|
198
|
+
Log.error(oError.stack);
|
|
199
|
+
var sMessage = "MSG_LREP_TRANSFER_ERROR";
|
|
200
|
+
var oOptions = { titleKey: "SAC_DIALOG_HEADER" };
|
|
201
|
+
oOptions.details = oError.userMessage;
|
|
202
|
+
Utils.showMessageBox("error", sMessage, oOptions);
|
|
203
|
+
});
|
|
204
|
+
}
|
|
142
205
|
this._oAddAdaptationDialog.close();
|
|
143
206
|
}
|
|
144
207
|
|
|
145
208
|
function onPriorityChange(oEvent) {
|
|
209
|
+
enableSaveAsButton.call(this);
|
|
146
210
|
this.sPriority = oEvent.getParameters().selectedItem.getProperty("key");
|
|
147
211
|
}
|
|
148
212
|
|
|
149
|
-
|
|
150
213
|
function checkAdaptationsNameConstraints() {
|
|
151
214
|
// check for empty adaptations title
|
|
152
215
|
if (this._oAddAdaptationDialog && this._oAddAdaptationDialog.isOpen()) {
|
|
@@ -165,10 +228,14 @@ sap.ui.define([
|
|
|
165
228
|
// check for duplicates
|
|
166
229
|
var iIndexOfDuplicate = this.oAdaptationsModel.getProperty("/adaptations").findIndex(function(adaptation) {
|
|
167
230
|
if (adaptation.title.trim().toLowerCase() === oInputField.getValue().trim().toLowerCase()) {
|
|
231
|
+
// allow matching in case of edit mode with already used title
|
|
232
|
+
if (this._mEditProperties && this._mEditProperties.title.toLowerCase() === oInputField.getValue().toLowerCase()) {
|
|
233
|
+
return false;
|
|
234
|
+
}
|
|
168
235
|
return true;
|
|
169
236
|
}
|
|
170
237
|
return false;
|
|
171
|
-
});
|
|
238
|
+
}.bind(this));
|
|
172
239
|
if (iIndexOfDuplicate > -1) {
|
|
173
240
|
oInputField.setValueState(ValueState.Error);
|
|
174
241
|
oInputField.setValueStateText(this.oTextResources.getText("TXT_CTX_ERROR_DUPLICATE_TITLE"));
|
|
@@ -187,9 +254,10 @@ sap.ui.define([
|
|
|
187
254
|
this._oContextComponentInstance = oContextSharingComponent.getComponentInstance();
|
|
188
255
|
this._oContextComponentInstance.resetSelectedContexts();
|
|
189
256
|
this._oAddAdaptationDialog.addContent(this._oContextComponent);
|
|
190
|
-
var
|
|
191
|
-
|
|
192
|
-
|
|
257
|
+
var oContextsList = sap.ui.getCore().byId("contextSharing---ContextVisibility--selectedContextsList");
|
|
258
|
+
oContextsList.attachUpdateFinished(onContextRoleChange.bind(this));
|
|
259
|
+
oContextsList.getHeaderToolbar().getContent()[0].setRequired(true);
|
|
260
|
+
this._oContextComponentInstance.setEmptyListTextWithAdvice();
|
|
193
261
|
this._oContextComponentInstance.showMessageStrip(false);
|
|
194
262
|
}.bind(this));
|
|
195
263
|
}
|
|
@@ -200,21 +268,39 @@ sap.ui.define([
|
|
|
200
268
|
}
|
|
201
269
|
|
|
202
270
|
function getAdaptationPriority() {
|
|
271
|
+
if (this._bIsEditMode && !this.sPriority) {
|
|
272
|
+
this.sPriority = this.oDialogModel.getProperty("/selected");
|
|
273
|
+
}
|
|
203
274
|
return Number(this.sPriority) || 0;
|
|
204
275
|
}
|
|
205
276
|
|
|
206
277
|
function enableSaveAsButton() {
|
|
207
|
-
checkAdaptationsNameConstraints.call(this);
|
|
208
278
|
var oInputField = this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input");
|
|
209
|
-
var bEnable
|
|
279
|
+
var bEnable;
|
|
280
|
+
var bRolesSelectedAndValidTitle = this._oContextComponentInstance.getSelectedContexts().role.length > 0
|
|
281
|
+
&& oInputField.getValueState() === ValueState.None
|
|
282
|
+
&& oInputField.getValue().length > 0;
|
|
283
|
+
if (this._bIsEditMode && this._mEditProperties && this.oDialogModel) {
|
|
284
|
+
bEnable = bRolesSelectedAndValidTitle
|
|
285
|
+
// check that some of the properties title, priority, roles have been changed
|
|
286
|
+
&& (oInputField.getValue() !== this._mEditProperties.title
|
|
287
|
+
|| this.oDialogModel.getProperty("/selected") !== (this._mEditProperties.priority).toString()
|
|
288
|
+
|| this._oContextComponentInstance.getSelectedContexts().role.length !== this._mEditProperties.roles.length
|
|
289
|
+
|| !this._oContextComponentInstance.getSelectedContexts().role.every(function(sRole) {
|
|
290
|
+
return this._mEditProperties.roles.indexOf(sRole) > -1;
|
|
291
|
+
}.bind(this)));
|
|
292
|
+
} else {
|
|
293
|
+
bEnable = bRolesSelectedAndValidTitle;
|
|
294
|
+
}
|
|
210
295
|
this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-saveButton").setEnabled(bEnable);
|
|
211
296
|
}
|
|
212
297
|
|
|
213
298
|
function clearComponent() {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
299
|
+
this._mEditProperties = undefined;
|
|
300
|
+
this._oAddAdaptationDialog.removeContent(this._oContextComponent);
|
|
301
|
+
this._oContextComponentInstance.destroy();
|
|
302
|
+
this._oContextComponent.destroy();
|
|
218
303
|
}
|
|
304
|
+
|
|
219
305
|
return SaveAsAdaptation;
|
|
220
306
|
});
|
|
@@ -5,14 +5,16 @@
|
|
|
5
5
|
<Dialog id="selectContextsDialog"
|
|
6
6
|
resizable="true"
|
|
7
7
|
draggable="true"
|
|
8
|
-
title="{
|
|
8
|
+
title="{dialogModel>/title}">
|
|
9
9
|
<Panel id="saveAdaptation-information-panel">
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
<headerToolbar>
|
|
11
|
+
<Toolbar id="toolbar">
|
|
12
|
+
<Label id="label"
|
|
13
|
+
text="Information"
|
|
14
|
+
design="Bold">
|
|
15
|
+
</Label>
|
|
16
|
+
</Toolbar>
|
|
17
|
+
</headerToolbar>
|
|
16
18
|
<form:Form id="saveAdaptation-form"
|
|
17
19
|
editable="true">
|
|
18
20
|
<form:layout>
|
|
@@ -58,10 +60,10 @@
|
|
|
58
60
|
<Select
|
|
59
61
|
id="saveAdaptation-rank-select"
|
|
60
62
|
forceSelection="true"
|
|
61
|
-
selectedKey="{
|
|
62
|
-
items="{
|
|
63
|
+
selectedKey="{dialogModel>/selected}"
|
|
64
|
+
items="{dialogModel>/priority}"
|
|
63
65
|
change=".onPriorityChange">
|
|
64
|
-
<core:Item key="{
|
|
66
|
+
<core:Item key="{dialogModel>key}" text="{dialogModel>title}" />
|
|
65
67
|
</Select>
|
|
66
68
|
</form:FormElement>
|
|
67
69
|
</form:formElements>
|
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @namespace sap.ui.rta.util.ReloadManager
|
|
31
31
|
* @alias sap.ui.rta.util.ReloadManager
|
|
32
32
|
* @since 1.104
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.114.1
|
|
34
34
|
* @private
|
|
35
35
|
* @ui5-restricted
|
|
36
36
|
*/
|
|
@@ -77,7 +77,7 @@ sap.ui.define([
|
|
|
77
77
|
sReason = "MSG_DRAFT_EXISTS";
|
|
78
78
|
} else if (oReloadInfo.allContexts) {
|
|
79
79
|
sReason = "MSG_RESTRICTED_CONTEXT_EXIST";
|
|
80
|
-
}
|
|
80
|
+
}// TODO add app descr changes case for start?
|
|
81
81
|
return sReason;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -94,6 +94,9 @@ sap.ui.define([
|
|
|
94
94
|
if (oReloadInfo.allContexts) {
|
|
95
95
|
return "MSG_RELOAD_WITH_PERSONALIZATION_AND_RESTRICTED_CONTEXT";
|
|
96
96
|
}
|
|
97
|
+
if (oReloadInfo.switchEndUserAdaptation) {
|
|
98
|
+
return "MSG_RELOAD_WITH_PERSONALIZATION_AND_CONTEXT_BASED_ADAPTATION";
|
|
99
|
+
}
|
|
97
100
|
return "MSG_RELOAD_WITH_PERSONALIZATION_AND_VIEWS";
|
|
98
101
|
}
|
|
99
102
|
|
|
@@ -112,6 +115,10 @@ sap.ui.define([
|
|
|
112
115
|
if (oReloadInfo.allContexts) {
|
|
113
116
|
return "MSG_RELOAD_WITHOUT_ALL_CONTEXT";
|
|
114
117
|
}
|
|
118
|
+
|
|
119
|
+
if (oReloadInfo.switchEndUserAdaptation) {
|
|
120
|
+
return "MSG_RELOAD_OTHER_CONTEXT_BASED_ADAPTATION";
|
|
121
|
+
}
|
|
115
122
|
return undefined;
|
|
116
123
|
}
|
|
117
124
|
|
|
@@ -127,31 +134,34 @@ sap.ui.define([
|
|
|
127
134
|
}
|
|
128
135
|
|
|
129
136
|
function triggerReloadOnStart(oReloadInfo, bVersioningEnabled, bDeveloperMode) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
137
|
+
return Promise.resolve().then(function() {
|
|
138
|
+
if (mUShellServices.CrossApplicationNavigation && bVersioningEnabled) {
|
|
139
|
+
// clears FlexState and triggers reloading of the flex data without blocking
|
|
140
|
+
if (oReloadInfo.isDraftAvailable) {
|
|
141
|
+
return VersionsAPI.loadDraftForApplication({
|
|
142
|
+
control: oReloadInfo.selector,
|
|
143
|
+
layer: oReloadInfo.layer,
|
|
144
|
+
allContexts: oReloadInfo.allContexts,
|
|
145
|
+
adaptationId: oReloadInfo.adaptationId
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
return VersionsAPI.loadVersionForApplication({
|
|
134
149
|
control: oReloadInfo.selector,
|
|
135
150
|
layer: oReloadInfo.layer,
|
|
136
|
-
allContexts: oReloadInfo.allContexts
|
|
137
|
-
|
|
138
|
-
} else {
|
|
139
|
-
VersionsAPI.loadVersionForApplication({
|
|
140
|
-
control: oReloadInfo.selector,
|
|
141
|
-
layer: oReloadInfo.layer,
|
|
142
|
-
allContexts: oReloadInfo.allContexts
|
|
151
|
+
allContexts: oReloadInfo.allContexts,
|
|
152
|
+
adaptationId: oReloadInfo.adaptationId
|
|
143
153
|
});
|
|
144
154
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
155
|
+
return undefined;
|
|
156
|
+
}).then(function() {
|
|
157
|
+
var sReason = getReloadMessageOnStart(oReloadInfo);
|
|
158
|
+
// showing messages in visual editor is leading to blocked screen. In this case we should reload without message
|
|
159
|
+
return bDeveloperMode ? undefined : Utils.showMessageBox("information", sReason);
|
|
160
|
+
}).then(function() {
|
|
150
161
|
ReloadManager.enableAutomaticStart(oReloadInfo.layer, oReloadInfo.selector);
|
|
151
162
|
oReloadInfo.onStart = true;
|
|
152
163
|
return ReloadManager.triggerReload(oReloadInfo);
|
|
153
|
-
})
|
|
154
|
-
.then(function() {
|
|
164
|
+
}).then(function() {
|
|
155
165
|
return true;
|
|
156
166
|
});
|
|
157
167
|
}
|
|
@@ -268,6 +278,7 @@ sap.ui.define([
|
|
|
268
278
|
* @param {sap.ui.fl.Selector} mProperties.selector - Root control
|
|
269
279
|
* @param {boolean} mProperties.versioningEnabled - Whether versioning is enabled
|
|
270
280
|
* @param {boolean} mProperties.developerMode - Whether the developer mode is set
|
|
281
|
+
* @param {string} mProperties.adaptationId - Context-based adaptation ID of the currently displayed adaptation
|
|
271
282
|
*
|
|
272
283
|
* @return {Promise<boolean>} Resolving to <code>false</code> means that reload is not necessary
|
|
273
284
|
*/
|
|
@@ -280,7 +291,7 @@ sap.ui.define([
|
|
|
280
291
|
URLParsingService: mUShellServices.URLParsing
|
|
281
292
|
});
|
|
282
293
|
return ReloadInfoAPI.getReloadReasonsForStart(mProperties).then(function(oReloadInfo) {
|
|
283
|
-
if (oReloadInfo.hasHigherLayerChanges || oReloadInfo.isDraftAvailable || oReloadInfo.allContexts) {
|
|
294
|
+
if (oReloadInfo.hasHigherLayerChanges || oReloadInfo.isDraftAvailable || oReloadInfo.allContexts || oReloadInfo.switchAdaptation) {
|
|
284
295
|
return triggerReloadOnStart(oReloadInfo, mProperties.versioningEnabled, mProperties.developerMode);
|
|
285
296
|
}
|
|
286
297
|
return undefined;
|
|
@@ -40,7 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
|
|
41
41
|
* @author SAP SE
|
|
42
42
|
* @since 1.84.0
|
|
43
|
-
* @version 1.
|
|
43
|
+
* @version 1.114.1
|
|
44
44
|
* @private
|
|
45
45
|
*/
|
|
46
46
|
var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
|
|
@@ -203,7 +203,6 @@ sap.ui.define([
|
|
|
203
203
|
sDescriptionText = oDescription.descriptionText;
|
|
204
204
|
sDescriptionTooltip = oDescription.descriptionTooltip || "";
|
|
205
205
|
} else {
|
|
206
|
-
sElementLabel = sElementLabel && "'" + sElementLabel + "'";
|
|
207
206
|
var sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
|
|
208
207
|
var sChangeTextKey = (
|
|
209
208
|
"TXT_CHANGEVISUALIZATION_CHANGE_"
|
package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
showHeader="false"
|
|
7
7
|
placement="Bottom"
|
|
8
8
|
id="popover">
|
|
9
|
-
<SegmentedButton selectedKey="
|
|
9
|
+
<SegmentedButton selectedKey="{visualizationModel>/changeState}" width="420px" selectionChange=".onVersioningCategoryChange">
|
|
10
10
|
<items>
|
|
11
11
|
<SegmentedButtonItem
|
|
12
12
|
text="{i18n>BUT_CHANGEVISUALIZATION_VERSIONING_ALL}"
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
|
|
40
40
|
* @author SAP SE
|
|
41
41
|
* @since 1.86.0
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.114.1
|
|
43
43
|
* @private
|
|
44
44
|
*/
|
|
45
45
|
var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
|
|
@@ -211,7 +211,7 @@ sap.ui.define([
|
|
|
211
211
|
} else if (aDraftChangesList && aDraftChangesList.includes(oChange.getId())) {
|
|
212
212
|
aChangeStates = [ChangeStates.DRAFT];
|
|
213
213
|
} else {
|
|
214
|
-
aChangeStates = [ChangeStates.
|
|
214
|
+
aChangeStates = [ChangeStates.ALL];
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
this._oRegisteredChanges[oChange.getId()] = {
|
|
@@ -242,12 +242,17 @@ sap.ui.define([
|
|
|
242
242
|
return getInfoFromChangeHandler(oAppComponent, oChange)
|
|
243
243
|
.then(function(oInfoFromChangeHandler) {
|
|
244
244
|
var mVisualizationInfo = oInfoFromChangeHandler || {};
|
|
245
|
-
var
|
|
245
|
+
var aChangeSelectors = oChange.getSelector && oChange.getSelector() && [oChange.getSelector()];
|
|
246
|
+
var aAffectedElementSelectors = mVisualizationInfo.affectedControls || aChangeSelectors || [];
|
|
247
|
+
// If there is an original selector (e.g. control is inside a template),
|
|
248
|
+
// the indicator should be displayed on the host control (change selector)
|
|
249
|
+
var oChangeOriginalSelector = oChange.getOriginalSelector && oChange.getOriginalSelector();
|
|
250
|
+
var aDisplayElementSelectors = oChangeOriginalSelector ? aChangeSelectors : aAffectedElementSelectors;
|
|
246
251
|
|
|
247
252
|
return {
|
|
248
|
-
affectedElementIds:
|
|
253
|
+
affectedElementIds: getSelectorIds(aAffectedElementSelectors),
|
|
249
254
|
dependentElementIds: getSelectorIds(mVisualizationInfo.dependentControls) || [],
|
|
250
|
-
displayElementIds: getSelectorIds(mVisualizationInfo.displayControls
|
|
255
|
+
displayElementIds: getSelectorIds(mVisualizationInfo.displayControls || getSelectorIds(aDisplayElementSelectors)),
|
|
251
256
|
updateRequired: mVisualizationInfo.updateRequired,
|
|
252
257
|
descriptionPayload: mVisualizationInfo.descriptionPayload || {}
|
|
253
258
|
};
|
|
@@ -255,7 +260,11 @@ sap.ui.define([
|
|
|
255
260
|
}
|
|
256
261
|
|
|
257
262
|
function getInfoFromChangeHandler(oAppComponent, oChange) {
|
|
258
|
-
var
|
|
263
|
+
var oSelector = oChange.getOriginalSelector && oChange.getOriginalSelector();
|
|
264
|
+
if (!oSelector) {
|
|
265
|
+
oSelector = oChange.getSelector && oChange.getSelector();
|
|
266
|
+
}
|
|
267
|
+
var oControl = JsControlTreeModifier.bySelector(oSelector, oAppComponent);
|
|
259
268
|
if (oControl) {
|
|
260
269
|
return ChangesWriteAPI.getChangeHandler({
|
|
261
270
|
changeType: oChange.getChangeType(),
|