@openui5/sap.ui.rta 1.106.0 → 1.107.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 +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 +641 -654
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +2 -0
- 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 +6 -5
- 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 +1 -1
- 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 +2 -2
- package/src/sap/ui/rta/command/LREPSerializer.js +3 -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 +12 -3
- 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 +4 -4
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle_ar.properties +6 -1
- package/src/sap/ui/rta/messagebundle_bg.properties +6 -1
- package/src/sap/ui/rta/messagebundle_ca.properties +6 -1
- package/src/sap/ui/rta/messagebundle_cs.properties +6 -1
- package/src/sap/ui/rta/messagebundle_cy.properties +6 -1
- package/src/sap/ui/rta/messagebundle_da.properties +6 -1
- package/src/sap/ui/rta/messagebundle_de.properties +18 -13
- package/src/sap/ui/rta/messagebundle_el.properties +6 -1
- package/src/sap/ui/rta/messagebundle_en.properties +6 -1
- package/src/sap/ui/rta/messagebundle_en_GB.properties +6 -1
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +5 -0
- package/src/sap/ui/rta/messagebundle_es.properties +6 -1
- package/src/sap/ui/rta/messagebundle_es_MX.properties +6 -1
- package/src/sap/ui/rta/messagebundle_et.properties +6 -1
- package/src/sap/ui/rta/messagebundle_fi.properties +6 -1
- package/src/sap/ui/rta/messagebundle_fr.properties +6 -1
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +6 -1
- package/src/sap/ui/rta/messagebundle_hi.properties +6 -1
- package/src/sap/ui/rta/messagebundle_hr.properties +6 -1
- package/src/sap/ui/rta/messagebundle_hu.properties +6 -1
- package/src/sap/ui/rta/messagebundle_id.properties +6 -1
- package/src/sap/ui/rta/messagebundle_it.properties +6 -1
- package/src/sap/ui/rta/messagebundle_iw.properties +6 -1
- package/src/sap/ui/rta/messagebundle_ja.properties +6 -1
- package/src/sap/ui/rta/messagebundle_kk.properties +6 -1
- package/src/sap/ui/rta/messagebundle_ko.properties +6 -1
- package/src/sap/ui/rta/messagebundle_lt.properties +6 -1
- package/src/sap/ui/rta/messagebundle_lv.properties +6 -1
- package/src/sap/ui/rta/messagebundle_ms.properties +6 -1
- package/src/sap/ui/rta/messagebundle_nl.properties +6 -1
- package/src/sap/ui/rta/messagebundle_no.properties +6 -1
- package/src/sap/ui/rta/messagebundle_pl.properties +6 -1
- package/src/sap/ui/rta/messagebundle_pt.properties +6 -1
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +6 -1
- package/src/sap/ui/rta/messagebundle_ro.properties +6 -1
- package/src/sap/ui/rta/messagebundle_ru.properties +6 -1
- package/src/sap/ui/rta/messagebundle_sh.properties +6 -1
- package/src/sap/ui/rta/messagebundle_sk.properties +6 -1
- package/src/sap/ui/rta/messagebundle_sl.properties +6 -1
- package/src/sap/ui/rta/messagebundle_sv.properties +6 -1
- package/src/sap/ui/rta/messagebundle_th.properties +6 -1
- package/src/sap/ui/rta/messagebundle_tr.properties +6 -1
- package/src/sap/ui/rta/messagebundle_uk.properties +6 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +6 -1
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +6 -1
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +6 -1
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +6 -4
- 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/ControlVariant.js +1 -1
- 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 +1 -1
- 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.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 +6 -4
- 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.js +2 -1
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +3 -1
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +6 -4
- 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/SaveAsContextBasedAdaptation.js +27 -34
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptationDialog.fragment.xml +1 -1
- 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/BindingsExtractor.js +12 -3
- 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 +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/StylesLoader.js +3 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +9 -9
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +24 -17
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +6 -3
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +13 -12
- package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
|
@@ -30,7 +30,7 @@ function (
|
|
|
30
30
|
* @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
|
|
31
31
|
* @extends sap.ui.rta.plugin.Plugin
|
|
32
32
|
* @author SAP SE
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.107.1
|
|
34
34
|
* @constructor
|
|
35
35
|
* @private
|
|
36
36
|
* @since 1.34
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.107.1
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.94
|
|
38
38
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -75,7 +75,7 @@ sap.ui.define([
|
|
|
75
75
|
* @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
|
|
76
76
|
* @extends sap.ui.rta.plugin.Plugin
|
|
77
77
|
* @author SAP SE
|
|
78
|
-
* @version 1.
|
|
78
|
+
* @version 1.107.1
|
|
79
79
|
* @constructor
|
|
80
80
|
* @private
|
|
81
81
|
* @since 1.44
|
|
@@ -15,7 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
* Helper object containing methods for the AdditionalElements plugin
|
|
16
16
|
*
|
|
17
17
|
* @author SAP SE
|
|
18
|
-
* @version 1.
|
|
18
|
+
* @version 1.107.1
|
|
19
19
|
* @private
|
|
20
20
|
* @since 1.94
|
|
21
21
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* Helper object to build the RTA commands resulting from the AdditionalElements Plugin
|
|
26
26
|
*
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.107.1
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.94
|
|
31
31
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -110,7 +110,7 @@ sap.ui.define([
|
|
|
110
110
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
111
111
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
112
112
|
* @author SAP SE
|
|
113
|
-
* @version 1.
|
|
113
|
+
* @version 1.107.1
|
|
114
114
|
* @constructor
|
|
115
115
|
* @private
|
|
116
116
|
* @since 1.75
|
|
@@ -16,7 +16,8 @@ sap.ui.define([
|
|
|
16
16
|
"sap/base/util/merge",
|
|
17
17
|
"sap/base/util/restricted/_omit",
|
|
18
18
|
"sap/ui/core/mvc/View",
|
|
19
|
-
"sap/base/Log"
|
|
19
|
+
"sap/base/Log",
|
|
20
|
+
"sap/ui/core/Configuration"
|
|
20
21
|
], function(
|
|
21
22
|
OverlayRegistry,
|
|
22
23
|
ElementOverlay,
|
|
@@ -29,7 +30,8 @@ sap.ui.define([
|
|
|
29
30
|
merge,
|
|
30
31
|
_omit,
|
|
31
32
|
View,
|
|
32
|
-
Log
|
|
33
|
+
Log,
|
|
34
|
+
Configuration
|
|
33
35
|
) {
|
|
34
36
|
"use strict";
|
|
35
37
|
|
|
@@ -42,7 +44,7 @@ sap.ui.define([
|
|
|
42
44
|
* @author SAP SE
|
|
43
45
|
* @experimental Since 1.56
|
|
44
46
|
* @since 1.56
|
|
45
|
-
* @version 1.
|
|
47
|
+
* @version 1.107.1
|
|
46
48
|
* @private
|
|
47
49
|
* @ui5-restricted
|
|
48
50
|
*/
|
|
@@ -182,7 +184,7 @@ sap.ui.define([
|
|
|
182
184
|
};
|
|
183
185
|
|
|
184
186
|
oOutline._enrichExtensionPointData = function (oData, oOverlay) {
|
|
185
|
-
var bIsDesignMode =
|
|
187
|
+
var bIsDesignMode = Configuration.getDesignMode();
|
|
186
188
|
if (!bIsDesignMode) {
|
|
187
189
|
return undefined;
|
|
188
190
|
}
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @extends sap.ui.rta.toolbar.Base
|
|
36
36
|
*
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.107.1
|
|
39
39
|
*
|
|
40
40
|
* @constructor
|
|
41
41
|
* @private
|
|
@@ -63,6 +63,7 @@ sap.ui.define([
|
|
|
63
63
|
activate: {},
|
|
64
64
|
discardDraft: {},
|
|
65
65
|
switchVersion: {},
|
|
66
|
+
saveAsContextBasedAdaptation: {},
|
|
66
67
|
openChangeCategorySelectionPopover: {}
|
|
67
68
|
}
|
|
68
69
|
}
|
|
@@ -13,8 +13,10 @@ sap.ui.define([
|
|
|
13
13
|
|
|
14
14
|
var AdaptationRenderer = BaseRenderer.extend("sap.ui.rta.toolbar.AdaptationRenderer");
|
|
15
15
|
|
|
16
|
+
AdaptationRenderer.apiVersion = 1; // @todo-semantic-rendering out of order .class() call before openStart
|
|
17
|
+
|
|
16
18
|
AdaptationRenderer.render = function (oRM, oControl) {
|
|
17
|
-
oRM.
|
|
19
|
+
oRM.class("sapUiRtaToolbarAdaptation");
|
|
18
20
|
|
|
19
21
|
BaseRenderer.render(oRM, oControl);
|
|
20
22
|
};
|
|
@@ -16,16 +16,18 @@ function(
|
|
|
16
16
|
|
|
17
17
|
var BaseRenderer = Renderer.extend.call(HBoxRenderer, "sap.ui.rta.toolbar.BaseRenderer");
|
|
18
18
|
|
|
19
|
+
BaseRenderer.apiVersion = 1; // @todo-semantic-rendering out of order .class() and .style() calls before openStart
|
|
20
|
+
|
|
19
21
|
BaseRenderer.render = function (oRM, oControl) {
|
|
20
|
-
oRM.
|
|
21
|
-
oRM.
|
|
22
|
+
oRM.class("sapUiRtaToolbar");
|
|
23
|
+
oRM.class("color_" + oControl.getColor());
|
|
22
24
|
|
|
23
25
|
// setting type if exists
|
|
24
|
-
oControl.type && oRM.
|
|
26
|
+
oControl.type && oRM.class("type_" + oControl.type);
|
|
25
27
|
|
|
26
28
|
// setting z-index if exists
|
|
27
29
|
var iZIndex = oControl.getZIndex();
|
|
28
|
-
iZIndex && oRM.
|
|
30
|
+
iZIndex && oRM.style("z-index", iZIndex);
|
|
29
31
|
|
|
30
32
|
HBoxRenderer.render(oRM, oControl);
|
|
31
33
|
};
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @class
|
|
29
29
|
*
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.107.1
|
|
32
32
|
*
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
@@ -55,17 +55,9 @@ sap.ui.define([
|
|
|
55
55
|
name: "sap.ui.rta.toolbar.contextBased.SaveAsContextBasedAdaptationDialog",
|
|
56
56
|
id: this.getToolbar().getId() + "_fragment--sapUiRta_addAdaptationDialog",
|
|
57
57
|
controller: {
|
|
58
|
-
onAdaptationTitleChange:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}.bind(this),
|
|
62
|
-
// TODO: implementation of save as context based adaptation
|
|
63
|
-
onSaveAsContextBasedAdaptation: function () {
|
|
64
|
-
},
|
|
65
|
-
onCancelContextBasedAdaptationDialog: function () {
|
|
66
|
-
_clearContexts.call(this);
|
|
67
|
-
this._oAddAdaptationDialog.close();
|
|
68
|
-
}.bind(this)
|
|
58
|
+
onAdaptationTitleChange: _onAdaptationTitleChange.bind(this),
|
|
59
|
+
onSaveAsContextBasedAdaptation: _onSaveAsContextBasedAdaptation.bind(this),
|
|
60
|
+
onCancelContextBasedAdaptationDialog: _onCancelContextBasedAdaptationDialog.bind(this)
|
|
69
61
|
}
|
|
70
62
|
}).then(function (oDialog) {
|
|
71
63
|
this._oAddAdaptationDialog = oDialog;
|
|
@@ -81,41 +73,42 @@ sap.ui.define([
|
|
|
81
73
|
}.bind(this));
|
|
82
74
|
};
|
|
83
75
|
|
|
76
|
+
function _onAdaptationTitleChange(oEvent) {
|
|
77
|
+
this.sAdaptationTitle = oEvent.getParameter("value");
|
|
78
|
+
_enableSaveAsButton.call(this);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function _onCancelContextBasedAdaptationDialog() {
|
|
82
|
+
_clearContexts.call(this);
|
|
83
|
+
this._oAddAdaptationDialog.close();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function _onSaveAsContextBasedAdaptation() {
|
|
87
|
+
var oContextBasedAdaptation = {};
|
|
88
|
+
oContextBasedAdaptation.title = getAdaptationTitle.call(this);
|
|
89
|
+
oContextBasedAdaptation.contexts = this._oContextComponentInstance.getSelectedContexts();
|
|
90
|
+
this.getToolbar().fireEvent("saveAsContextBasedAdaptation", oContextBasedAdaptation);
|
|
91
|
+
}
|
|
92
|
+
|
|
84
93
|
function createContextSharingComponent(sLayer) {
|
|
85
|
-
var mPropertyBag = { layer: sLayer || Layer.CUSTOMER
|
|
94
|
+
var mPropertyBag = { layer: sLayer || Layer.CUSTOMER };
|
|
86
95
|
return ContextSharingAPI.createComponent(mPropertyBag).then(function (oContextSharingComponent) {
|
|
87
96
|
this._oContextComponent = oContextSharingComponent;
|
|
88
97
|
this._oContextComponentInstance = oContextSharingComponent.getComponentInstance();
|
|
89
|
-
this._oContextComponentInstance.
|
|
98
|
+
this._oContextComponentInstance.resetSelectedContexts();
|
|
90
99
|
this._oAddAdaptationDialog.addContent(this._oContextComponent);
|
|
91
100
|
var oSelectedContextsModel = this._oContextComponentInstance.getSelectedContextsModel();
|
|
92
101
|
this.oSelectedContextsBinding = new Binding(oSelectedContextsModel, "/", oSelectedContextsModel.getContext("/"));
|
|
93
|
-
this.oSelectedContextsBinding.attachChange(
|
|
102
|
+
this.oSelectedContextsBinding.attachChange(_enableSaveAsButton.bind(this));
|
|
94
103
|
}.bind(this));
|
|
95
104
|
}
|
|
96
105
|
|
|
97
|
-
function onSelectedContextsChange() {
|
|
98
|
-
this.aSelectedRoles = this._oContextComponentInstance.getSelectedContexts().role;
|
|
99
|
-
_validateAddAdaptationInput.call(this);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function _validateAddAdaptationInput() {
|
|
103
|
-
if (getAdaptationTitle.call(this).length > 0 && getSelectedContexts.call(this).length > 0) {
|
|
104
|
-
_enableSaveAsButton.call(this, true);
|
|
105
|
-
} else {
|
|
106
|
-
_enableSaveAsButton.call(this, false);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
106
|
function getAdaptationTitle() {
|
|
111
107
|
return this.sAdaptationTitle || "";
|
|
112
108
|
}
|
|
113
109
|
|
|
114
|
-
function
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function _enableSaveAsButton(bEnable) {
|
|
110
|
+
function _enableSaveAsButton() {
|
|
111
|
+
var bEnable = getAdaptationTitle.call(this).length > 0 && this._oContextComponentInstance.getSelectedContexts().role.length > 0;
|
|
119
112
|
this.getToolbar().getControl("addAdaptationDialog--saveContextBasedAdaptation-saveButton").setEnabled(bEnable);
|
|
120
113
|
}
|
|
121
114
|
|
|
@@ -124,7 +117,7 @@ sap.ui.define([
|
|
|
124
117
|
if (this._oContextComponent.isDestroyed()) {
|
|
125
118
|
return createContextSharingComponent.call(this);
|
|
126
119
|
}
|
|
127
|
-
this._oContextComponentInstance.
|
|
120
|
+
this._oContextComponentInstance.resetSelectedContexts();
|
|
128
121
|
this._oAddAdaptationDialog.addContent(this._oContextComponent);
|
|
129
122
|
}
|
|
130
123
|
}
|
|
@@ -148,13 +148,21 @@ function(
|
|
|
148
148
|
function getBindingsForAggregation(oElement, oModel, bTemplate, sAggregationName, oRelevantContainerElement) {
|
|
149
149
|
var aBindings = [];
|
|
150
150
|
var aElements = [];
|
|
151
|
+
var oTemplate;
|
|
151
152
|
var bIsInTemplate = bTemplate;
|
|
153
|
+
var oElementModel = oElement.getModel();
|
|
152
154
|
|
|
153
155
|
var oBinding = oElement.getBindingInfo(sAggregationName);
|
|
154
|
-
|
|
156
|
+
oTemplate = oBinding && oBinding.template;
|
|
155
157
|
|
|
156
|
-
// If a template is
|
|
157
|
-
//
|
|
158
|
+
// If a template is found for a different model, we don't look inside the template
|
|
159
|
+
// e.g. a Select control whose entries are defined in an own JSON model
|
|
160
|
+
if (oTemplate && oElementModel && oElementModel !== oModel) {
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// If a template is bound to the current element on the given model,
|
|
165
|
+
// we continue the evaluation on the template (as it has no direct parent)
|
|
158
166
|
if (oTemplate) {
|
|
159
167
|
bIsInTemplate = true;
|
|
160
168
|
aElements = [oTemplate];
|
|
@@ -289,6 +297,7 @@ function(
|
|
|
289
297
|
.filter(function (sPropertyName) {
|
|
290
298
|
var mBindingInfo = oTemplate.mBindingInfos[sPropertyName];
|
|
291
299
|
var sModelName = mBindingInfo && mBindingInfo.parts[0] && mBindingInfo.parts[0].model;
|
|
300
|
+
bIsSameModel = oModel === oTemplateParent.getModel(sModelName);
|
|
292
301
|
if (!sModelName) {
|
|
293
302
|
var oParentDefaultModel = oTemplateParent.getDefaultModel ? oTemplateParent.getDefaultModel() : null;
|
|
294
303
|
var oTemplateDefaultModel = oTemplate.getDefaultModel ? oTemplate.getDefaultModel() : null;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/thirdparty/jquery"
|
|
9
|
-
], function(jQuery) {
|
|
8
|
+
"sap/ui/thirdparty/jquery", "sap/ui/core/Configuration"
|
|
9
|
+
], function(jQuery, Configuration) {
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
12
|
var module = {};
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
return jQuery.get(sap.ui.require.toUrl(('sap.ui.rta.assets.' + sFileName).replace(/\./g, "/")) + '.css')
|
|
21
21
|
.then(function (sData) {
|
|
22
22
|
// TODO: check if it's possible to use UI5 standard mechanism for styles adjustments
|
|
23
|
-
if (
|
|
23
|
+
if (Configuration.getRTL()) {
|
|
24
24
|
return sData.replace(/right/g, 'left');
|
|
25
25
|
}
|
|
26
26
|
return sData;
|
|
@@ -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.107.1
|
|
44
44
|
* @private
|
|
45
45
|
*/
|
|
46
46
|
var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
|
|
@@ -162,29 +162,29 @@ sap.ui.define([
|
|
|
162
162
|
|
|
163
163
|
function getTexts(mChangeInformation, oRtaResourceBundle, sOverlayId) {
|
|
164
164
|
var oAffectedElement = Core.byId(mChangeInformation.affectedElementId);
|
|
165
|
-
var
|
|
166
|
-
var vOriginalValue = mChangeInformation.
|
|
165
|
+
var mDescriptionPayload = Object.keys(mChangeInformation.descriptionPayload || {}).reduce(function(mDescriptionPayload, sKey) {
|
|
166
|
+
var vOriginalValue = mChangeInformation.descriptionPayload[sKey];
|
|
167
167
|
var bIsBinding = FlUtils.isBinding(vOriginalValue);
|
|
168
168
|
var vValue = bIsBinding
|
|
169
169
|
? resolveBinding(vOriginalValue, oAffectedElement)
|
|
170
170
|
: vOriginalValue;
|
|
171
|
-
|
|
172
|
-
return
|
|
171
|
+
mDescriptionPayload[sKey] = vValue;
|
|
172
|
+
return mDescriptionPayload;
|
|
173
173
|
}, {});
|
|
174
174
|
|
|
175
175
|
var mPropertyBag = { appComponent: FlUtils.getAppComponentForControl(oAffectedElement) };
|
|
176
176
|
var oOverlay = Core.byId(sOverlayId);
|
|
177
177
|
var sElementLabel = oOverlay.getDesignTimeMetadata().getLabel(oAffectedElement);
|
|
178
178
|
var oCommandVisualization = getCommandVisualization(mChangeInformation);
|
|
179
|
-
var oDescription = oCommandVisualization && oCommandVisualization.getDescription(
|
|
179
|
+
var oDescription = oCommandVisualization && oCommandVisualization.getDescription(mDescriptionPayload, sElementLabel, mPropertyBag) || {};
|
|
180
180
|
var sCommandName = mChangeInformation.commandName;
|
|
181
181
|
var sDescriptionText;
|
|
182
182
|
var sDescriptionTooltip;
|
|
183
183
|
|
|
184
184
|
// 'Settings' with a custom description should overwrite the description from the CommandVisualization
|
|
185
|
-
if (sCommandName === "settings" &&
|
|
186
|
-
oDescription.descriptionText =
|
|
187
|
-
oDescription.descriptionTooltip =
|
|
185
|
+
if (sCommandName === "settings" && mDescriptionPayload.description) {
|
|
186
|
+
oDescription.descriptionText = mDescriptionPayload.description;
|
|
187
|
+
oDescription.descriptionTooltip = mDescriptionPayload.descriptionTooltip;
|
|
188
188
|
} else if (mChangeInformation.changeCategory === "other") {
|
|
189
189
|
// To retrieve the generic description for commands without visualization
|
|
190
190
|
sCommandName = "other";
|