@openui5/sap.ui.rta 1.115.1 → 1.117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +33 -2
- package/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +1 -7
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +60 -59
- package/src/sap/ui/rta/RuntimeAuthoring.js +256 -254
- package/src/sap/ui/rta/Utils.js +42 -42
- package/src/sap/ui/rta/api/startAdaptation.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +3 -3
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +27 -27
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +100 -103
- package/src/sap/ui/rta/appVariant/Feature.js +75 -77
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +6 -7
- package/src/sap/ui/rta/appVariant/Utils.js +17 -17
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +36 -36
- package/src/sap/ui/rta/command/AddIFrame.js +7 -7
- package/src/sap/ui/rta/command/AddProperty.js +7 -7
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +7 -7
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +18 -18
- package/src/sap/ui/rta/command/BaseCommand.js +1 -2
- 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 +11 -11
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +28 -3
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +26 -24
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -11
- package/src/sap/ui/rta/command/CreateContainer.js +2 -2
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +30 -30
- package/src/sap/ui/rta/command/LREPSerializer.js +20 -10
- 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 +4 -4
- 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/TestDelegate.js +92 -92
- package/src/sap/ui/rta/enablement/elementActionTest.js +230 -112
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +11 -1
- package/src/sap/ui/rta/messagebundle_ar.properties +5 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ca.properties +5 -0
- package/src/sap/ui/rta/messagebundle_cs.properties +5 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +5 -0
- package/src/sap/ui/rta/messagebundle_da.properties +5 -0
- package/src/sap/ui/rta/messagebundle_de.properties +6 -1
- package/src/sap/ui/rta/messagebundle_el.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +6 -1
- package/src/sap/ui/rta/messagebundle_es.properties +5 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -0
- package/src/sap/ui/rta/messagebundle_et.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hu.properties +5 -0
- package/src/sap/ui/rta/messagebundle_id.properties +5 -0
- package/src/sap/ui/rta/messagebundle_it.properties +5 -0
- package/src/sap/ui/rta/messagebundle_iw.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +5 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +5 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +5 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ms.properties +5 -0
- package/src/sap/ui/rta/messagebundle_nl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_no.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ru.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sv.properties +5 -0
- package/src/sap/ui/rta/messagebundle_th.properties +5 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_vi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +5 -0
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +44 -44
- package/src/sap/ui/rta/plugin/BaseCreate.js +29 -29
- package/src/sap/ui/rta/plugin/Combine.js +9 -9
- package/src/sap/ui/rta/plugin/ControlVariant.js +21 -21
- package/src/sap/ui/rta/plugin/CreateContainer.js +6 -6
- package/src/sap/ui/rta/plugin/CutPaste.js +46 -46
- package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
- package/src/sap/ui/rta/plugin/EasyAdd.js +4 -4
- package/src/sap/ui/rta/plugin/EasyRemove.js +5 -5
- package/src/sap/ui/rta/plugin/LocalReset.js +25 -25
- package/src/sap/ui/rta/plugin/Plugin.js +20 -20
- package/src/sap/ui/rta/plugin/RTAElementMover.js +42 -42
- package/src/sap/ui/rta/plugin/Remove.js +11 -11
- package/src/sap/ui/rta/plugin/Rename.js +7 -7
- package/src/sap/ui/rta/plugin/RenameHandler.js +17 -17
- package/src/sap/ui/rta/plugin/Resize.js +62 -62
- package/src/sap/ui/rta/plugin/Selection.js +14 -14
- package/src/sap/ui/rta/plugin/Settings.js +20 -20
- package/src/sap/ui/rta/plugin/Split.js +7 -7
- package/src/sap/ui/rta/plugin/Stretch.js +4 -4
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -87
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +18 -18
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +98 -99
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +144 -144
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +67 -67
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +38 -39
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +29 -29
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +5 -5
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
- package/src/sap/ui/rta/service/Action.js +36 -37
- package/src/sap/ui/rta/service/ControllerExtension.js +4 -4
- package/src/sap/ui/rta/service/Outline.js +59 -59
- package/src/sap/ui/rta/service/Property.js +125 -125
- package/src/sap/ui/rta/service/Receiver.js +78 -77
- package/src/sap/ui/rta/service/Selection.js +6 -6
- package/src/sap/ui/rta/service/SupportTools.js +188 -37
- package/src/sap/ui/rta/service/index.js +1 -1
- package/src/sap/ui/rta/themes/base/FlexSupportExtension.less +14 -0
- package/src/sap/ui/rta/themes/base/library.source.less +2 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +81 -26
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +17 -15
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
- package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
- package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +0 -2
- package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
- package/src/sap/ui/rta/util/Animation.js +5 -5
- package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
- package/src/sap/ui/rta/util/PluginManager.js +25 -25
- package/src/sap/ui/rta/util/PopupManager.js +27 -27
- package/src/sap/ui/rta/util/ReloadManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
- package/src/sap/ui/rta/util/StylesLoader.js +9 -9
- package/src/sap/ui/rta/util/UrlParser.js +19 -19
- package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +23 -19
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +76 -63
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
- package/src/sap/ui/rta/util/hasStableId.js +2 -2
- package/src/sap/ui/rta/util/showMessageBox.js +4 -5
- package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
- package/src/sap/ui/rta/util/validateStableIds.js +8 -8
- package/ui5.yaml +1 -1
|
@@ -31,7 +31,7 @@ function(
|
|
|
31
31
|
* @extends sap.ui.dt.plugin.CutPaste
|
|
32
32
|
*
|
|
33
33
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
34
|
+
* @version 1.117.0
|
|
35
35
|
*
|
|
36
36
|
* @constructor
|
|
37
37
|
* @private
|
|
@@ -78,28 +78,28 @@ function(
|
|
|
78
78
|
*/
|
|
79
79
|
CutPaste.prototype._isEditable = function(oOverlay, mPropertyBag) {
|
|
80
80
|
return this.getElementMover().isEditable(oOverlay, mPropertyBag.onRegistration)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
.then(function(bEditable) {
|
|
82
|
+
if (bEditable) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
return this._isPasteEditable(oOverlay);
|
|
86
|
+
}.bind(this));
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
CutPaste.prototype._isPasteEditable = function
|
|
89
|
+
CutPaste.prototype._isPasteEditable = function(oOverlay) {
|
|
90
90
|
var oElementMover = this.getElementMover();
|
|
91
91
|
if (!this.hasStableId(oOverlay)) {
|
|
92
92
|
return Promise.resolve(false);
|
|
93
93
|
}
|
|
94
94
|
return oElementMover.isMoveAvailableOnRelevantContainer(oOverlay)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
});
|
|
95
|
+
.then(function(bMoveAvailable) {
|
|
96
|
+
if (!bMoveAvailable) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
return Utils.doIfAllControlsAreAvailable([oOverlay], function() {
|
|
100
|
+
return oElementMover.isMoveAvailableForChildren(oOverlay);
|
|
102
101
|
});
|
|
102
|
+
});
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
/**
|
|
@@ -107,8 +107,8 @@ function(
|
|
|
107
107
|
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
|
|
108
108
|
* @return {boolean} - true if the plugin is available
|
|
109
109
|
*/
|
|
110
|
-
CutPaste.prototype.isAvailable = function
|
|
111
|
-
return aElementOverlays.every(function
|
|
110
|
+
CutPaste.prototype.isAvailable = function(aElementOverlays) {
|
|
111
|
+
return aElementOverlays.every(function(oElementOverlay) {
|
|
112
112
|
return oElementOverlay.getMovable();
|
|
113
113
|
});
|
|
114
114
|
};
|
|
@@ -140,18 +140,18 @@ function(
|
|
|
140
140
|
this._executePaste(oTargetOverlay);
|
|
141
141
|
|
|
142
142
|
DtUtil.waitForSynced(this.getDesignTime())()
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
});
|
|
150
|
-
this.stopCutAndPaste();
|
|
151
|
-
}.bind(this))
|
|
152
|
-
.catch(function(oMessage) {
|
|
153
|
-
throw DtUtil.createError("CutPaste#paste", oMessage, "sap.ui.rta");
|
|
143
|
+
.then(function() {
|
|
144
|
+
return this.getElementMover().buildMoveCommand();
|
|
145
|
+
}.bind(this))
|
|
146
|
+
.then(function(oMoveCommand) {
|
|
147
|
+
this.fireElementModified({
|
|
148
|
+
command: oMoveCommand
|
|
154
149
|
});
|
|
150
|
+
this.stopCutAndPaste();
|
|
151
|
+
}.bind(this))
|
|
152
|
+
.catch(function(oMessage) {
|
|
153
|
+
throw DtUtil.createError("CutPaste#paste", oMessage, "sap.ui.rta");
|
|
154
|
+
});
|
|
155
155
|
};
|
|
156
156
|
|
|
157
157
|
/**
|
|
@@ -159,9 +159,9 @@ function(
|
|
|
159
159
|
*/
|
|
160
160
|
CutPaste.prototype.cut = function(oOverlay) {
|
|
161
161
|
return ControlCutPaste.prototype.cut.apply(this, arguments)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
.then(function() {
|
|
163
|
+
oOverlay.setSelected(false);
|
|
164
|
+
});
|
|
165
165
|
};
|
|
166
166
|
|
|
167
167
|
/**
|
|
@@ -170,15 +170,15 @@ function(
|
|
|
170
170
|
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
|
|
171
171
|
* @return {object[]} - array of the items with required data
|
|
172
172
|
*/
|
|
173
|
-
CutPaste.prototype.getMenuItems = function
|
|
173
|
+
CutPaste.prototype.getMenuItems = function(aElementOverlays) {
|
|
174
174
|
var aMenuItems = [];
|
|
175
175
|
var oPasteMenuItem = this.enhanceItemWithResponsibleElement({
|
|
176
|
-
id:
|
|
177
|
-
text: sap.ui.getCore().getLibraryResourceBundle(
|
|
178
|
-
handler: function
|
|
176
|
+
id: "CTX_PASTE",
|
|
177
|
+
text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("CTX_PASTE"),
|
|
178
|
+
handler: function(aElementOverlays) {
|
|
179
179
|
return this.paste(aElementOverlays[0]);
|
|
180
180
|
}.bind(this),
|
|
181
|
-
enabled: function
|
|
181
|
+
enabled: function(aElementOverlays) {
|
|
182
182
|
return this.isElementPasteable(aElementOverlays[0]);
|
|
183
183
|
}.bind(this),
|
|
184
184
|
rank: 80,
|
|
@@ -188,12 +188,12 @@ function(
|
|
|
188
188
|
|
|
189
189
|
if (this.isAvailable(aResponsibleElementOverlays)) {
|
|
190
190
|
var oCutMenuItem = this.enhanceItemWithResponsibleElement({
|
|
191
|
-
id:
|
|
192
|
-
text: sap.ui.getCore().getLibraryResourceBundle(
|
|
193
|
-
handler: function
|
|
191
|
+
id: "CTX_CUT",
|
|
192
|
+
text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("CTX_CUT"),
|
|
193
|
+
handler: function(aElementOverlays) {
|
|
194
194
|
return this.cut(aElementOverlays[0]);
|
|
195
195
|
}.bind(this),
|
|
196
|
-
enabled: function
|
|
196
|
+
enabled: function(aElementOverlays) {
|
|
197
197
|
return aElementOverlays.length === 1;
|
|
198
198
|
},
|
|
199
199
|
rank: 70,
|
|
@@ -203,12 +203,12 @@ function(
|
|
|
203
203
|
return aMenuItems;
|
|
204
204
|
}
|
|
205
205
|
return this._isPasteEditable(aElementOverlays[0])
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
206
|
+
.then(function(bPasteEditable) {
|
|
207
|
+
if (bPasteEditable) {
|
|
208
|
+
aMenuItems.push(oPasteMenuItem);
|
|
209
|
+
}
|
|
210
|
+
return aMenuItems;
|
|
211
|
+
});
|
|
212
212
|
};
|
|
213
213
|
|
|
214
214
|
return CutPaste;
|
|
@@ -33,7 +33,7 @@ function(
|
|
|
33
33
|
* @extends sap.ui.dt.plugin.ControlDragDrop
|
|
34
34
|
*
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.117.0
|
|
37
37
|
*
|
|
38
38
|
* @constructor
|
|
39
39
|
* @private
|
|
@@ -202,7 +202,7 @@ function(
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
if (aRelevantOverlays.length > 0) {
|
|
205
|
-
//Remove duplicates (e.g. when the parent is the same)
|
|
205
|
+
// Remove duplicates (e.g. when the parent is the same)
|
|
206
206
|
aRelevantOverlays = aRelevantOverlays.filter(function(oRelevantOverlay, iIndex, aSource) {
|
|
207
207
|
return iIndex === aSource.indexOf(oRelevantOverlay);
|
|
208
208
|
});
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @class The EasyAdd Plugin adds an Icon to an Overlay, which allows to trigger add operations directly
|
|
24
24
|
* @extends sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.117.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @since 1.48
|
|
@@ -169,9 +169,9 @@ sap.ui.define([
|
|
|
169
169
|
icon: "sap-icon://add",
|
|
170
170
|
enabled: bIsEditable
|
|
171
171
|
})
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
.placeAt(oHtmlButtonOuter)
|
|
173
|
+
.attachBrowserEvent("click", fnCallback)
|
|
174
|
+
.attachBrowserEvent("tap", fnCallback);
|
|
175
175
|
oOverlayDom.append(oHtmlButtonOuter);
|
|
176
176
|
|
|
177
177
|
oHtmlButtonOuter.addEventListener("mouseover", function(oEvent) {
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* @class The EasyRemove Plugin adds an Icon to an Overlay, which allows to trigger remove operations directly
|
|
22
22
|
* @extends sap.ui.rta.plugin.Remove
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.117.0
|
|
25
25
|
* @constructor
|
|
26
26
|
* @private
|
|
27
27
|
* @since 1.48
|
|
@@ -56,12 +56,12 @@ sap.ui.define([
|
|
|
56
56
|
}.bind(this);
|
|
57
57
|
|
|
58
58
|
var oDeleteButton = this._addButton(oOverlay);
|
|
59
|
-
oDeleteButton.attachBrowserEvent("contextmenu", function
|
|
59
|
+
oDeleteButton.attachBrowserEvent("contextmenu", function(oEvent) {
|
|
60
60
|
oEvent.stopPropagation();
|
|
61
61
|
oEvent.preventDefault();
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
-
var fnOnClick = function
|
|
64
|
+
var fnOnClick = function(oEvent) {
|
|
65
65
|
var oOverlay = sap.ui.getCore().byId(oEvent.currentTarget.id.replace("-DeleteIcon", ""));
|
|
66
66
|
onDeletePressed(oOverlay);
|
|
67
67
|
oEvent.stopPropagation();
|
|
@@ -69,8 +69,8 @@ sap.ui.define([
|
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
oDeleteButton
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
.attachBrowserEvent("click", fnOnClick)
|
|
73
|
+
.attachBrowserEvent("tap", fnOnClick);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
Remove.prototype.registerElementOverlay.apply(this, arguments);
|
|
@@ -37,7 +37,7 @@ sap.ui.define([
|
|
|
37
37
|
* @class
|
|
38
38
|
* @extends sap.ui.rta.plugin.Plugin
|
|
39
39
|
* @author SAP SE
|
|
40
|
-
* @version 1.
|
|
40
|
+
* @version 1.117.0
|
|
41
41
|
* @constructor
|
|
42
42
|
* @private
|
|
43
43
|
* @since 1.90
|
|
@@ -56,7 +56,7 @@ sap.ui.define([
|
|
|
56
56
|
/**
|
|
57
57
|
* @override
|
|
58
58
|
*/
|
|
59
|
-
LocalReset.prototype._isEditable = function
|
|
59
|
+
LocalReset.prototype._isEditable = function(oOverlay) {
|
|
60
60
|
var vLocalResetAction = this.getAction(oOverlay);
|
|
61
61
|
return !!vLocalResetAction;
|
|
62
62
|
};
|
|
@@ -64,7 +64,7 @@ sap.ui.define([
|
|
|
64
64
|
/**
|
|
65
65
|
* @override
|
|
66
66
|
*/
|
|
67
|
-
LocalReset.prototype.isEnabled = function
|
|
67
|
+
LocalReset.prototype.isEnabled = function(aElementOverlays) {
|
|
68
68
|
if (aElementOverlays.length !== 1) {
|
|
69
69
|
return false;
|
|
70
70
|
}
|
|
@@ -106,7 +106,7 @@ sap.ui.define([
|
|
|
106
106
|
* @param {sap.ui.dt.ElementOverlay|sap.ui.dt.ElementOverlay[]} vElementOverlays - Target overlay(s)
|
|
107
107
|
* @return {object[]} Array of the items with required data
|
|
108
108
|
*/
|
|
109
|
-
LocalReset.prototype.getMenuItems = function
|
|
109
|
+
LocalReset.prototype.getMenuItems = function(vElementOverlays) {
|
|
110
110
|
return this._getMenuItems(vElementOverlays, { pluginId: "CTX_LOCAL_RESET", rank: 61, icon: "sap-icon://reset" });
|
|
111
111
|
};
|
|
112
112
|
|
|
@@ -154,28 +154,28 @@ sap.ui.define([
|
|
|
154
154
|
sVariantManagementReference
|
|
155
155
|
)
|
|
156
156
|
].filter(Boolean))
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
});
|
|
161
|
-
this.fireElementModified({
|
|
162
|
-
command: oCompositeCommand
|
|
163
|
-
});
|
|
164
|
-
if (bHasVariant) {
|
|
165
|
-
var sMessage = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("MSG_LOCAL_RESET_VARIANT_SAVE");
|
|
166
|
-
MessageToast.show(sMessage, {
|
|
167
|
-
duration: 5000
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}.bind(this))
|
|
171
|
-
.catch(function(vError) {
|
|
172
|
-
throw DtUtil.propagateError(
|
|
173
|
-
vError,
|
|
174
|
-
"LocalReset#handler",
|
|
175
|
-
"Error occurred during handler execution",
|
|
176
|
-
"sap.ui.rta.plugin"
|
|
177
|
-
);
|
|
157
|
+
.then(function(aCommands) {
|
|
158
|
+
aCommands.forEach(function(oCommand) {
|
|
159
|
+
oCompositeCommand.addCommand(oCommand);
|
|
178
160
|
});
|
|
161
|
+
this.fireElementModified({
|
|
162
|
+
command: oCompositeCommand
|
|
163
|
+
});
|
|
164
|
+
if (bHasVariant) {
|
|
165
|
+
var sMessage = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("MSG_LOCAL_RESET_VARIANT_SAVE");
|
|
166
|
+
MessageToast.show(sMessage, {
|
|
167
|
+
duration: 5000
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}.bind(this))
|
|
171
|
+
.catch(function(vError) {
|
|
172
|
+
throw DtUtil.propagateError(
|
|
173
|
+
vError,
|
|
174
|
+
"LocalReset#handler",
|
|
175
|
+
"Error occurred during handler execution",
|
|
176
|
+
"sap.ui.rta.plugin"
|
|
177
|
+
);
|
|
178
|
+
});
|
|
179
179
|
};
|
|
180
180
|
|
|
181
181
|
return LocalReset;
|
|
@@ -70,7 +70,7 @@ sap.ui.define([
|
|
|
70
70
|
* @extends sap.ui.dt.Plugin
|
|
71
71
|
*
|
|
72
72
|
* @author SAP SE
|
|
73
|
-
* @version 1.
|
|
73
|
+
* @version 1.117.0
|
|
74
74
|
*
|
|
75
75
|
* @constructor
|
|
76
76
|
* @private
|
|
@@ -102,10 +102,10 @@ sap.ui.define([
|
|
|
102
102
|
/**
|
|
103
103
|
* This function needs to be overwritten in every plugin.
|
|
104
104
|
*/
|
|
105
|
-
BasePlugin.prototype._isEditable = function
|
|
105
|
+
BasePlugin.prototype._isEditable = function() {};
|
|
106
106
|
|
|
107
|
-
BasePlugin.prototype.executeWhenVisible = function
|
|
108
|
-
var fnGeometryChangedCallback = function
|
|
107
|
+
BasePlugin.prototype.executeWhenVisible = function(oElementOverlay, fnCallback) {
|
|
108
|
+
var fnGeometryChangedCallback = function(oEvent) {
|
|
109
109
|
if (oEvent.getSource().getGeometry() && oEvent.getSource().getGeometry().visible) {
|
|
110
110
|
oElementOverlay.detachEvent("geometryChanged", fnGeometryChangedCallback, this);
|
|
111
111
|
fnCallback();
|
|
@@ -141,7 +141,7 @@ sap.ui.define([
|
|
|
141
141
|
mDebounceFunctions[sOverlayId][sName]();
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
var _onElementModified = function
|
|
144
|
+
var _onElementModified = function(oEvent) {
|
|
145
145
|
// Initialize here because plugins may not extend the rta.Plugin and
|
|
146
146
|
// instead inherit the method via rta.Utils.extendWith
|
|
147
147
|
// Therefore the constructor/init might not be properly called
|
|
@@ -165,7 +165,7 @@ sap.ui.define([
|
|
|
165
165
|
if (oParams.type === "propertyChanged" && oParams.name === "visible") {
|
|
166
166
|
aRelevantOverlays = this._getRelevantOverlays(oOverlay);
|
|
167
167
|
if (oParams.value === true) {
|
|
168
|
-
this.executeWhenVisible(oOverlay, function
|
|
168
|
+
this.executeWhenVisible(oOverlay, function() {
|
|
169
169
|
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
170
170
|
}.bind(this));
|
|
171
171
|
} else {
|
|
@@ -175,7 +175,7 @@ sap.ui.define([
|
|
|
175
175
|
if (this.getDesignTime().getStatus() === "synced") {
|
|
176
176
|
this.evaluateEditable([oOverlay], {onRegistration: false});
|
|
177
177
|
} else {
|
|
178
|
-
this.getDesignTime().attachEventOnce("synced", function
|
|
178
|
+
this.getDesignTime().attachEventOnce("synced", function() {
|
|
179
179
|
this.evaluateEditable([oOverlay], {onRegistration: false});
|
|
180
180
|
}, this);
|
|
181
181
|
}
|
|
@@ -183,12 +183,12 @@ sap.ui.define([
|
|
|
183
183
|
oParams.type === "insertAggregation"
|
|
184
184
|
|| oParams.type === "removeAggregation"
|
|
185
185
|
) {
|
|
186
|
-
debounceFunction(this._mDebounceFunctions
|
|
186
|
+
debounceFunction(this._mDebounceFunctions.insertOrRemove, oOverlay, oParams.name, function() {
|
|
187
187
|
aRelevantOverlays = this._getRelevantOverlays(oOverlay, oParams.name);
|
|
188
188
|
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
189
189
|
}.bind(this));
|
|
190
190
|
} else if (oParams.type === "addOrSetAggregation") {
|
|
191
|
-
debounceFunction(this._mDebounceFunctions
|
|
191
|
+
debounceFunction(this._mDebounceFunctions.addOrSet, oOverlay, oParams.name, function() {
|
|
192
192
|
// Designtime might have been destroyed while waiting for the debounce callback
|
|
193
193
|
// In this case, the updates are no longer relevant
|
|
194
194
|
var oDesignTime = this.getDesignTime();
|
|
@@ -200,7 +200,7 @@ sap.ui.define([
|
|
|
200
200
|
aRelevantOverlays = this._getRelevantOverlays(oOverlay, oParams.name);
|
|
201
201
|
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
202
202
|
} else {
|
|
203
|
-
oDesignTime.attachEventOnce("synced", function
|
|
203
|
+
oDesignTime.attachEventOnce("synced", function() {
|
|
204
204
|
aRelevantOverlays = this._getRelevantOverlays(oOverlay, oParams.name);
|
|
205
205
|
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
206
206
|
}, this);
|
|
@@ -265,7 +265,7 @@ sap.ui.define([
|
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
267
|
|
|
268
|
-
BasePlugin.prototype._handleModifyPluginList = function
|
|
268
|
+
BasePlugin.prototype._handleModifyPluginList = function(oOverlay, vEditable) {
|
|
269
269
|
// for the createContainer and additionalElements plugin the isEditable function returns an object with 2 properties, asChild and asSibling.
|
|
270
270
|
// for every other plugin isEditable should be a boolean.
|
|
271
271
|
if (vEditable !== undefined && vEditable !== null) {
|
|
@@ -294,14 +294,14 @@ sap.ui.define([
|
|
|
294
294
|
return sName;
|
|
295
295
|
};
|
|
296
296
|
|
|
297
|
-
BasePlugin.prototype._isEditableByPlugin = function
|
|
297
|
+
BasePlugin.prototype._isEditableByPlugin = function(oOverlay, bSibling) {
|
|
298
298
|
var sPluginName = this._retrievePluginName(bSibling);
|
|
299
299
|
var aPluginList = oOverlay.getEditableByPlugins();
|
|
300
300
|
return aPluginList.indexOf(sPluginName) > -1;
|
|
301
301
|
};
|
|
302
302
|
|
|
303
303
|
BasePlugin.prototype.registerElementOverlay = function(oOverlay) {
|
|
304
|
-
this.executeWhenVisible(oOverlay, function
|
|
304
|
+
this.executeWhenVisible(oOverlay, function() {
|
|
305
305
|
this.evaluateEditable([oOverlay], {onRegistration: true});
|
|
306
306
|
oOverlay.attachElementModified(_onElementModified, this);
|
|
307
307
|
}.bind(this));
|
|
@@ -324,7 +324,7 @@ sap.ui.define([
|
|
|
324
324
|
return hasStableId(oOverlay);
|
|
325
325
|
};
|
|
326
326
|
|
|
327
|
-
BasePlugin.prototype.getVariantManagementReference = function
|
|
327
|
+
BasePlugin.prototype.getVariantManagementReference = function(oOverlay) {
|
|
328
328
|
var sVariantManagementReference;
|
|
329
329
|
if (oOverlay.getVariantManagement) {
|
|
330
330
|
sVariantManagementReference = oOverlay.getVariantManagement();
|
|
@@ -341,7 +341,7 @@ sap.ui.define([
|
|
|
341
341
|
* @return {boolean} Whether the Aggregation has a valid action
|
|
342
342
|
* @protected
|
|
343
343
|
*/
|
|
344
|
-
BasePlugin.prototype.checkAggregationsOnSelf = function
|
|
344
|
+
BasePlugin.prototype.checkAggregationsOnSelf = function(oOverlay, sAction, sParentAggregationName, sSubAction) {
|
|
345
345
|
var oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
|
|
346
346
|
var oElement = oOverlay.getElement();
|
|
347
347
|
|
|
@@ -401,8 +401,8 @@ sap.ui.define([
|
|
|
401
401
|
});
|
|
402
402
|
};
|
|
403
403
|
|
|
404
|
-
BasePlugin.prototype.isAvailable = function
|
|
405
|
-
return aElementOverlays.every(function
|
|
404
|
+
BasePlugin.prototype.isAvailable = function(aElementOverlays) {
|
|
405
|
+
return aElementOverlays.every(function(oElementOverlay) {
|
|
406
406
|
return this._isEditableByPlugin(oElementOverlay);
|
|
407
407
|
}, this);
|
|
408
408
|
};
|
|
@@ -426,11 +426,11 @@ sap.ui.define([
|
|
|
426
426
|
oElementOverlay.getElement();
|
|
427
427
|
|
|
428
428
|
return this.hasChangeHandler(oAction.changeType, oElement)
|
|
429
|
-
|
|
430
|
-
|
|
429
|
+
.then(function(bHasChangeHandler) {
|
|
430
|
+
return bHasChangeHandler
|
|
431
431
|
&& this._checkRelevantContainerStableID(oAction, oElementOverlay)
|
|
432
432
|
&& this.hasStableId(oElementOverlay);
|
|
433
|
-
|
|
433
|
+
}.bind(this));
|
|
434
434
|
}
|
|
435
435
|
return Promise.resolve(false);
|
|
436
436
|
};
|
|
@@ -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.117.0
|
|
39
39
|
*
|
|
40
40
|
* @constructor
|
|
41
41
|
* @private
|
|
@@ -84,10 +84,10 @@ function(
|
|
|
84
84
|
return Promise.resolve(false);
|
|
85
85
|
}
|
|
86
86
|
return this.checkMovable(oOverlay, bOnRegistration)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
.then(function(bMovable) {
|
|
88
|
+
oOverlay.setMovable(bMovable);
|
|
89
|
+
return bMovable;
|
|
90
|
+
});
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
/**
|
|
@@ -120,21 +120,21 @@ function(
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
return this.isMoveAvailableOnRelevantContainer(oOverlay)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
.then(function(bValid) {
|
|
124
|
+
if (bValid) {
|
|
125
|
+
bValid = this.oBasePlugin.hasStableId(oOverlay) &&
|
|
126
126
|
this.oBasePlugin.hasStableId(oParentElementOverlay) &&
|
|
127
127
|
this.oBasePlugin.hasStableId(oRelevantContainerOverlay);
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
}
|
|
129
|
+
return bValid;
|
|
130
|
+
}.bind(this))
|
|
131
|
+
.then(function(bValid) {
|
|
132
|
+
// element is only valid for move if it can be moved to somewhere else
|
|
133
|
+
if (bValid) {
|
|
134
|
+
return fnCheckForValidTargetZones.call(this, oOverlay, oRelevantContainerOverlay, bOnRegistration);
|
|
135
|
+
}
|
|
136
|
+
return bValid;
|
|
137
|
+
}.bind(this));
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
function fnCheckForValidTargetZones(oOverlay, oRelevantContainerOverlay, bOnRegistration) {
|
|
@@ -142,29 +142,29 @@ function(
|
|
|
142
142
|
|
|
143
143
|
var aValidAggregationOverlayPromises = aOverlays.map(function(oAggregationOverlay) {
|
|
144
144
|
return this.checkTargetZone(oAggregationOverlay, oOverlay, bOnRegistration)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
.then(function(bValid) {
|
|
146
|
+
return bValid ? oAggregationOverlay : undefined;
|
|
147
|
+
});
|
|
148
148
|
}.bind(this));
|
|
149
149
|
|
|
150
150
|
return Promise.all(aValidAggregationOverlayPromises)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
});
|
|
155
|
-
if (aValidAggregationOverlays.length < 1) {
|
|
156
|
-
return false;
|
|
157
|
-
} else if (aValidAggregationOverlays.length === 1) {
|
|
158
|
-
var aVisibleOverlays = aValidAggregationOverlays[0].getChildren().filter(function(oChildOverlay) {
|
|
159
|
-
var oChildElement = oChildOverlay.getElement();
|
|
160
|
-
// At least one sibling has to be visible and still attached to the parent
|
|
161
|
-
// In some edge cases, the child element is not available anymore (element already got destroyed)
|
|
162
|
-
return (oChildElement && oChildElement.getVisible() && oChildElement.getParent());
|
|
163
|
-
});
|
|
164
|
-
return aVisibleOverlays.length > 1;
|
|
165
|
-
}
|
|
166
|
-
return true;
|
|
151
|
+
.then(function(aValidAggregationOverlays) {
|
|
152
|
+
aValidAggregationOverlays = aValidAggregationOverlays.filter(function(aValidAggregationOverlay) {
|
|
153
|
+
return !!aValidAggregationOverlay;
|
|
167
154
|
});
|
|
155
|
+
if (aValidAggregationOverlays.length < 1) {
|
|
156
|
+
return false;
|
|
157
|
+
} else if (aValidAggregationOverlays.length === 1) {
|
|
158
|
+
var aVisibleOverlays = aValidAggregationOverlays[0].getChildren().filter(function(oChildOverlay) {
|
|
159
|
+
var oChildElement = oChildOverlay.getElement();
|
|
160
|
+
// At least one sibling has to be visible and still attached to the parent
|
|
161
|
+
// In some edge cases, the child element is not available anymore (element already got destroyed)
|
|
162
|
+
return (oChildElement && oChildElement.getVisible() && oChildElement.getParent());
|
|
163
|
+
});
|
|
164
|
+
return aVisibleOverlays.length > 1;
|
|
165
|
+
}
|
|
166
|
+
return true;
|
|
167
|
+
});
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
/**
|
|
@@ -188,7 +188,7 @@ function(
|
|
|
188
188
|
* @return {boolean} true if type is movable, false otherwise
|
|
189
189
|
*/
|
|
190
190
|
ElementMover.prototype.isMovableType = function() {
|
|
191
|
-
//real check is part of checkMovable which has the overlay
|
|
191
|
+
// real check is part of checkMovable which has the overlay
|
|
192
192
|
return true;
|
|
193
193
|
};
|
|
194
194
|
|
|
@@ -255,11 +255,11 @@ function(
|
|
|
255
255
|
}
|
|
256
256
|
}.bind(this));
|
|
257
257
|
return Promise.all(aAggregationWithMoveActionPromises)
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
});
|
|
258
|
+
.then(function(aMoveAvailableResults) {
|
|
259
|
+
return aMoveAvailableResults.some(function(aMoveAvailable) {
|
|
260
|
+
return aMoveAvailable;
|
|
262
261
|
});
|
|
262
|
+
});
|
|
263
263
|
};
|
|
264
264
|
|
|
265
265
|
/**
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @class The Remove allows trigger remove operations on the overlay
|
|
30
30
|
* @extends sap.ui.rta.plugin.Plugin
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.117.0
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
35
35
|
* @since 1.34
|
|
@@ -51,7 +51,7 @@ sap.ui.define([
|
|
|
51
51
|
* @param {sap.ui.dt.Overlay} oOverlay overlay object
|
|
52
52
|
* @override
|
|
53
53
|
*/
|
|
54
|
-
Remove.prototype.registerElementOverlay = function
|
|
54
|
+
Remove.prototype.registerElementOverlay = function(oOverlay) {
|
|
55
55
|
if (this.isEnabled([oOverlay])) {
|
|
56
56
|
oOverlay.attachBrowserEvent("keydown", this._onKeyDown, this);
|
|
57
57
|
}
|
|
@@ -63,7 +63,7 @@ sap.ui.define([
|
|
|
63
63
|
* @return {Promise.<boolean>} <code>true</code> if it's editable wrapped in a promise.
|
|
64
64
|
* @private
|
|
65
65
|
*/
|
|
66
|
-
Remove.prototype._isEditable = function
|
|
66
|
+
Remove.prototype._isEditable = function(oOverlay) {
|
|
67
67
|
return this._checkChangeHandlerAndStableId(oOverlay);
|
|
68
68
|
};
|
|
69
69
|
|
|
@@ -73,7 +73,7 @@ sap.ui.define([
|
|
|
73
73
|
* @return {boolean} true if enabled
|
|
74
74
|
* @public
|
|
75
75
|
*/
|
|
76
|
-
Remove.prototype.isEnabled = function
|
|
76
|
+
Remove.prototype.isEnabled = function(aElementOverlays) {
|
|
77
77
|
var aResponsibleElementOverlays = aElementOverlays.map(function(oElementOverlay) {
|
|
78
78
|
return this.getResponsibleElementOverlay(oElementOverlay);
|
|
79
79
|
}.bind(this));
|
|
@@ -109,8 +109,8 @@ sap.ui.define([
|
|
|
109
109
|
* @private
|
|
110
110
|
*/
|
|
111
111
|
Remove.prototype._canBeRemovedFromAggregation = function(aElementOverlays) {
|
|
112
|
-
//Check if designtime allows removing last visible element
|
|
113
|
-
var fnCheckDesignTimeSettings = function
|
|
112
|
+
// Check if designtime allows removing last visible element
|
|
113
|
+
var fnCheckDesignTimeSettings = function(oOverlay) {
|
|
114
114
|
var oParentOverlay = oOverlay.getParentAggregationOverlay();
|
|
115
115
|
if (oParentOverlay) {
|
|
116
116
|
var oAction = this.getAction(oParentOverlay);
|
|
@@ -185,10 +185,10 @@ sap.ui.define([
|
|
|
185
185
|
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
|
|
186
186
|
* @private
|
|
187
187
|
*/
|
|
188
|
-
Remove.prototype.removeElement = function
|
|
188
|
+
Remove.prototype.removeElement = function(aElementOverlays) {
|
|
189
189
|
var aTargetOverlays = aElementOverlays || this.getSelectedOverlays();
|
|
190
190
|
|
|
191
|
-
aTargetOverlays = aTargetOverlays.filter(function
|
|
191
|
+
aTargetOverlays = aTargetOverlays.filter(function(oElementOverlay) {
|
|
192
192
|
return this.isEnabled([oElementOverlay]);
|
|
193
193
|
}, this);
|
|
194
194
|
|
|
@@ -211,7 +211,7 @@ sap.ui.define([
|
|
|
211
211
|
}
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
Remove.prototype.handler = function
|
|
214
|
+
Remove.prototype.handler = function(aElementOverlays) {
|
|
215
215
|
var aPromises = [];
|
|
216
216
|
var oCompositeCommand = new CompositeCommand();
|
|
217
217
|
function fnSetFocus(oOverlay) {
|
|
@@ -293,7 +293,7 @@ sap.ui.define([
|
|
|
293
293
|
aSiblings.slice(0, iOverlayPosition).reverse()
|
|
294
294
|
);
|
|
295
295
|
}
|
|
296
|
-
oNextOverlaySelection = aCandidates.filter(function
|
|
296
|
+
oNextOverlaySelection = aCandidates.filter(function(oSibling) {
|
|
297
297
|
return oSibling.getElement().getVisible();
|
|
298
298
|
}).shift();
|
|
299
299
|
}
|
|
@@ -309,7 +309,7 @@ sap.ui.define([
|
|
|
309
309
|
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
|
|
310
310
|
* @return {object[]} - array of the items with required data
|
|
311
311
|
*/
|
|
312
|
-
Remove.prototype.getMenuItems = function
|
|
312
|
+
Remove.prototype.getMenuItems = function(aElementOverlays) {
|
|
313
313
|
return this._getMenuItems(aElementOverlays, {pluginId: "CTX_REMOVE", rank: 60, icon: "sap-icon://less"});
|
|
314
314
|
};
|
|
315
315
|
|