@openui5/sap.ui.rta 1.120.21 → 1.120.22
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 +1 -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 +6 -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 +8 -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/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 +3 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +117 -7
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +21 -4
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +48 -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/Personalization.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/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
|
@@ -77,7 +77,7 @@ sap.ui.define([
|
|
|
77
77
|
* @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
|
|
78
78
|
* @extends sap.ui.rta.plugin.Plugin
|
|
79
79
|
* @author SAP SE
|
|
80
|
-
* @version 1.120.
|
|
80
|
+
* @version 1.120.22
|
|
81
81
|
* @constructor
|
|
82
82
|
* @private
|
|
83
83
|
* @since 1.44
|
|
@@ -52,7 +52,8 @@ sap.ui.define([
|
|
|
52
52
|
width: sWidth,
|
|
53
53
|
height: sHeight,
|
|
54
54
|
title: mSettings.title,
|
|
55
|
-
useLegacyNavigation: mSettings.useLegacyNavigation
|
|
55
|
+
useLegacyNavigation: mSettings.useLegacyNavigation,
|
|
56
|
+
advancedSettings: mSettings.advancedSettings
|
|
56
57
|
}, oDesignTimeMetadata, sVariantManagementKey);
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -119,7 +120,7 @@ sap.ui.define([
|
|
|
119
120
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
120
121
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
121
122
|
* @author SAP SE
|
|
122
|
-
* @version 1.120.
|
|
123
|
+
* @version 1.120.22
|
|
123
124
|
* @constructor
|
|
124
125
|
* @private
|
|
125
126
|
* @since 1.75
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
contentWidth="50rem"
|
|
18
18
|
contentHeight="44rem"
|
|
19
19
|
core:require="{ FloatType: 'sap/ui/model/type/Float' }"
|
|
20
|
+
afterOpen="configureMultiInput"
|
|
20
21
|
>
|
|
21
22
|
<content>
|
|
22
|
-
|
|
23
23
|
<layout:VerticalLayout
|
|
24
24
|
id="sapUiRtaAddIFrameDialog_VL"
|
|
25
25
|
width="100%"
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
<ToolbarSpacer />
|
|
200
200
|
<Button
|
|
201
201
|
id="sapUiRtaAddIFrameDialog_PreviewButton"
|
|
202
|
-
enabled="{=${/previewUrl/value} !== ${/frameUrl/value} || ${/previewUseLegacyNavigation/value} !== ${/useLegacyNavigation/value}}"
|
|
202
|
+
enabled="{=${/previewUrl/value} !== ${/frameUrl/value} || ${/previewUseLegacyNavigation/value} !== ${/useLegacyNavigation/value} || ${/settingsUpdate/value}}"
|
|
203
203
|
text="{=${/previewUrl/value} === '' ? ${/text/showPreviewButton} : ${/text/updatePreviewButton} }"
|
|
204
204
|
press="onShowPreview"
|
|
205
205
|
class="sapUiTinyMarginTop sapUiRtaAddIFrameDialogPreviewButton" />
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
<Link
|
|
210
210
|
id="sapUiRtaAddIFrameDialog_PreviewLink"
|
|
211
211
|
class="sapUiRtaAddIFrameDialogPreviewLink"
|
|
212
|
-
href="{/previewUrl/value}" text="{/previewUrl/value}" wrapping="true" visible="{= !!${/previewUrl/value} }" />
|
|
212
|
+
href="{/previewUrl/value}" text="{/previewUrl/value}" wrapping="true" visible="{= !!${/previewUrl/value} }" target="_blank" />
|
|
213
213
|
</content>
|
|
214
214
|
</Panel>
|
|
215
215
|
</layout:Grid>
|
|
@@ -236,7 +236,8 @@
|
|
|
236
236
|
title="{/text/previewFrameLabel}"
|
|
237
237
|
useLegacyNavigation="{/previewUseLegacyNavigation/value/}"
|
|
238
238
|
class="sapUiRtaAddIFrameDialogPreviewFrame"
|
|
239
|
-
visible="{= !!${/previewUrl/value} }"
|
|
239
|
+
visible="{= !!${/previewUrl/value} }"
|
|
240
|
+
advancedSettings="{/advancedSettings/value}" />
|
|
240
241
|
</items>
|
|
241
242
|
</VBox>
|
|
242
243
|
</layout:Grid>
|
|
@@ -261,7 +262,7 @@
|
|
|
261
262
|
<content>
|
|
262
263
|
<HBox
|
|
263
264
|
alignItems="Center"
|
|
264
|
-
class="sapUiRtaAddIFrameDialogLegacyNavigationContainer">
|
|
265
|
+
class="sapUiRtaAddIFrameDialogLegacyNavigationContainer sapUiLargeMarginBottom">
|
|
265
266
|
<Switch
|
|
266
267
|
id="sapUiRtaAddIFrameDialog_UseLegacyNavigationToggle"
|
|
267
268
|
customTextOn=" "
|
|
@@ -274,7 +275,117 @@
|
|
|
274
275
|
type="Transparent"
|
|
275
276
|
press="onLegacyNavigationInfoPress"
|
|
276
277
|
ariaHasPopup="Dialog" />
|
|
277
|
-
|
|
278
|
+
</HBox>
|
|
279
|
+
<MessageStrip
|
|
280
|
+
id="sapUiRtaAddIFrameDialog_SecurityWarningMessage"
|
|
281
|
+
text="{/text/additionalParametersSecurityWarningText}"
|
|
282
|
+
type="Warning"
|
|
283
|
+
showIcon="true"
|
|
284
|
+
showCloseButton="true"
|
|
285
|
+
class="sapUiSmallMarginBottom">
|
|
286
|
+
<link>
|
|
287
|
+
<Link text="{/text/additionalParametersWarningMoreInfoText}"
|
|
288
|
+
target="_blank"
|
|
289
|
+
href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#sandbox"/>
|
|
290
|
+
</link>
|
|
291
|
+
</MessageStrip>
|
|
292
|
+
<form:Form editable="true">
|
|
293
|
+
<form:layout>
|
|
294
|
+
<form:ResponsiveGridLayout
|
|
295
|
+
id="sapUiRtaAddIFrameDialog_SanboxPropertiesForm"
|
|
296
|
+
adjustLabelSpan="false" singleContainerFullSize="false"
|
|
297
|
+
labelSpanXL="6" labelSpanL="6" labelSpanM="6" labelSpanS="12"
|
|
298
|
+
columnsXL="2" columnsL="2" columnsM="2"/>
|
|
299
|
+
</form:layout>
|
|
300
|
+
<form:FormContainer>
|
|
301
|
+
<form:FormElement label="allow-forms">
|
|
302
|
+
<Switch
|
|
303
|
+
change="onSwitchChange"
|
|
304
|
+
id="sapUiRtaAddIFrameDialog_allowFormsSwitch"
|
|
305
|
+
customTextOn=" "
|
|
306
|
+
customTextOff=" "
|
|
307
|
+
state="{/advancedSettings/value/allowForms}" />
|
|
308
|
+
</form:FormElement>
|
|
309
|
+
<form:FormElement label="allow-scripts">
|
|
310
|
+
<Switch
|
|
311
|
+
change="onSwitchChange"
|
|
312
|
+
id="sapUiRtaAddIFrameDialog_allowScriptsSwitch"
|
|
313
|
+
customTextOn=" "
|
|
314
|
+
customTextOff=" "
|
|
315
|
+
state="{/advancedSettings/value/allowScripts}" />
|
|
316
|
+
</form:FormElement>
|
|
317
|
+
<form:FormElement label="allow-same-origin">
|
|
318
|
+
<Switch
|
|
319
|
+
change="onSwitchChange"
|
|
320
|
+
id="sapUiRtaAddIFrameDialog_allowSameOriginSwitch"
|
|
321
|
+
customTextOn=" "
|
|
322
|
+
customTextOff=" "
|
|
323
|
+
state="{/advancedSettings/value/allowSameOrigin}" />
|
|
324
|
+
</form:FormElement>
|
|
325
|
+
<form:FormElement label="allow-popups">
|
|
326
|
+
<Switch
|
|
327
|
+
change="onSwitchChange"
|
|
328
|
+
id="sapUiRtaAddIFrameDialog_allowPopupsSwitch"
|
|
329
|
+
customTextOn=" "
|
|
330
|
+
customTextOff=" "
|
|
331
|
+
state="{/advancedSettings/value/allowPopups}" />
|
|
332
|
+
</form:FormElement>
|
|
333
|
+
<form:FormElement label="allow-modals">
|
|
334
|
+
<Switch
|
|
335
|
+
change="onSwitchChange"
|
|
336
|
+
id="sapUiRtaAddIFrameDialog_allowModalsSwitch"
|
|
337
|
+
customTextOn=" "
|
|
338
|
+
customTextOff=" "
|
|
339
|
+
state="{/advancedSettings/value/allowModals}" />
|
|
340
|
+
</form:FormElement>
|
|
341
|
+
</form:FormContainer>
|
|
342
|
+
<form:FormContainer>
|
|
343
|
+
<form:FormElement label="allow-top-navigation">
|
|
344
|
+
<Switch
|
|
345
|
+
change="onSwitchChange"
|
|
346
|
+
id="sapUiRtaAddIFrameDialog_allowTopNavigationSwitch"
|
|
347
|
+
customTextOn=" "
|
|
348
|
+
customTextOff=" "
|
|
349
|
+
state="{/advancedSettings/value/allowTopNavigation}" />
|
|
350
|
+
</form:FormElement>
|
|
351
|
+
<form:FormElement label="allow-downloads">
|
|
352
|
+
<Switch
|
|
353
|
+
change="onSwitchChange"
|
|
354
|
+
id="sapUiRtaAddIFrameDialog_allowDownloadsSwitch"
|
|
355
|
+
customTextOn=" "
|
|
356
|
+
customTextOff=" "
|
|
357
|
+
state="{/advancedSettings/value/allowDownloads}" />
|
|
358
|
+
</form:FormElement>
|
|
359
|
+
<form:FormElement label="allow-downloads-without-user-activation">
|
|
360
|
+
<Switch
|
|
361
|
+
change="onSwitchChange"
|
|
362
|
+
id="sapUiRtaAddIFrameDialog_allowDownloadsWithoutUserActivationSwitch"
|
|
363
|
+
customTextOn=" "
|
|
364
|
+
customTextOff=" "
|
|
365
|
+
state="{/advancedSettings/value/allowDownloadsWithoutUserActivation}" />
|
|
366
|
+
</form:FormElement>
|
|
367
|
+
<form:FormElement>
|
|
368
|
+
<Label
|
|
369
|
+
id="sapUiRtaAddIFrameDialog_AddAdditionalParametersLabel"
|
|
370
|
+
class="sapUiSmallMarginTop"
|
|
371
|
+
text="{/text/additionalSandboxParametersLabel}"
|
|
372
|
+
labelFor="sapUiRtaAddIFrameDialog_AddAdditionalParametersInput" />
|
|
373
|
+
</form:FormElement>
|
|
374
|
+
<form:FormElement>
|
|
375
|
+
<MultiInput
|
|
376
|
+
id="sapUiRtaAddIFrameDialog_AddAdditionalParametersInput"
|
|
377
|
+
placeholder="{/text/additionalSandboxParametersPlaceholder}"
|
|
378
|
+
showValueHelp="false"
|
|
379
|
+
tokenUpdate="onTokenUpdate"
|
|
380
|
+
tokens="{/advancedSettings/value/additionalSandboxParameters}"
|
|
381
|
+
ariaLabelledBy="sapUiRtaAddIFrameDialog_AddAdditionalParametersLabel">
|
|
382
|
+
<tokens>
|
|
383
|
+
<Token text="{}" key="{}"/>
|
|
384
|
+
</tokens>
|
|
385
|
+
</MultiInput>
|
|
386
|
+
</form:FormElement>
|
|
387
|
+
</form:FormContainer>
|
|
388
|
+
</form:Form>
|
|
278
389
|
</content>
|
|
279
390
|
</Panel>
|
|
280
391
|
</layout:Grid>
|
|
@@ -285,7 +396,6 @@
|
|
|
285
396
|
<core:InvisibleText id="sapUiRtaAddIFrameDialog_HeightUnitLabel" text="{/text/heightUnitLabel}"/>
|
|
286
397
|
<core:InvisibleText id="sapUiRtaAddIFrameDialog_ParameterSearchLabel" text="{/text/parameterSearchLabel}"/>
|
|
287
398
|
</content>
|
|
288
|
-
|
|
289
399
|
<beginButton>
|
|
290
400
|
<Button
|
|
291
401
|
id="sapUiRtaAddIFrameDialogSaveButton"
|
|
@@ -64,10 +64,14 @@ sap.ui.define([
|
|
|
64
64
|
selectAdditionalTextRem: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_REM"),
|
|
65
65
|
advancedSettingsTitle: _oTextResources.getText("IFRAME_ADDIFRAME_ADVANCED_SETTINGS"),
|
|
66
66
|
useLegacyNavigationLabel: _oTextResources.getText("IFRAME_ADDIFRAME_USE_LEGACY_NAVIGATION"),
|
|
67
|
-
useLegacyNavigationInfo: _oTextResources.getText("IFRAME_ADDIFRAME_USE_LEGACY_NAVIGATION_INFO")
|
|
67
|
+
useLegacyNavigationInfo: _oTextResources.getText("IFRAME_ADDIFRAME_USE_LEGACY_NAVIGATION_INFO"),
|
|
68
|
+
additionalParametersSecurityWarningText: _oTextResources.getText("IFRAME_ADDIFRAME_ADDITIONAL_PARAMETERS_SECURITY_WARNING_TEXT"),
|
|
69
|
+
additionalParametersWarningMoreInfoText: _oTextResources.getText("IFRAME_ADDIFRAME_ADDITIONAL_PARAMETERS_WARNING_MORE_INFO_TEXT"),
|
|
70
|
+
additionalSandboxParametersLabel: _oTextResources.getText("IFRAME_ADDIFRAME_ADD_ADDITIONAL_SANDBOX_PARAMETERS_LABEL"),
|
|
71
|
+
additionalSandboxParametersPlaceholder: _oTextResources.getText("IFRAME_ADDIFRAME_ADD_ADDITIONAL_SANDBOX_PARAMETERS_PLACEHOLDER")
|
|
68
72
|
};
|
|
69
73
|
|
|
70
|
-
function createJSONModel(bSetUpdateTitle, bAsContainer, sFrameWidthValue, sFrameHeightValue, bUseLegacyNavigation) {
|
|
74
|
+
function createJSONModel(bSetUpdateTitle, bAsContainer, sFrameWidthValue, sFrameHeightValue, bUseLegacyNavigation, oAdvancedSettings) {
|
|
71
75
|
_mText.dialogTitle = bSetUpdateTitle ? _mText.dialogUpdateTitle : _mText.dialogCreateTitle;
|
|
72
76
|
|
|
73
77
|
var sSelectAdditionalTextPercent = bAsContainer
|
|
@@ -134,6 +138,18 @@ sap.ui.define([
|
|
|
134
138
|
},
|
|
135
139
|
previewUseLegacyNavigation: {
|
|
136
140
|
value: !!bUseLegacyNavigation
|
|
141
|
+
},
|
|
142
|
+
advancedSettings: {
|
|
143
|
+
value: {
|
|
144
|
+
allowForms: true,
|
|
145
|
+
allowScripts: true,
|
|
146
|
+
allowSameOrigin: true,
|
|
147
|
+
additionalSandboxParameters: [],
|
|
148
|
+
...oAdvancedSettings
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
settingsUpdate: {
|
|
152
|
+
value: false
|
|
137
153
|
}
|
|
138
154
|
});
|
|
139
155
|
}
|
|
@@ -144,7 +160,7 @@ sap.ui.define([
|
|
|
144
160
|
* @class Context - Dialog for IFrame settings in Runtime Authoring
|
|
145
161
|
* @extends sap.ui.base.ManagedObject
|
|
146
162
|
* @author SAP SE
|
|
147
|
-
* @version 1.120.
|
|
163
|
+
* @version 1.120.22
|
|
148
164
|
* @constructor
|
|
149
165
|
* @private
|
|
150
166
|
* @since 1.78
|
|
@@ -185,7 +201,8 @@ sap.ui.define([
|
|
|
185
201
|
!!mSettings?.asContainer,
|
|
186
202
|
mSettings?.frameWidth,
|
|
187
203
|
mSettings?.frameHeight,
|
|
188
|
-
mSettings?.useLegacyNavigation
|
|
204
|
+
mSettings?.useLegacyNavigation,
|
|
205
|
+
mSettings?.advancedSettings
|
|
189
206
|
);
|
|
190
207
|
this._oController = new AddIFrameDialogController(this._oJSONModel, mSettings);
|
|
191
208
|
Fragment.load({
|
|
@@ -7,6 +7,7 @@ sap.ui.define([
|
|
|
7
7
|
"sap/base/Log",
|
|
8
8
|
"sap/m/Popover",
|
|
9
9
|
"sap/m/Text",
|
|
10
|
+
"sap/m/Token",
|
|
10
11
|
"sap/ui/core/mvc/Controller",
|
|
11
12
|
"sap/ui/core/Element",
|
|
12
13
|
"sap/ui/core/library",
|
|
@@ -20,6 +21,7 @@ sap.ui.define([
|
|
|
20
21
|
Log,
|
|
21
22
|
Popover,
|
|
22
23
|
Text,
|
|
24
|
+
Token,
|
|
23
25
|
Controller,
|
|
24
26
|
Element,
|
|
25
27
|
coreLibrary,
|
|
@@ -37,12 +39,17 @@ sap.ui.define([
|
|
|
37
39
|
|
|
38
40
|
var _aTextInputFields = ["frameUrl", "title"];
|
|
39
41
|
var _aNumericInputFields = ["frameWidth", "frameHeight"];
|
|
40
|
-
var _aOtherInputFields = ["frameWidthUnit", "frameHeightUnit", "useLegacyNavigation"];
|
|
42
|
+
var _aOtherInputFields = ["frameWidthUnit", "frameHeightUnit", "useLegacyNavigation", "advancedSettings"];
|
|
41
43
|
|
|
42
44
|
function isValidUrl(sUrl) {
|
|
43
45
|
return IFrame.isValidUrl(encodeURI(sUrl));
|
|
44
46
|
}
|
|
45
47
|
|
|
48
|
+
function multiInputValidator(oValue) {
|
|
49
|
+
const sText = oValue.text;
|
|
50
|
+
return new Token({key: sText, text: sText});
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
return Controller.extend("sap.ui.rta.plugin.iframe.AddIFrameDialogController", {
|
|
47
54
|
// eslint-disable-next-line object-shorthand
|
|
48
55
|
constructor: function(oJSONModel, mSettings) {
|
|
@@ -51,6 +58,39 @@ sap.ui.define([
|
|
|
51
58
|
this._mParameterHashMap = this._buildParameterHashMap(mSettings);
|
|
52
59
|
},
|
|
53
60
|
|
|
61
|
+
configureMultiInput() {
|
|
62
|
+
// This syntax is the suggested way by the UI5 documentation to trigger a submit on the input field on focus loss
|
|
63
|
+
const oMultiInput = Element.getElementById("sapUiRtaAddIFrameDialog_AddAdditionalParametersInput");
|
|
64
|
+
oMultiInput.addValidator(multiInputValidator);
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
onSwitchChange() {
|
|
68
|
+
this._oJSONModel.setProperty("/settingsUpdate/value", true);
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Event handler for token update
|
|
73
|
+
* @param {sap.ui.base.Event} oEvent - Event
|
|
74
|
+
*/
|
|
75
|
+
onTokenUpdate(oEvent) {
|
|
76
|
+
let aSandboxParameters = this._oJSONModel.getProperty("/advancedSettings/value/additionalSandboxParameters");
|
|
77
|
+
|
|
78
|
+
if (oEvent.getParameter("type") === "added") {
|
|
79
|
+
oEvent.getParameter("addedTokens").forEach(function(oToken) {
|
|
80
|
+
aSandboxParameters = [...aSandboxParameters, oToken.getText()];
|
|
81
|
+
});
|
|
82
|
+
} else if (oEvent.getParameter("type") === "removed") {
|
|
83
|
+
oEvent.getParameter("removedTokens").forEach(function(oToken) {
|
|
84
|
+
aSandboxParameters = aSandboxParameters.filter(function(sText) {
|
|
85
|
+
return sText !== oToken.getText();
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
this._oJSONModel.setProperty("/advancedSettings/value/additionalSandboxParameters", aSandboxParameters);
|
|
91
|
+
this._oJSONModel.setProperty("/settingsUpdate/value", true);
|
|
92
|
+
},
|
|
93
|
+
|
|
54
94
|
/**
|
|
55
95
|
* Event handler for validation success
|
|
56
96
|
* @param {sap.ui.base.Event} oEvent - Event
|
|
@@ -109,6 +149,9 @@ sap.ui.define([
|
|
|
109
149
|
this._oJSONModel.getProperty("/useLegacyNavigation/value")
|
|
110
150
|
);
|
|
111
151
|
oIFrame.setUrl(sURL);
|
|
152
|
+
this._oJSONModel.setProperty("/settingsUpdate/value", false);
|
|
153
|
+
|
|
154
|
+
oIFrame.applySettings({ url: sURL, advancedSettings: {...this._oJSONModel.getProperty("/advancedSettings/value")} });
|
|
112
155
|
} catch (oError) {
|
|
113
156
|
Log.error("Error previewing the URL: ", oError);
|
|
114
157
|
}
|
|
@@ -317,6 +360,10 @@ sap.ui.define([
|
|
|
317
360
|
Object.keys(mSettings).forEach(function(sFieldName) {
|
|
318
361
|
if (sFieldName === "frameWidth" || sFieldName === "frameHeight") {
|
|
319
362
|
this._importIFrameSize(sFieldName, mSettings[sFieldName]);
|
|
363
|
+
} else if (sFieldName === "advancedSettings" && !mSettings[sFieldName]) {
|
|
364
|
+
// legacy iframes do not have advancedSettings properties so we need to skip the setProperty
|
|
365
|
+
// on the json model to not overwrite the default values with undefined
|
|
366
|
+
return;
|
|
320
367
|
} else {
|
|
321
368
|
this._oJSONModel.setProperty(`/${sFieldName}/value`, mSettings[sFieldName]);
|
|
322
369
|
}
|
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
|
|
45
45
|
* @author SAP SE
|
|
46
46
|
* @since 1.84.0
|
|
47
|
-
* @version 1.120.
|
|
47
|
+
* @version 1.120.22
|
|
48
48
|
* @private
|
|
49
49
|
*/
|
|
50
50
|
var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
|
|
40
40
|
* @author SAP SE
|
|
41
41
|
* @since 1.86.0
|
|
42
|
-
* @version 1.120.
|
|
42
|
+
* @version 1.120.22
|
|
43
43
|
* @private
|
|
44
44
|
*/
|
|
45
45
|
var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
|
|
@@ -86,7 +86,7 @@ sap.ui.define([
|
|
|
86
86
|
* @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
|
|
87
87
|
* @author SAP SE
|
|
88
88
|
* @since 1.84.0
|
|
89
|
-
* @version 1.120.
|
|
89
|
+
* @version 1.120.22
|
|
90
90
|
* @private
|
|
91
91
|
*/
|
|
92
92
|
var ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
|