@openui5/sap.ui.rta 1.122.0 → 1.123.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/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 +2 -1
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +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 +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 +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/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 +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +2 -0
- package/src/sap/ui/rta/messagebundle_ar.properties +1 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ca.properties +1 -0
- package/src/sap/ui/rta/messagebundle_cnr.properties +1 -0
- package/src/sap/ui/rta/messagebundle_cs.properties +1 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +2 -1
- package/src/sap/ui/rta/messagebundle_da.properties +1 -0
- package/src/sap/ui/rta/messagebundle_de.properties +2 -1
- package/src/sap/ui/rta/messagebundle_el.properties +1 -0
- package/src/sap/ui/rta/messagebundle_en.properties +325 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +1 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +3 -3
- package/src/sap/ui/rta/messagebundle_es.properties +1 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +1 -0
- package/src/sap/ui/rta/messagebundle_et.properties +1 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +1 -0
- package/src/sap/ui/rta/messagebundle_fr.properties +1 -0
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +24 -23
- package/src/sap/ui/rta/messagebundle_hi.properties +1 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +1 -0
- package/src/sap/ui/rta/messagebundle_hu.properties +1 -0
- package/src/sap/ui/rta/messagebundle_id.properties +1 -0
- package/src/sap/ui/rta/messagebundle_it.properties +1 -0
- package/src/sap/ui/rta/messagebundle_iw.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +1 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +1 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +1 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +1 -0
- package/src/sap/ui/rta/messagebundle_mk.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ms.properties +1 -0
- package/src/sap/ui/rta/messagebundle_nl.properties +2 -1
- package/src/sap/ui/rta/messagebundle_no.properties +1 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +1 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +1 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +1 -0
- package/src/sap/ui/rta/messagebundle_ru.properties +1 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +1 -0
- package/src/sap/ui/rta/messagebundle_sk.properties +1 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +1 -0
- package/src/sap/ui/rta/messagebundle_sr.properties +1 -0
- package/src/sap/ui/rta/messagebundle_sv.properties +1 -0
- package/src/sap/ui/rta/messagebundle_th.properties +1 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +1 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +1 -0
- package/src/sap/ui/rta/messagebundle_vi.properties +1 -0
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +1 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +1 -0
- 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/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/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.fragment.xml +20 -6
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +53 -35
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +43 -20
- 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 +1 -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.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- 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/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +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/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/ServiceManager.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -1
|
@@ -31,7 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
* @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
|
|
32
32
|
* @extends sap.ui.rta.plugin.Plugin
|
|
33
33
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
34
|
+
* @version 1.123.0
|
|
35
35
|
* @constructor
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.34
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<core:FragmentDefinition
|
|
2
|
-
|
|
2
|
+
xmlns="sap.m"
|
|
3
3
|
xmlns:core="sap.ui.core"
|
|
4
4
|
xmlns:layout="sap.ui.layout">
|
|
5
5
|
|
|
@@ -28,12 +28,26 @@
|
|
|
28
28
|
press="._resortList"/>
|
|
29
29
|
<Button
|
|
30
30
|
id="rta_customFieldButton"
|
|
31
|
-
text=""
|
|
32
|
-
icon="sap-icon://add"
|
|
31
|
+
text="{/customFieldButtonText}"
|
|
33
32
|
tooltip="{/customFieldButtonTooltip}"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
visible="{/customFieldButtonVisible}"
|
|
34
|
+
press="._redirectToExtensibilityAction(${/extensibilityOptions/0/actionKey})"/>
|
|
35
|
+
<MenuButton
|
|
36
|
+
id="rta_customFieldMenuButton"
|
|
37
|
+
text="{/extensibilityMenuButtonText}"
|
|
38
|
+
tooltip="{/extensibilityMenuButtonTooltip}"
|
|
39
|
+
visible="{/extensibilityMenuButtonActive}">
|
|
40
|
+
<Menu
|
|
41
|
+
itemSelected="onMenuItemPress"
|
|
42
|
+
items="{/extensibilityOptions}">
|
|
43
|
+
<items>
|
|
44
|
+
<MenuItem
|
|
45
|
+
text="{text}"
|
|
46
|
+
tooltip="{tooltip}"
|
|
47
|
+
press="_redirectToExtensibilityAction(${actionKey})"/>
|
|
48
|
+
</items>
|
|
49
|
+
</Menu>
|
|
50
|
+
</MenuButton>
|
|
37
51
|
</Toolbar>
|
|
38
52
|
<layout:VerticalLayout
|
|
39
53
|
id="rta_businessContextContainer"
|
|
@@ -7,7 +7,7 @@ sap.ui.define([
|
|
|
7
7
|
"sap/ui/base/ManagedObject",
|
|
8
8
|
"sap/ui/core/Element",
|
|
9
9
|
"sap/ui/core/Fragment",
|
|
10
|
-
"sap/ui/
|
|
10
|
+
"sap/ui/core/Lib",
|
|
11
11
|
"sap/ui/model/json/JSONModel",
|
|
12
12
|
"sap/ui/model/Filter",
|
|
13
13
|
"sap/ui/model/FilterOperator",
|
|
@@ -18,7 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
ManagedObject,
|
|
19
19
|
Element,
|
|
20
20
|
Fragment,
|
|
21
|
-
|
|
21
|
+
Lib,
|
|
22
22
|
JSONModel,
|
|
23
23
|
Filter,
|
|
24
24
|
FilterOperator,
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
* @class Context - Dialog for available Fields in Runtime Authoring
|
|
35
35
|
* @extends sap.ui.base.ManagedObject
|
|
36
36
|
* @author SAP SE
|
|
37
|
-
* @version 1.
|
|
37
|
+
* @version 1.123.0
|
|
38
38
|
* @constructor
|
|
39
39
|
* @private
|
|
40
40
|
* @since 1.44
|
|
@@ -44,10 +44,6 @@ sap.ui.define([
|
|
|
44
44
|
metadata: {
|
|
45
45
|
library: "sap.ui.rta",
|
|
46
46
|
properties: {
|
|
47
|
-
customFieldEnabled: {
|
|
48
|
-
type: "boolean",
|
|
49
|
-
defaultValue: false
|
|
50
|
-
},
|
|
51
47
|
businessContextVisible: {
|
|
52
48
|
type: "boolean",
|
|
53
49
|
defaultValue: false
|
|
@@ -58,7 +54,7 @@ sap.ui.define([
|
|
|
58
54
|
},
|
|
59
55
|
events: {
|
|
60
56
|
opened: {},
|
|
61
|
-
|
|
57
|
+
triggerExtensibilityAction: {}
|
|
62
58
|
}
|
|
63
59
|
}
|
|
64
60
|
});
|
|
@@ -79,11 +75,15 @@ sap.ui.define([
|
|
|
79
75
|
|
|
80
76
|
this._oDialogModel = new JSONModel({
|
|
81
77
|
elements: [],
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
customFieldButtonText: "",
|
|
79
|
+
customFieldButtonVisible: false,
|
|
84
80
|
businessContextVisible: false,
|
|
85
81
|
customFieldButtonTooltip: "",
|
|
86
|
-
businessContextTexts: [{text: ""}] // empty element in first place
|
|
82
|
+
businessContextTexts: [{text: ""}], // empty element in first place to be replaced by the headerText (see: addExtensibilityInfo)
|
|
83
|
+
extensibilityMenuButtonActive: false,
|
|
84
|
+
extensibilityMenuButtonText: "",
|
|
85
|
+
extensibilityMenuButtonTooltip: "",
|
|
86
|
+
extensibilityOptions: []
|
|
87
87
|
});
|
|
88
88
|
|
|
89
89
|
this._oDialogPromise.then(function(oDialog) {
|
|
@@ -113,7 +113,11 @@ sap.ui.define([
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
AddElementsDialog.prototype.setCustomFieldButtonVisible = function(bVisible) {
|
|
116
|
-
this._oDialogModel.setProperty("/
|
|
116
|
+
this._oDialogModel.setProperty("/customFieldButtonVisible", bVisible);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
AddElementsDialog.prototype.getCustomFieldButtonVisible = function() {
|
|
120
|
+
return this._oDialogModel.getProperty("/customFieldButtonVisible");
|
|
117
121
|
};
|
|
118
122
|
|
|
119
123
|
/**
|
|
@@ -213,12 +217,12 @@ sap.ui.define([
|
|
|
213
217
|
};
|
|
214
218
|
|
|
215
219
|
/**
|
|
216
|
-
* Fire an event to redirect to
|
|
217
|
-
*
|
|
220
|
+
* Fire an event to redirect to the extensibility action
|
|
221
|
+
* @param {string} sActionKey - Key for the mapping of specific actions (e.g. which URI to open for given extension data)
|
|
218
222
|
* @private
|
|
219
223
|
*/
|
|
220
|
-
AddElementsDialog.prototype.
|
|
221
|
-
this.
|
|
224
|
+
AddElementsDialog.prototype._redirectToExtensibilityAction = function(sActionKey) {
|
|
225
|
+
this.fireTriggerExtensibilityAction({actionKey: sActionKey});
|
|
222
226
|
this._oDialogPromise.then(function(oDialog) {
|
|
223
227
|
oDialog.close();
|
|
224
228
|
});
|
|
@@ -232,14 +236,33 @@ sap.ui.define([
|
|
|
232
236
|
};
|
|
233
237
|
|
|
234
238
|
/**
|
|
235
|
-
*
|
|
239
|
+
* Sets the information for the extensibility menu button items
|
|
236
240
|
*
|
|
237
|
-
* @param {
|
|
241
|
+
* @param {string} sButtonText - Text for the extensibility MenuButton
|
|
242
|
+
* @param {string} sButtonTooltip - Tooltip for the extensibility MenuButton
|
|
243
|
+
* @param {object[]} aExtensibilityOptions - Options available on the extensibility MenuButton
|
|
238
244
|
* @public
|
|
239
245
|
*/
|
|
240
|
-
AddElementsDialog.prototype.
|
|
241
|
-
|
|
242
|
-
|
|
246
|
+
AddElementsDialog.prototype.setExtensibilityOptions = function(oExtensibilityInfo) {
|
|
247
|
+
const aExtensibilityOptions = oExtensibilityInfo.UITexts.options;
|
|
248
|
+
|
|
249
|
+
this._oDialogModel.setProperty("/extensibilityOptions", aExtensibilityOptions);
|
|
250
|
+
if (aExtensibilityOptions.length === 1) {
|
|
251
|
+
// if there is only one option, we can directly set the button text
|
|
252
|
+
this._oDialogModel.setProperty("/customFieldButtonText", aExtensibilityOptions[0].text);
|
|
253
|
+
if (aExtensibilityOptions[0]?.tooltip) {
|
|
254
|
+
this._oDialogModel.setProperty("/customFieldButtonTooltip", aExtensibilityOptions[0].tooltip);
|
|
255
|
+
}
|
|
256
|
+
this.setCustomFieldButtonVisible(true);
|
|
257
|
+
} else {
|
|
258
|
+
this._oDialogModel.setProperty("/extensibilityMenuButtonActive", true);
|
|
259
|
+
this._oDialogModel.setProperty("/extensibilityMenuButtonText", oExtensibilityInfo.UITexts.buttonText);
|
|
260
|
+
this._oDialogModel.setProperty("/extensibilityMenuButtonTooltip", oExtensibilityInfo.UITexts.tooltip);
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
AddElementsDialog.prototype.getExtensibilityOptions = function() {
|
|
265
|
+
return this._oDialogModel.getProperty("/extensibilityOptions");
|
|
243
266
|
};
|
|
244
267
|
|
|
245
268
|
/**
|
|
@@ -254,18 +277,18 @@ sap.ui.define([
|
|
|
254
277
|
};
|
|
255
278
|
|
|
256
279
|
/**
|
|
257
|
-
* Adds
|
|
258
|
-
* @param {object
|
|
259
|
-
* @returns {Promise<undefined>} A promise resolving to undefined
|
|
280
|
+
* Adds extensibility info - business contexts, UI Texts, etc...
|
|
281
|
+
* @param {object} oExtensibilityInfo - Extensibility Info
|
|
260
282
|
* @public
|
|
261
283
|
*/
|
|
262
|
-
AddElementsDialog.prototype.
|
|
284
|
+
AddElementsDialog.prototype.addExtensibilityInfo = function(oExtensibilityInfo) {
|
|
285
|
+
const aContexts = oExtensibilityInfo?.extensionData;
|
|
263
286
|
// clear old values from last run
|
|
264
287
|
this._removeExtensionDataTexts();
|
|
265
288
|
|
|
266
289
|
var aBusinessContextTexts = this._oDialogModel.getObject("/businessContextTexts");
|
|
267
|
-
if (
|
|
268
|
-
|
|
290
|
+
if (aContexts && aContexts.length > 0) {
|
|
291
|
+
aContexts.forEach(function(oContext) {
|
|
269
292
|
aBusinessContextTexts.push({
|
|
270
293
|
text: oContext.description
|
|
271
294
|
});
|
|
@@ -279,14 +302,9 @@ sap.ui.define([
|
|
|
279
302
|
// set the container visible
|
|
280
303
|
this._setBusinessContextVisible(true);
|
|
281
304
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
// the first entry is always the "header" to be set by the implementation of FieldExtensibility
|
|
286
|
-
// it is set during the instantiation of the model, in the 'init' function
|
|
287
|
-
this._oDialogModel.setProperty("/businessContextTexts/0/text", oFieldExtensibilityTexts.headerText);
|
|
288
|
-
}
|
|
289
|
-
}.bind(this));
|
|
305
|
+
// the first entry is always the "header" to be set by the implementation of FieldExtensibility
|
|
306
|
+
// it is set during the instantiation of the model, in the 'init' function
|
|
307
|
+
this._oDialogModel.setProperty("/businessContextTexts/0/text", oExtensibilityInfo?.UITexts?.headerText);
|
|
290
308
|
};
|
|
291
309
|
|
|
292
310
|
/**
|
|
@@ -67,17 +67,47 @@ sap.ui.define([
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
async function
|
|
70
|
+
async function loadExtensibilityInfo(oControl) {
|
|
71
71
|
await FieldExtensibility.onControlSelected(oControl);
|
|
72
72
|
const bExtensibilityEnabled = await FieldExtensibility.isExtensibilityEnabled(oControl);
|
|
73
73
|
|
|
74
74
|
if (bExtensibilityEnabled) {
|
|
75
75
|
await isServiceUpToDate(oControl);
|
|
76
|
-
|
|
76
|
+
const oExtensibilityInfo = await FieldExtensibility.getExtensionData(oControl);
|
|
77
|
+
if (oExtensibilityInfo) {
|
|
78
|
+
oExtensibilityInfo.UITexts = await FieldExtensibility.getTexts() || {};
|
|
79
|
+
}
|
|
80
|
+
return oExtensibilityInfo;
|
|
77
81
|
}
|
|
78
82
|
return undefined;
|
|
79
83
|
}
|
|
80
84
|
|
|
85
|
+
// Configure the dialog elements related to extensibility
|
|
86
|
+
function configureExtensibility(bOverlayIsSibling) {
|
|
87
|
+
const oExtensibilityInfo = this.getExtensibilityInfo(bOverlayIsSibling);
|
|
88
|
+
if (!oExtensibilityInfo) {
|
|
89
|
+
this.getDialog().setCustomFieldButtonVisible(false);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const aExtensibilityOptions = oExtensibilityInfo.UITexts?.options;
|
|
93
|
+
if (!aExtensibilityOptions) {
|
|
94
|
+
// Legacy implementation (CustomFieldButton) does not have "options" in the UI Texts
|
|
95
|
+
const oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
|
|
96
|
+
oExtensibilityInfo.UITexts.options = [
|
|
97
|
+
{
|
|
98
|
+
actionKey: undefined,
|
|
99
|
+
text: oTextResources.getText("BTN_ADDITIONAL_ELEMENTS_CREATE_CUSTOM_FIELDS"),
|
|
100
|
+
tooltip: oExtensibilityInfo.UITexts.tooltip
|
|
101
|
+
}
|
|
102
|
+
];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
this.getDialog().setExtensibilityOptions(oExtensibilityInfo);
|
|
106
|
+
this.getDialog().detachEvent("triggerExtensibilityAction", this._onTriggerExtensibilityAction, this);
|
|
107
|
+
this.getDialog().attachEvent("triggerExtensibilityAction", bOverlayIsSibling, this._onTriggerExtensibilityAction, this);
|
|
108
|
+
this.getDialog().addExtensibilityInfo(oExtensibilityInfo);
|
|
109
|
+
}
|
|
110
|
+
|
|
81
111
|
/**
|
|
82
112
|
* Constructor for a new Additional Elements Plugin.
|
|
83
113
|
*
|
|
@@ -89,7 +119,7 @@ sap.ui.define([
|
|
|
89
119
|
* @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
|
|
90
120
|
* @extends sap.ui.rta.plugin.Plugin
|
|
91
121
|
* @author SAP SE
|
|
92
|
-
* @version 1.
|
|
122
|
+
* @version 1.123.0
|
|
93
123
|
* @constructor
|
|
94
124
|
* @private
|
|
95
125
|
* @since 1.44
|
|
@@ -260,19 +290,7 @@ sap.ui.define([
|
|
|
260
290
|
|
|
261
291
|
.then(function(aCollectedElements) {
|
|
262
292
|
aAllElements = aCollectedElements;
|
|
263
|
-
|
|
264
|
-
var oExtensibilityInfo = this.getExtensibilityInfo(bOverlayIsSibling);
|
|
265
|
-
this.getDialog().setCustomFieldEnabled(!!oExtensibilityInfo);
|
|
266
|
-
if (oExtensibilityInfo) {
|
|
267
|
-
this.getDialog().detachEvent("openCustomField", this._onOpenCustomField, this);
|
|
268
|
-
this.getDialog().attachEvent("openCustomField", bOverlayIsSibling, this._onOpenCustomField, this);
|
|
269
|
-
this.getDialog().setCustomFieldButtonVisible(true);
|
|
270
|
-
return this.getDialog().addExtensionData(oExtensibilityInfo.extensionData);
|
|
271
|
-
}
|
|
272
|
-
return this.getDialog().setCustomFieldButtonVisible(false);
|
|
273
|
-
}.bind(this))
|
|
274
|
-
|
|
275
|
-
.then(function() {
|
|
293
|
+
configureExtensibility.call(this, bOverlayIsSibling);
|
|
276
294
|
var oAggregationWithElements = aAllElements.filter(function(mElementsPerAggregation) {
|
|
277
295
|
return mElementsPerAggregation.aggregation === sAggregationName;
|
|
278
296
|
})[0];
|
|
@@ -337,9 +355,14 @@ sap.ui.define([
|
|
|
337
355
|
},
|
|
338
356
|
|
|
339
357
|
// Function called when custom field button was pressed
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
358
|
+
_onTriggerExtensibilityAction(oEvent, bOverlayIsSibling) {
|
|
359
|
+
const sRtaStyleClassName = Utils.getRtaStyleClassName();
|
|
360
|
+
const sActionKey = oEvent.getParameters().actionKey;
|
|
361
|
+
return FieldExtensibility.onTriggerCreateExtensionData(
|
|
362
|
+
this.getExtensibilityInfo(bOverlayIsSibling),
|
|
363
|
+
sRtaStyleClassName,
|
|
364
|
+
sActionKey
|
|
365
|
+
);
|
|
343
366
|
},
|
|
344
367
|
|
|
345
368
|
/**
|
|
@@ -440,7 +463,7 @@ sap.ui.define([
|
|
|
440
463
|
});
|
|
441
464
|
});
|
|
442
465
|
if (bCheckExtensibility) {
|
|
443
|
-
return
|
|
466
|
+
return loadExtensibilityInfo(mParents.parent);
|
|
444
467
|
}
|
|
445
468
|
return undefined;
|
|
446
469
|
})
|
|
@@ -119,7 +119,7 @@ sap.ui.define([
|
|
|
119
119
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
120
120
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
121
121
|
* @author SAP SE
|
|
122
|
-
* @version 1.
|
|
122
|
+
* @version 1.123.0
|
|
123
123
|
* @constructor
|
|
124
124
|
* @private
|
|
125
125
|
* @since 1.75
|