@openui5/sap.ui.rta 1.93.3 → 1.96.2
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/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- 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 +160 -121
- package/src/sap/ui/rta/Utils.js +73 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +4 -3
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +24 -17
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +107 -78
- package/src/sap/ui/rta/appVariant/Feature.js +5 -12
- package/src/sap/ui/rta/appVariant/Utils.js +10 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +35 -20
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_de.properties +1 -1
- 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 +4 -4
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +7 -4
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
- 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 +1 -1
- 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/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/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 +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +23 -9
- package/src/sap/ui/rta/messagebundle_ar.properties +14 -7
- package/src/sap/ui/rta/messagebundle_bg.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ca.properties +14 -7
- package/src/sap/ui/rta/messagebundle_cs.properties +14 -7
- package/src/sap/ui/rta/messagebundle_cy.properties +14 -7
- package/src/sap/ui/rta/messagebundle_da.properties +14 -7
- package/src/sap/ui/rta/messagebundle_de.properties +23 -16
- package/src/sap/ui/rta/messagebundle_el.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_GB.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +14 -7
- package/src/sap/ui/rta/messagebundle_es.properties +14 -7
- package/src/sap/ui/rta/messagebundle_es_MX.properties +14 -7
- package/src/sap/ui/rta/messagebundle_et.properties +14 -7
- package/src/sap/ui/rta/messagebundle_fi.properties +15 -8
- package/src/sap/ui/rta/messagebundle_fr.properties +14 -7
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +14 -7
- package/src/sap/ui/rta/messagebundle_hi.properties +14 -7
- package/src/sap/ui/rta/messagebundle_hr.properties +14 -7
- package/src/sap/ui/rta/messagebundle_hu.properties +14 -7
- package/src/sap/ui/rta/messagebundle_id.properties +16 -9
- package/src/sap/ui/rta/messagebundle_it.properties +14 -7
- package/src/sap/ui/rta/messagebundle_iw.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ja.properties +14 -7
- package/src/sap/ui/rta/messagebundle_kk.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ko.properties +14 -7
- package/src/sap/ui/rta/messagebundle_lt.properties +14 -7
- package/src/sap/ui/rta/messagebundle_lv.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ms.properties +14 -7
- package/src/sap/ui/rta/messagebundle_nl.properties +14 -7
- package/src/sap/ui/rta/messagebundle_no.properties +14 -7
- package/src/sap/ui/rta/messagebundle_pl.properties +14 -7
- package/src/sap/ui/rta/messagebundle_pt.properties +14 -7
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ro.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ru.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sh.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sk.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sl.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sv.properties +16 -9
- package/src/sap/ui/rta/messagebundle_th.properties +14 -7
- package/src/sap/ui/rta/messagebundle_tr.properties +14 -7
- package/src/sap/ui/rta/messagebundle_uk.properties +14 -7
- package/src/sap/ui/rta/messagebundle_vi.properties +14 -7
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +14 -7
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +14 -7
- 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 +1 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +10 -5
- 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 +52 -2
- 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 +18 -61
- 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 +4 -1
- package/src/sap/ui/rta/plugin/Selection.js +35 -1
- package/src/sap/ui/rta/plugin/Settings.js +15 -14
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +133 -139
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +505 -0
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +74 -0
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +97 -260
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -2
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +136 -831
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +117 -0
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +337 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +8 -5
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +31 -29
- 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 +109 -62
- 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/themes/base/ChangeVisualization.less +16 -0
- package/src/sap/ui/rta/themes/base/Overlay.less +59 -58
- package/src/sap/ui/rta/{assets/InPageStyles.css → themes/base/OverlayWithScrollbar.less} +14 -12
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +12 -1
- package/src/sap/ui/rta/themes/base/library.source.less +3 -1
- package/src/sap/ui/rta/themes/sap_hcb/Overlay.less +2 -3
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +67 -48
- package/src/sap/ui/rta/toolbar/Adaptation.js +43 -38
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +4 -5
- package/src/sap/ui/rta/toolbar/Base.js +64 -18
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
- package/src/sap/ui/rta/toolbar/Fiori.js +9 -9
- package/src/sap/ui/rta/toolbar/FioriLike.js +4 -4
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +98 -0
- package/src/sap/ui/rta/toolbar/Personalization.js +8 -8
- package/src/sap/ui/rta/toolbar/Standalone.js +4 -4
- package/src/sap/ui/rta/toolbar/translation/Translation.js +52 -39
- package/src/sap/ui/rta/util/BindingsExtractor.js +24 -27
- package/src/sap/ui/rta/util/PluginManager.js +2 -4
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +3 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +21 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +71 -96
- package/ui5.yaml +4 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangesListPopover.fragment.xml +0 -23
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/ui/dt/plugin/ElementMover",
|
|
10
10
|
"sap/ui/dt/OverlayUtil",
|
|
11
|
+
"sap/ui/dt/ElementUtil",
|
|
11
12
|
"sap/ui/rta/Utils",
|
|
12
13
|
"sap/ui/rta/command/CommandFactory",
|
|
13
14
|
"sap/ui/rta/plugin/Plugin",
|
|
14
|
-
"sap/ui/dt/OverlayRegistry"
|
|
15
|
-
"sap/ui/dt/MetadataPropagationUtil"
|
|
15
|
+
"sap/ui/dt/OverlayRegistry"
|
|
16
16
|
],
|
|
17
17
|
function(
|
|
18
18
|
ElementMover,
|
|
19
19
|
OverlayUtil,
|
|
20
|
+
ElementUtil,
|
|
20
21
|
Utils,
|
|
21
22
|
CommandFactory,
|
|
22
23
|
Plugin,
|
|
23
|
-
OverlayRegistry
|
|
24
|
-
MetadataPropagationUtil
|
|
24
|
+
OverlayRegistry
|
|
25
25
|
) {
|
|
26
26
|
"use strict";
|
|
27
27
|
|
|
@@ -35,7 +35,7 @@ function(
|
|
|
35
35
|
* The RTAElementMover is responsible for the RTA specific adaptation of element movements.
|
|
36
36
|
*
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.96.2
|
|
39
39
|
*
|
|
40
40
|
* @constructor
|
|
41
41
|
* @private
|
|
@@ -106,6 +106,13 @@ function(
|
|
|
106
106
|
return Promise.resolve(false);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
// Direct children of template aggregations should not be movable
|
|
110
|
+
// because their order is defined based on the underlying data
|
|
111
|
+
var oElement = oOverlay.getElement();
|
|
112
|
+
if (ElementUtil.isElementDirectTemplateChild(oElement)) {
|
|
113
|
+
return Promise.resolve(false);
|
|
114
|
+
}
|
|
115
|
+
|
|
109
116
|
var oRelevantContainer = oOverlay.getRelevantContainer();
|
|
110
117
|
var oRelevantContainerOverlay = OverlayRegistry.getOverlay(oRelevantContainer);
|
|
111
118
|
if (!oRelevantContainerOverlay) {
|
|
@@ -160,18 +167,8 @@ function(
|
|
|
160
167
|
});
|
|
161
168
|
}
|
|
162
169
|
|
|
163
|
-
function fnHasMoveAction(oAggregationOverlay, oElement, oRelevantContainer) {
|
|
164
|
-
var oAggregationDTMetadata = oAggregationOverlay.getDesignTimeMetadata();
|
|
165
|
-
var oMoveAction = oAggregationDTMetadata.getAction("move", oElement);
|
|
166
|
-
if (!oMoveAction) {
|
|
167
|
-
return Promise.resolve(false);
|
|
168
|
-
}
|
|
169
|
-
// moveChangeHandler information is always located on the relevant container
|
|
170
|
-
return this.oBasePlugin.hasChangeHandler(oMoveAction.changeType, oRelevantContainer);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
170
|
/**
|
|
174
|
-
* @param
|
|
171
|
+
* @param {sap.ui.dt.Overlay} oOverlay overlay object
|
|
175
172
|
* @return {sap.ui.dt.DesignTimeMetadata} oDesignTimeMetadata
|
|
176
173
|
* @private
|
|
177
174
|
*/
|
|
@@ -206,55 +203,15 @@ function(
|
|
|
206
203
|
|
|
207
204
|
/**
|
|
208
205
|
* Checks drop ability for aggregation overlays
|
|
209
|
-
* @param
|
|
210
|
-
* @
|
|
206
|
+
* @param {sap.ui.dt.Overlay} oAggregationOverlay Aggregation overlay object
|
|
207
|
+
* @param {sap.ui.dt.ElementOverlay} [oOverlay] Overlay being moved/added
|
|
208
|
+
* @param {boolean} [bOverlayNotInDom] Flag defining if overlay is not in DOM
|
|
209
|
+
* @return {Promise.<boolean>} Promise with true value if overlay can be added to the aggregation overlay or false value if not.
|
|
211
210
|
* @override
|
|
212
211
|
*/
|
|
213
212
|
RTAElementMover.prototype.checkTargetZone = function(oAggregationOverlay, oOverlay, bOverlayNotInDom) {
|
|
214
213
|
var oMovedOverlay = oOverlay || this.getMovedOverlay();
|
|
215
|
-
return
|
|
216
|
-
.then(function(bTargetZone) {
|
|
217
|
-
if (!bTargetZone) {
|
|
218
|
-
return false;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
var oMovedElement = oMovedOverlay.getElement();
|
|
222
|
-
var oTargetOverlay = oAggregationOverlay.getParent();
|
|
223
|
-
var oMovedRelevantContainer = oMovedOverlay.getRelevantContainer();
|
|
224
|
-
|
|
225
|
-
// the element or the parent overlay might be destroyed or not available
|
|
226
|
-
if (!oMovedElement || !oTargetOverlay) {
|
|
227
|
-
return false;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
var oTargetElement = oTargetOverlay.getElement();
|
|
231
|
-
var oAggregationDtMetadata = oAggregationOverlay.getDesignTimeMetadata();
|
|
232
|
-
|
|
233
|
-
// determine target relevantContainer
|
|
234
|
-
var vTargetRelevantContainerAfterMove = MetadataPropagationUtil.getRelevantContainerForPropagation(oAggregationDtMetadata.getData(), oMovedElement);
|
|
235
|
-
vTargetRelevantContainerAfterMove = vTargetRelevantContainerAfterMove || oTargetElement;
|
|
236
|
-
|
|
237
|
-
// check for same relevantContainer
|
|
238
|
-
if (
|
|
239
|
-
!oMovedRelevantContainer
|
|
240
|
-
|| !vTargetRelevantContainerAfterMove
|
|
241
|
-
|| !this.oBasePlugin.hasStableId(oTargetOverlay)
|
|
242
|
-
|| oMovedRelevantContainer !== vTargetRelevantContainerAfterMove
|
|
243
|
-
) {
|
|
244
|
-
return false;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
// Binding context is not relevant if the element is being moved inside its parent
|
|
248
|
-
if (oMovedOverlay.getParent().getElement() !== oTargetElement) {
|
|
249
|
-
// check if binding context is the same
|
|
250
|
-
if (!Utils.checkSourceTargetBindingCompatibility(oMovedElement, oTargetElement)) {
|
|
251
|
-
return false;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
// check if movedOverlay is movable into the target aggregation
|
|
256
|
-
return fnHasMoveAction.call(this, oAggregationOverlay, oMovedElement, vTargetRelevantContainerAfterMove);
|
|
257
|
-
}.bind(this));
|
|
214
|
+
return Utils.checkTargetZone(oAggregationOverlay, oMovedOverlay, this.oBasePlugin, bOverlayNotInDom);
|
|
258
215
|
};
|
|
259
216
|
|
|
260
217
|
/**
|
|
@@ -55,7 +55,7 @@ sap.ui.define([
|
|
|
55
55
|
* Provides Rename handling functionality
|
|
56
56
|
*
|
|
57
57
|
* @author SAP SE
|
|
58
|
-
* @version 1.
|
|
58
|
+
* @version 1.96.2
|
|
59
59
|
*
|
|
60
60
|
* @constructor
|
|
61
61
|
* @private
|
|
@@ -361,6 +361,7 @@ sap.ui.define([
|
|
|
361
361
|
})
|
|
362
362
|
.then(function() {
|
|
363
363
|
var oOverlay = this._oEditedOverlay;
|
|
364
|
+
oOverlay.setIgnoreEnterKeyUpOnce(false);
|
|
364
365
|
oOverlay.addStyleClass(RenameHandler.errorStyleClass);
|
|
365
366
|
this.stopEdit(bRestoreFocus);
|
|
366
367
|
this.startEdit(oOverlay);
|
|
@@ -405,6 +406,8 @@ sap.ui.define([
|
|
|
405
406
|
_onEditableFieldKeydown: function (oEvent) {
|
|
406
407
|
switch (oEvent.keyCode) {
|
|
407
408
|
case KeyCodes.ENTER:
|
|
409
|
+
// to prevent context menu from opening when rename is finished
|
|
410
|
+
this._oEditedOverlay.setIgnoreEnterKeyUpOnce(true);
|
|
408
411
|
return RenameHandler._handlePostRename.call(this, true, oEvent);
|
|
409
412
|
case KeyCodes.ESCAPE:
|
|
410
413
|
this._oEditedOverlay.removeStyleClass(RenameHandler.errorStyleClass);
|
|
@@ -11,6 +11,7 @@ sap.ui.define([
|
|
|
11
11
|
"sap/ui/events/KeyCodes",
|
|
12
12
|
"sap/ui/dt/Overlay",
|
|
13
13
|
"sap/base/util/restricted/_intersection",
|
|
14
|
+
"sap/m/InstanceManager",
|
|
14
15
|
"sap/ui/Device"
|
|
15
16
|
],
|
|
16
17
|
function (
|
|
@@ -20,6 +21,7 @@ function (
|
|
|
20
21
|
KeyCodes,
|
|
21
22
|
Overlay,
|
|
22
23
|
_intersection,
|
|
24
|
+
InstanceManager,
|
|
23
25
|
Device
|
|
24
26
|
) {
|
|
25
27
|
"use strict";
|
|
@@ -32,7 +34,7 @@ function (
|
|
|
32
34
|
* @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
|
|
33
35
|
* @extends sap.ui.rta.plugin.Plugin
|
|
34
36
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
37
|
+
* @version 1.96.2
|
|
36
38
|
* @constructor
|
|
37
39
|
* @private
|
|
38
40
|
* @since 1.34
|
|
@@ -45,6 +47,10 @@ function (
|
|
|
45
47
|
properties: {
|
|
46
48
|
multiSelectionRequiredPlugins: {
|
|
47
49
|
type: "string[]"
|
|
50
|
+
},
|
|
51
|
+
isActive: {
|
|
52
|
+
type: "boolean",
|
|
53
|
+
defaultValue: true
|
|
48
54
|
}
|
|
49
55
|
},
|
|
50
56
|
associations: {},
|
|
@@ -100,6 +106,7 @@ function (
|
|
|
100
106
|
|
|
101
107
|
/**
|
|
102
108
|
* @param {sap.ui.dt.ElementOverlay} oOverlay - Overlay to be checked for developer mode
|
|
109
|
+
* @param {sap.ui.dt.DesignTimeMetadata} oDesignTimeMetadata - Design Time Metadata of the element
|
|
103
110
|
* @returns {boolean} true if it's in developer mode
|
|
104
111
|
* @private
|
|
105
112
|
*/
|
|
@@ -190,6 +197,9 @@ function (
|
|
|
190
197
|
* @private
|
|
191
198
|
*/
|
|
192
199
|
Selection.prototype._onKeyDown = function(oEvent) {
|
|
200
|
+
if (!this.getIsActive()) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
193
203
|
var oOverlay = Utils.getFocusedOverlay();
|
|
194
204
|
if (oEvent.keyCode === KeyCodes.ENTER) {
|
|
195
205
|
this._selectOverlay(oEvent);
|
|
@@ -234,6 +244,10 @@ function (
|
|
|
234
244
|
};
|
|
235
245
|
|
|
236
246
|
Selection.prototype._selectOverlay = function (oEvent) {
|
|
247
|
+
if (!this.getIsActive()) {
|
|
248
|
+
preventEventDefaultAndPropagation(oEvent);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
237
251
|
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
238
252
|
var bMultiSelection = oEvent.metaKey || oEvent.ctrlKey;
|
|
239
253
|
var bContextMenu = oEvent.type === "contextmenu";
|
|
@@ -263,6 +277,18 @@ function (
|
|
|
263
277
|
* @private
|
|
264
278
|
*/
|
|
265
279
|
Selection.prototype._onMouseDown = function(oEvent) {
|
|
280
|
+
if (!this.getIsActive()) {
|
|
281
|
+
// In Visualization Mode we must prevent MouseDown-Event for Overlays
|
|
282
|
+
// We have to close open PopOvers from the ChangeVisualization because they
|
|
283
|
+
// should close on MouseDown
|
|
284
|
+
preventEventDefaultAndPropagation(oEvent);
|
|
285
|
+
InstanceManager.getOpenPopovers().forEach(function(oPopOver) {
|
|
286
|
+
if (oPopOver._bOpenedByChangeIndicator) {
|
|
287
|
+
oPopOver.close();
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
266
292
|
// set focus after clicking, needed only for internet explorer
|
|
267
293
|
if (Device.browser.name === "ie") {
|
|
268
294
|
// when the EasyAdd Button is clicked, we don't want to focus/stopPropagation.
|
|
@@ -290,6 +316,10 @@ function (
|
|
|
290
316
|
* @private
|
|
291
317
|
*/
|
|
292
318
|
Selection.prototype._onMouseover = function(oEvent) {
|
|
319
|
+
if (!this.getIsActive()) {
|
|
320
|
+
preventEventDefaultAndPropagation(oEvent);
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
293
323
|
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
294
324
|
if (oOverlay.isSelectable()) {
|
|
295
325
|
if (oOverlay !== this._oHoverTarget) {
|
|
@@ -307,6 +337,10 @@ function (
|
|
|
307
337
|
* @private
|
|
308
338
|
*/
|
|
309
339
|
Selection.prototype._onMouseleave = function(oEvent) {
|
|
340
|
+
if (!this.getIsActive()) {
|
|
341
|
+
preventEventDefaultAndPropagation(oEvent);
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
310
344
|
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
311
345
|
if (oOverlay.isSelectable()) {
|
|
312
346
|
this._removePreviousHover();
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* @class The Settings allows trigger change of settings operations on the overlay
|
|
26
26
|
* @extends sap.ui.rta.plugin.Plugin
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.96.2
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
31
31
|
* @since 1.44
|
|
@@ -100,9 +100,7 @@ sap.ui.define([
|
|
|
100
100
|
|
|
101
101
|
var aUnsavedChanges = this.getCommandStack().getAllExecutedCommands().filter(function(oCommand) {
|
|
102
102
|
sElementId = oCommand.getElementId && oCommand.getElementId() || oCommand.getElement && oCommand.getElement().getId();
|
|
103
|
-
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
103
|
+
return sElementId === sId && aChangeTypes.indexOf(oCommand.getChangeType()) >= 0;
|
|
106
104
|
}).map(function(oCommand) {
|
|
107
105
|
return oCommand.getPreparedChange();
|
|
108
106
|
});
|
|
@@ -110,7 +108,7 @@ sap.ui.define([
|
|
|
110
108
|
return aUnsavedChanges;
|
|
111
109
|
};
|
|
112
110
|
|
|
113
|
-
Settings.prototype._handleFlexChangeCommand = function(mChange, aSelectedOverlays, oCompositeCommand,
|
|
111
|
+
Settings.prototype._handleFlexChangeCommand = function(mChange, aSelectedOverlays, oCompositeCommand, oSettingsAction) {
|
|
114
112
|
var mChangeSpecificData = mChange.changeSpecificData;
|
|
115
113
|
var sVariantManagementReference;
|
|
116
114
|
// temporarily support both
|
|
@@ -126,7 +124,7 @@ sap.ui.define([
|
|
|
126
124
|
|
|
127
125
|
return this.hasChangeHandler(mChangeSpecificData.changeType, oControl, sControlType)
|
|
128
126
|
.then(function(bHasChangeHandler) {
|
|
129
|
-
if (aSelectedOverlays[0].getVariantManagement && bHasChangeHandler) {
|
|
127
|
+
if (aSelectedOverlays[0].getVariantManagement && bHasChangeHandler && !oSettingsAction.CAUTION_variantIndependent) {
|
|
130
128
|
sVariantManagementReference = aSelectedOverlays[0].getVariantManagement();
|
|
131
129
|
}
|
|
132
130
|
return this.getCommandFactory().getCommandFor(
|
|
@@ -134,9 +132,11 @@ sap.ui.define([
|
|
|
134
132
|
"settings",
|
|
135
133
|
mChangeSpecificData,
|
|
136
134
|
undefined,
|
|
137
|
-
sVariantManagementReference
|
|
135
|
+
sVariantManagementReference
|
|
136
|
+
);
|
|
138
137
|
}.bind(this))
|
|
139
138
|
.then(function(oSettingsCommand) {
|
|
139
|
+
var bRuntimeOnly = oSettingsAction.runtimeOnly;
|
|
140
140
|
if (oSettingsCommand && bRuntimeOnly) {
|
|
141
141
|
oSettingsCommand.setRuntimeOnly(bRuntimeOnly);
|
|
142
142
|
}
|
|
@@ -166,7 +166,7 @@ sap.ui.define([
|
|
|
166
166
|
});
|
|
167
167
|
};
|
|
168
168
|
|
|
169
|
-
Settings.prototype._handleCompositeCommand = function(aElementOverlays, oElement, aChanges,
|
|
169
|
+
Settings.prototype._handleCompositeCommand = function(aElementOverlays, oElement, aChanges, oSettingsAction) {
|
|
170
170
|
var oCompositeCommand;
|
|
171
171
|
|
|
172
172
|
return this.getCommandFactory().getCommandFor(oElement, "composite")
|
|
@@ -180,7 +180,7 @@ sap.ui.define([
|
|
|
180
180
|
var mChangeSpecificData = mChange.changeSpecificData;
|
|
181
181
|
// Flex Change
|
|
182
182
|
if (mChangeSpecificData.changeType) {
|
|
183
|
-
return this._handleFlexChangeCommand(mChange, aElementOverlays, oCompositeCommand,
|
|
183
|
+
return this._handleFlexChangeCommand(mChange, aElementOverlays, oCompositeCommand, oSettingsAction);
|
|
184
184
|
// App Descriptor Change
|
|
185
185
|
} else if (mChangeSpecificData.appDescriptorChangeType) {
|
|
186
186
|
return this._handleAppDescriptorChangeCommand(mChange, oElement, oCompositeCommand);
|
|
@@ -205,11 +205,12 @@ sap.ui.define([
|
|
|
205
205
|
* Retrieves the available actions from the DesignTime Metadata and creates
|
|
206
206
|
* the corresponding commands for them.
|
|
207
207
|
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target Overlays of the action
|
|
208
|
-
* @param {object} mPropertyBag Property bag
|
|
209
|
-
* @param {function} [mPropertyBag.fnHandler] Handler function for the case of multiple settings actions
|
|
208
|
+
* @param {object} mPropertyBag - Property bag
|
|
209
|
+
* @param {function} [mPropertyBag.fnHandler] - Handler function for the case of multiple settings actions
|
|
210
|
+
* @param {object} [oSettingsAction] - The action object defined in the designtime
|
|
210
211
|
* @return {Promise} Returns promise resolving with the creation of the commands
|
|
211
212
|
*/
|
|
212
|
-
Settings.prototype.handler = function(aElementOverlays, mPropertyBag,
|
|
213
|
+
Settings.prototype.handler = function(aElementOverlays, mPropertyBag, oSettingsAction) {
|
|
213
214
|
mPropertyBag = mPropertyBag || {};
|
|
214
215
|
var oElement = aElementOverlays[0].getElement();
|
|
215
216
|
var fnHandler = mPropertyBag.fnHandler;
|
|
@@ -227,7 +228,7 @@ sap.ui.define([
|
|
|
227
228
|
|
|
228
229
|
.then(function(aChanges) {
|
|
229
230
|
if (aChanges.length > 0) {
|
|
230
|
-
return this._handleCompositeCommand(aElementOverlays, oElement, aChanges,
|
|
231
|
+
return this._handleCompositeCommand(aElementOverlays, oElement, aChanges, oSettingsAction);
|
|
231
232
|
}
|
|
232
233
|
}.bind(this))
|
|
233
234
|
|
|
@@ -286,7 +287,7 @@ sap.ui.define([
|
|
|
286
287
|
handler: function(fnHandler, aElementOverlays, mPropertyBag) {
|
|
287
288
|
mPropertyBag = mPropertyBag || {};
|
|
288
289
|
mPropertyBag.fnHandler = fnHandler;
|
|
289
|
-
return this.handler(aElementOverlays, mPropertyBag, oSettingsAction
|
|
290
|
+
return this.handler(aElementOverlays, mPropertyBag, oSettingsAction);
|
|
290
291
|
}.bind(this, oSettingsAction.handler),
|
|
291
292
|
submenu: formatSubMenuItems(oSettingsAction.submenu)
|
|
292
293
|
});
|