@openui5/sap.ui.rta 1.108.18 → 1.108.20
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/THIRDPARTY.txt +1 -1
- 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 +6 -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 +48 -11
- package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
- 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 +26 -5
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +4 -4
- 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 +45 -3
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +16 -5
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +31 -4
- 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/themes/base/AddIFrame.less +6 -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/SaveAsContextBasedAdaptation.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
|
@@ -6,14 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
// Provides class sap.ui.rta.plugin.Plugin.
|
|
8
8
|
sap.ui.define([
|
|
9
|
+
"sap/base/util/restricted/_debounce",
|
|
9
10
|
"sap/ui/dt/Plugin",
|
|
10
11
|
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
11
12
|
"sap/ui/dt/OverlayRegistry",
|
|
12
13
|
"sap/ui/dt/OverlayUtil",
|
|
13
14
|
"sap/ui/fl/changeHandler/JsControlTreeModifier",
|
|
14
15
|
"sap/ui/rta/util/hasStableId"
|
|
15
|
-
],
|
|
16
|
-
|
|
16
|
+
], function(
|
|
17
|
+
debounce,
|
|
17
18
|
Plugin,
|
|
18
19
|
ChangesWriteAPI,
|
|
19
20
|
OverlayRegistry,
|
|
@@ -69,7 +70,7 @@ function(
|
|
|
69
70
|
* @extends sap.ui.dt.Plugin
|
|
70
71
|
*
|
|
71
72
|
* @author SAP SE
|
|
72
|
-
* @version 1.108.
|
|
73
|
+
* @version 1.108.20
|
|
73
74
|
*
|
|
74
75
|
* @constructor
|
|
75
76
|
* @private
|
|
@@ -125,7 +126,39 @@ function(
|
|
|
125
126
|
}
|
|
126
127
|
};
|
|
127
128
|
|
|
129
|
+
function debounceFunction(mDebounceFunctions, oOverlay, sName, fnOriginalFunction) {
|
|
130
|
+
// Create debounced function for the given parameters if it was not created before
|
|
131
|
+
var sOverlayId = oOverlay.getId();
|
|
132
|
+
if (!mDebounceFunctions[sOverlayId]) {
|
|
133
|
+
mDebounceFunctions[sOverlayId] = {};
|
|
134
|
+
}
|
|
135
|
+
if (!mDebounceFunctions[sOverlayId][sName]) {
|
|
136
|
+
// Debounce with approximately one frame to cover multiple synchronous calls
|
|
137
|
+
// without causing a huge delay
|
|
138
|
+
mDebounceFunctions[sOverlayId][sName] = debounce(fnOriginalFunction, 16);
|
|
139
|
+
}
|
|
140
|
+
// Execute the function
|
|
141
|
+
mDebounceFunctions[sOverlayId][sName]();
|
|
142
|
+
}
|
|
143
|
+
|
|
128
144
|
var _onElementModified = function (oEvent) {
|
|
145
|
+
// Initialize here because plugins may not extend the rta.Plugin and
|
|
146
|
+
// instead inherit the method via rta.Utils.extendWith
|
|
147
|
+
// Therefore the constructor/init might not be properly called
|
|
148
|
+
if (!this._mDebounceFunctions) {
|
|
149
|
+
// The _onElementModified callback might be triggered many times in a row, e.g.
|
|
150
|
+
// by SimpleForms which add all aggregation items one by one
|
|
151
|
+
// Since the resulting editable checks in the plugins can be expensive async functions
|
|
152
|
+
// the calls are debounced
|
|
153
|
+
this._mDebounceFunctions = {
|
|
154
|
+
// Make sure that all closure variables of the debounced function
|
|
155
|
+
// are part of the map key:
|
|
156
|
+
// [overlayId][oEvent.getParameters().name]: function
|
|
157
|
+
insertOrRemove: {},
|
|
158
|
+
addOrSet: {}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
129
162
|
var oParams = oEvent.getParameters();
|
|
130
163
|
var aRelevantOverlays;
|
|
131
164
|
var oOverlay = oEvent.getSource();
|
|
@@ -150,18 +183,22 @@ function(
|
|
|
150
183
|
oParams.type === "insertAggregation"
|
|
151
184
|
|| oParams.type === "removeAggregation"
|
|
152
185
|
) {
|
|
153
|
-
|
|
154
|
-
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
155
|
-
} else if (oParams.type === "addOrSetAggregation") {
|
|
156
|
-
if (this.getDesignTime().getStatus() === "synced") {
|
|
186
|
+
debounceFunction(this._mDebounceFunctions["insertOrRemove"], oOverlay, oParams.name, function() {
|
|
157
187
|
aRelevantOverlays = this._getRelevantOverlays(oOverlay, oParams.name);
|
|
158
188
|
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
159
|
-
}
|
|
160
|
-
|
|
189
|
+
}.bind(this));
|
|
190
|
+
} else if (oParams.type === "addOrSetAggregation") {
|
|
191
|
+
debounceFunction(this._mDebounceFunctions["addOrSet"], oOverlay, oParams.name, function() {
|
|
192
|
+
if (this.getDesignTime().getStatus() === "synced") {
|
|
161
193
|
aRelevantOverlays = this._getRelevantOverlays(oOverlay, oParams.name);
|
|
162
194
|
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
163
|
-
}
|
|
164
|
-
|
|
195
|
+
} else {
|
|
196
|
+
this.getDesignTime().attachEventOnce("synced", function () {
|
|
197
|
+
aRelevantOverlays = this._getRelevantOverlays(oOverlay, oParams.name);
|
|
198
|
+
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
199
|
+
}, this);
|
|
200
|
+
}
|
|
201
|
+
}.bind(this));
|
|
165
202
|
}
|
|
166
203
|
};
|
|
167
204
|
|
|
@@ -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.108.
|
|
38
|
+
* @version 1.108.20
|
|
39
39
|
*
|
|
40
40
|
* @constructor
|
|
41
41
|
* @private
|
|
@@ -109,7 +109,7 @@ function(
|
|
|
109
109
|
// Direct children of template aggregations should not be movable
|
|
110
110
|
// because their order is defined based on the underlying data
|
|
111
111
|
var oElement = oOverlay.getElement();
|
|
112
|
-
if (ElementUtil.isElementDirectTemplateChild(oElement)) {
|
|
112
|
+
if (oElement.isDestroyStarted() || ElementUtil.isElementDirectTemplateChild(oElement)) {
|
|
113
113
|
return Promise.resolve(false);
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -30,7 +30,7 @@ function (
|
|
|
30
30
|
* @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
|
|
31
31
|
* @extends sap.ui.rta.plugin.Plugin
|
|
32
32
|
* @author SAP SE
|
|
33
|
-
* @version 1.108.
|
|
33
|
+
* @version 1.108.20
|
|
34
34
|
* @constructor
|
|
35
35
|
* @private
|
|
36
36
|
* @since 1.34
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.108.
|
|
35
|
+
* @version 1.108.20
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.94
|
|
38
38
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -333,13 +333,13 @@ sap.ui.define([
|
|
|
333
333
|
*
|
|
334
334
|
* @return {Promise} Resolving to a structure with all "add/reveal" action relevant data collected
|
|
335
335
|
*/
|
|
336
|
-
ActionExtractor.getActions = function(bSibling, oSourceElementOverlay, oPlugin, bInvalidate) {
|
|
336
|
+
ActionExtractor.getActions = function(bSibling, oSourceElementOverlay, oPlugin, bInvalidate, oDesignTime) {
|
|
337
337
|
var sSiblingOrChild = bSibling ? "asSibling" : "asChild";
|
|
338
338
|
if (!bInvalidate && oSourceElementOverlay._mAddActions) {
|
|
339
339
|
return Promise.resolve(oSourceElementOverlay._mAddActions[sSiblingOrChild]);
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
-
var oRevealActionsPromise = this._getRevealActions(bSibling, oSourceElementOverlay, oPlugin);
|
|
342
|
+
var oRevealActionsPromise = this._getRevealActions(bSibling, oSourceElementOverlay, oPlugin, oDesignTime);
|
|
343
343
|
var oAddPropertyActionsPromise = this._getAddViaDelegateActions(bSibling, oSourceElementOverlay, oPlugin);
|
|
344
344
|
|
|
345
345
|
return Promise.all([
|
|
@@ -366,6 +366,9 @@ sap.ui.define([
|
|
|
366
366
|
return oOverlay._mAddActions && oOverlay._mAddActions[sSiblingOrChild];
|
|
367
367
|
};
|
|
368
368
|
|
|
369
|
+
var mRevealCache = {};
|
|
370
|
+
var bIsSyncRegistered = true;
|
|
371
|
+
|
|
369
372
|
/**
|
|
370
373
|
* Returns the Reveal actions data (parameters + elements) for an Overlay
|
|
371
374
|
* @param {boolean} bSibling - If source element overlay should be sibling or parent to the newly added fields
|
|
@@ -374,7 +377,15 @@ sap.ui.define([
|
|
|
374
377
|
*
|
|
375
378
|
* @returns {Promise<object>} Reveal action data
|
|
376
379
|
*/
|
|
377
|
-
ActionExtractor._getRevealActions = function(bSibling, oSourceElementOverlay, oPlugin) {
|
|
380
|
+
ActionExtractor._getRevealActions = function(bSibling, oSourceElementOverlay, oPlugin, oDesignTime) {
|
|
381
|
+
if (bIsSyncRegistered) {
|
|
382
|
+
bIsSyncRegistered = false;
|
|
383
|
+
oDesignTime.attachEventOnce("synced", function() {
|
|
384
|
+
mRevealCache = {};
|
|
385
|
+
bIsSyncRegistered = true;
|
|
386
|
+
}, this);
|
|
387
|
+
}
|
|
388
|
+
|
|
378
389
|
var mParents = AdditionalElementsUtils.getParents(bSibling, oSourceElementOverlay, oPlugin);
|
|
379
390
|
var aParents = [mParents.parentOverlay];
|
|
380
391
|
if (mParents.relevantContainer !== mParents.parent) {
|
|
@@ -386,6 +397,10 @@ sap.ui.define([
|
|
|
386
397
|
}
|
|
387
398
|
var aAggregationNames = [];
|
|
388
399
|
if (mParents.parentOverlay) {
|
|
400
|
+
var mCachedResult = mRevealCache[mParents.parentOverlay.getId()];
|
|
401
|
+
if (mCachedResult && bSibling) {
|
|
402
|
+
return mCachedResult;
|
|
403
|
+
}
|
|
389
404
|
aAggregationNames = mParents.parentOverlay.getAggregationOverlays().filter(function(oAggregationOverlay) {
|
|
390
405
|
return !oAggregationOverlay.getDesignTimeMetadata().isIgnored(mParents.parent);
|
|
391
406
|
}).map(function(oAggregationOverlay) {
|
|
@@ -395,7 +410,13 @@ sap.ui.define([
|
|
|
395
410
|
return oPreviousPromise.then(function(mReveal) {
|
|
396
411
|
return getRevealActionFromAggregations(aParents, mReveal, sAggregationName, aAggregationNames, oPlugin);
|
|
397
412
|
});
|
|
398
|
-
}, Promise.resolve({}))
|
|
413
|
+
}, Promise.resolve({}))
|
|
414
|
+
.then(function(mAggregatedReveal) {
|
|
415
|
+
if (bSibling) {
|
|
416
|
+
mRevealCache[mParents.parentOverlay.getId()] = mAggregatedReveal;
|
|
417
|
+
}
|
|
418
|
+
return mAggregatedReveal;
|
|
419
|
+
});
|
|
399
420
|
}
|
|
400
421
|
return Promise.resolve({});
|
|
401
422
|
};
|
|
@@ -75,7 +75,7 @@ sap.ui.define([
|
|
|
75
75
|
* @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
|
|
76
76
|
* @extends sap.ui.rta.plugin.Plugin
|
|
77
77
|
* @author SAP SE
|
|
78
|
-
* @version 1.108.
|
|
78
|
+
* @version 1.108.20
|
|
79
79
|
* @constructor
|
|
80
80
|
* @private
|
|
81
81
|
* @since 1.44
|
|
@@ -234,7 +234,7 @@ sap.ui.define([
|
|
|
234
234
|
var mActions;
|
|
235
235
|
var aAllElements = [];
|
|
236
236
|
|
|
237
|
-
return ActionExtractor.getActions(bOverlayIsSibling, oResponsibleElementOverlay, this)
|
|
237
|
+
return ActionExtractor.getActions(bOverlayIsSibling, oResponsibleElementOverlay, this, undefined, this.getDesignTime())
|
|
238
238
|
.then(function(mRetrievedActions) {
|
|
239
239
|
if (sAggregationName === "$$OnlyChildCustomField$$") {
|
|
240
240
|
return [];
|
|
@@ -343,7 +343,7 @@ sap.ui.define([
|
|
|
343
343
|
return false;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
return ActionExtractor.getActions(bOverlayIsSibling, oOverlay, this, true)
|
|
346
|
+
return ActionExtractor.getActions(bOverlayIsSibling, oOverlay, this, true, this.getDesignTime())
|
|
347
347
|
.then(function (mActions) {
|
|
348
348
|
this.clearCachedElements();
|
|
349
349
|
return Utils.doIfAllControlsAreAvailable([oOverlay, mParents.parentOverlay], function () {
|
|
@@ -397,7 +397,7 @@ sap.ui.define([
|
|
|
397
397
|
|
|
398
398
|
this.clearExtensibilityInfo(bOverlayIsSibling);
|
|
399
399
|
|
|
400
|
-
return ActionExtractor.getActions(bOverlayIsSibling, oElementOverlay, this)
|
|
400
|
+
return ActionExtractor.getActions(bOverlayIsSibling, oElementOverlay, this, undefined, this.getDesignTime())
|
|
401
401
|
.then(function(mAllActions) {
|
|
402
402
|
each(mAllActions, function(sAggregationName) {
|
|
403
403
|
mActions = mAllActions[sAggregationName];
|
|
@@ -15,7 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
* Helper object containing methods for the AdditionalElements plugin
|
|
16
16
|
*
|
|
17
17
|
* @author SAP SE
|
|
18
|
-
* @version 1.108.
|
|
18
|
+
* @version 1.108.20
|
|
19
19
|
* @private
|
|
20
20
|
* @since 1.94
|
|
21
21
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* Helper object to build the RTA commands resulting from the AdditionalElements Plugin
|
|
26
26
|
*
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.108.
|
|
28
|
+
* @version 1.108.20
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.94
|
|
31
31
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -48,7 +48,8 @@ sap.ui.define([
|
|
|
48
48
|
index: mSettings.index,
|
|
49
49
|
url: mSettings.frameUrl,
|
|
50
50
|
width: sWidth,
|
|
51
|
-
height: sHeight
|
|
51
|
+
height: sHeight,
|
|
52
|
+
useLegacyNavigation: mSettings.useLegacyNavigation
|
|
52
53
|
}, oDesignTimeMetadata, sVariantManagementKey);
|
|
53
54
|
}
|
|
54
55
|
|
|
@@ -110,7 +111,7 @@ sap.ui.define([
|
|
|
110
111
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
111
112
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
112
113
|
* @author SAP SE
|
|
113
|
-
* @version 1.108.
|
|
114
|
+
* @version 1.108.20
|
|
114
115
|
* @constructor
|
|
115
116
|
* @private
|
|
116
117
|
* @since 1.75
|
|
@@ -149,9 +149,12 @@
|
|
|
149
149
|
class="sapUiRtaAddIFrameDialogPreviewLinkTitle"
|
|
150
150
|
text="{/text/previewUrlLabel}" />
|
|
151
151
|
<ToolbarSpacer />
|
|
152
|
-
<Button
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
<Button
|
|
153
|
+
id="sapUiRtaAddIFrameDialog_PreviewButton"
|
|
154
|
+
enabled="{=${/previewUrl/value} !== ${/frameUrl/value} || ${/previewUseLegacyNavigation/value} !== ${/useLegacyNavigation/value}}"
|
|
155
|
+
text="{=${/previewUrl/value} === '' ? ${/text/showPreviewButton} : ${/text/updatePreviewButton} }"
|
|
156
|
+
press="onShowPreview"
|
|
157
|
+
class="sapUiTinyMarginTop sapUiRtaAddIFrameDialogPreviewButton" />
|
|
155
158
|
</OverflowToolbar>
|
|
156
159
|
</headerToolbar>
|
|
157
160
|
<content>
|
|
@@ -182,11 +185,50 @@
|
|
|
182
185
|
<util:IFrame
|
|
183
186
|
id="sapUiRtaAddIFrameDialog_PreviewFrame"
|
|
184
187
|
title="{/text/previewFrameLabel}"
|
|
188
|
+
useLegacyNavigation="{/previewUseLegacyNavigation/value/}"
|
|
185
189
|
class="sapUiRtaAddIFrameDialogPreviewFrame"
|
|
186
190
|
visible="{= !!${/previewUrl/value} }"/>
|
|
187
191
|
</items>
|
|
188
192
|
</VBox>
|
|
189
193
|
</layout:Grid>
|
|
194
|
+
<layout:Grid
|
|
195
|
+
class="sapUiRtaAddIFrameDialogPreviewLinkGrid"
|
|
196
|
+
containerQuery="true"
|
|
197
|
+
defaultSpan="XL12 L12 M12 S12">
|
|
198
|
+
<Panel
|
|
199
|
+
expandable="true"
|
|
200
|
+
width="auto"
|
|
201
|
+
expanded="false"
|
|
202
|
+
class="sapUiResponsiveMargin sapUiRtaAddIFrameDialogPreviewLinkPanel">
|
|
203
|
+
<headerToolbar>
|
|
204
|
+
<OverflowToolbar
|
|
205
|
+
class="sapUiRtaAddIFrameDialogPreviewLinkToolbar" height="3rem" style="Clear">
|
|
206
|
+
<Title
|
|
207
|
+
class="sapUiRtaAddIFrameDialogPreviewLinkTitle"
|
|
208
|
+
text="{/text/advancedSettingsTitle}" />
|
|
209
|
+
<ToolbarSpacer />
|
|
210
|
+
</OverflowToolbar>
|
|
211
|
+
</headerToolbar>
|
|
212
|
+
<content>
|
|
213
|
+
<HBox
|
|
214
|
+
alignItems="Center"
|
|
215
|
+
class="sapUiRtaAddIFrameDialogLegacyNavigationContainer">
|
|
216
|
+
<Switch
|
|
217
|
+
id="sapUiRtaAddIFrameDialog_UseLegacyNavigationToggle"
|
|
218
|
+
customTextOn=" "
|
|
219
|
+
customTextOff=" "
|
|
220
|
+
state="{/useLegacyNavigation/value}" />
|
|
221
|
+
<Label
|
|
222
|
+
text="{/text/useLegacyNavigationLabel}" />
|
|
223
|
+
<Button
|
|
224
|
+
icon="sap-icon://hint"
|
|
225
|
+
type="Transparent"
|
|
226
|
+
press="onLegacyNavigationInfoPress"
|
|
227
|
+
ariaHasPopup="Dialog" />
|
|
228
|
+
</HBox>
|
|
229
|
+
</content>
|
|
230
|
+
</Panel>
|
|
231
|
+
</layout:Grid>
|
|
190
232
|
</layout:VerticalLayout>
|
|
191
233
|
|
|
192
234
|
<!-- Invisible Texts for ARIA -->
|
|
@@ -51,10 +51,13 @@ sap.ui.define([
|
|
|
51
51
|
editUrlLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_EDIT_URL_LABEL"),
|
|
52
52
|
parametersLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_PARAMETERS_LABEL"),
|
|
53
53
|
columnParameterLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_TABLE_PARAMETER_LABEL"),
|
|
54
|
-
columnUiValueLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_TABLE_UI_VALUE_LABEL")
|
|
54
|
+
columnUiValueLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_TABLE_UI_VALUE_LABEL"),
|
|
55
|
+
advancedSettingsTitle: _oTextResources.getText("IFRAME_ADDIFRAME_ADVANCED_SETTINGS"),
|
|
56
|
+
useLegacyNavigationLabel: _oTextResources.getText("IFRAME_ADDIFRAME_USE_LEGACY_NAVIGATION"),
|
|
57
|
+
useLegacyNavigationInfo: _oTextResources.getText("IFRAME_ADDIFRAME_USE_LEGACY_NAVIGATION_INFO")
|
|
55
58
|
};
|
|
56
59
|
|
|
57
|
-
function createJSONModel(bSetUpdateTitle) {
|
|
60
|
+
function createJSONModel(bSetUpdateTitle, bUseLegacyNavigation) {
|
|
58
61
|
if (bSetUpdateTitle) {
|
|
59
62
|
_mText.dialogTitle = _mText.dialogUpdateTitle;
|
|
60
63
|
} else {
|
|
@@ -103,7 +106,13 @@ sap.ui.define([
|
|
|
103
106
|
name: "px"
|
|
104
107
|
}, {
|
|
105
108
|
name: "rem"
|
|
106
|
-
}]
|
|
109
|
+
}],
|
|
110
|
+
useLegacyNavigation: {
|
|
111
|
+
value: !!bUseLegacyNavigation
|
|
112
|
+
},
|
|
113
|
+
previewUseLegacyNavigation: {
|
|
114
|
+
value: !!bUseLegacyNavigation
|
|
115
|
+
}
|
|
107
116
|
});
|
|
108
117
|
}
|
|
109
118
|
|
|
@@ -113,7 +122,7 @@ sap.ui.define([
|
|
|
113
122
|
* @class Context - Dialog for IFrame settings in Runtime Authoring
|
|
114
123
|
* @extends sap.ui.base.ManagedObject
|
|
115
124
|
* @author SAP SE
|
|
116
|
-
* @version 1.108.
|
|
125
|
+
* @version 1.108.20
|
|
117
126
|
* @constructor
|
|
118
127
|
* @private
|
|
119
128
|
* @since 1.78
|
|
@@ -151,10 +160,12 @@ sap.ui.define([
|
|
|
151
160
|
AddIFrameDialog.prototype._createDialog = function(mSettings) {
|
|
152
161
|
// set the correct title
|
|
153
162
|
var bSetUpdateTitle = false;
|
|
163
|
+
var bUseLegacyNavigation = false;
|
|
154
164
|
if (mSettings) {
|
|
155
165
|
bSetUpdateTitle = mSettings.updateMode ? mSettings.updateMode : false;
|
|
166
|
+
bUseLegacyNavigation = mSettings.useLegacyNavigation;
|
|
156
167
|
}
|
|
157
|
-
this._oJSONModel = createJSONModel(bSetUpdateTitle);
|
|
168
|
+
this._oJSONModel = createJSONModel(bSetUpdateTitle, bUseLegacyNavigation);
|
|
158
169
|
this._oController = new AddIFrameDialogController(this._oJSONModel, mSettings);
|
|
159
170
|
Fragment.load({
|
|
160
171
|
name: "sap.ui.rta.plugin.iframe.AddIFrameDialog",
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/base/Log",
|
|
8
|
+
"sap/m/Popover",
|
|
9
|
+
"sap/m/Text",
|
|
8
10
|
"sap/ui/core/mvc/Controller",
|
|
9
11
|
"sap/ui/core/library",
|
|
10
12
|
"sap/ui/rta/Utils",
|
|
@@ -14,6 +16,8 @@ sap.ui.define([
|
|
|
14
16
|
"sap/ui/rta/plugin/iframe/urlCleaner"
|
|
15
17
|
], function(
|
|
16
18
|
Log,
|
|
19
|
+
Popover,
|
|
20
|
+
Text,
|
|
17
21
|
Controller,
|
|
18
22
|
coreLibrary,
|
|
19
23
|
Utils,
|
|
@@ -29,8 +33,8 @@ sap.ui.define([
|
|
|
29
33
|
|
|
30
34
|
var _aTextInputFields = ["frameUrl"];
|
|
31
35
|
var _aNumericInputFields = ["frameWidth", "frameHeight"];
|
|
32
|
-
var _aSelectInputFields = ["asNewSection", "frameWidthUnit", "frameHeightUnit"];
|
|
33
36
|
|
|
37
|
+
var _aOtherInputFields = ["asNewSection", "frameWidthUnit", "frameHeightUnit", "useLegacyNavigation"];
|
|
34
38
|
|
|
35
39
|
function isValidUrl(sUrl) {
|
|
36
40
|
return IFrame.isValidUrl(encodeURI(sUrl));
|
|
@@ -100,8 +104,7 @@ sap.ui.define([
|
|
|
100
104
|
return;
|
|
101
105
|
}
|
|
102
106
|
var oIFrame = sap.ui.getCore().byId("sapUiRtaAddIFrameDialog_PreviewFrame");
|
|
103
|
-
|
|
104
|
-
//enable/disable expanding the Panel
|
|
107
|
+
// enable/disable expanding the Panel
|
|
105
108
|
var oPanel = sap.ui.getCore().byId("sapUiRtaAddIFrameDialog_PreviewLinkPanel");
|
|
106
109
|
var oPanelButton = oPanel.getDependents()[0];
|
|
107
110
|
if (sURL) {
|
|
@@ -112,6 +115,10 @@ sap.ui.define([
|
|
|
112
115
|
}
|
|
113
116
|
try {
|
|
114
117
|
this._oJSONModel.setProperty("/previewUrl/value", sURL);
|
|
118
|
+
this._oJSONModel.setProperty(
|
|
119
|
+
"/previewUseLegacyNavigation/value",
|
|
120
|
+
this._oJSONModel.getProperty("/useLegacyNavigation/value")
|
|
121
|
+
);
|
|
115
122
|
oIFrame.setUrl(sURL);
|
|
116
123
|
} catch (oError) {
|
|
117
124
|
Log.error("Error previewing the URL: ", oError);
|
|
@@ -138,6 +145,26 @@ sap.ui.define([
|
|
|
138
145
|
oBinding.filter([oFilter]);
|
|
139
146
|
},
|
|
140
147
|
|
|
148
|
+
onLegacyNavigationInfoPress: function(oEvent) {
|
|
149
|
+
var oButton = oEvent.getSource();
|
|
150
|
+
if (!this._oPopover) {
|
|
151
|
+
this._oPopover = new Popover(
|
|
152
|
+
oButton.getId() + "-popover",
|
|
153
|
+
{
|
|
154
|
+
showHeader: false,
|
|
155
|
+
contentWidth: "400px",
|
|
156
|
+
content: [
|
|
157
|
+
new Text({
|
|
158
|
+
text: "{/text/useLegacyNavigationInfo}"
|
|
159
|
+
}).addStyleClass("sapUiSmallMargin")
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
oButton.addDependent(this._oPopover);
|
|
164
|
+
}
|
|
165
|
+
this._oPopover.openBy(oButton);
|
|
166
|
+
},
|
|
167
|
+
|
|
141
168
|
/**
|
|
142
169
|
* Build preview URL
|
|
143
170
|
*
|
|
@@ -250,7 +277,7 @@ sap.ui.define([
|
|
|
250
277
|
_buildReturnedSettings: function() {
|
|
251
278
|
var mSettings = {};
|
|
252
279
|
var oData = this._oJSONModel.getData();
|
|
253
|
-
_aTextInputFields.concat(_aNumericInputFields,
|
|
280
|
+
_aTextInputFields.concat(_aNumericInputFields, _aOtherInputFields).forEach(function(sFieldName) {
|
|
254
281
|
var sValue = oData[sFieldName].value;
|
|
255
282
|
if (sFieldName === "frameUrl") {
|
|
256
283
|
sValue = urlCleaner(sValue);
|
|
@@ -107,9 +107,14 @@
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
.sapUiRtaAddIFrameDialogLegacyNavigationContainer > div {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
}
|
|
114
|
+
|
|
110
115
|
.sapUiRtaAddIFrameDialogPreviewGrid {
|
|
111
116
|
padding: 0;
|
|
112
|
-
margin: 0 1rem;
|
|
117
|
+
margin: 0 1rem 1rem;
|
|
113
118
|
background: @_sap_ui_rta_AddIFrame_PreviewBG;
|
|
114
119
|
border: 0.0625rem solid @_sap_ui_rta_AddIFrame_BorderColor; //1px
|
|
115
120
|
|