@openui5/sap.ui.rta 1.112.2 → 1.114.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/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 +111 -21
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +6 -5
- 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 +93 -76
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +40 -4
- package/src/sap/ui/rta/messagebundle_ar.properties +21 -6
- package/src/sap/ui/rta/messagebundle_bg.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ca.properties +21 -6
- package/src/sap/ui/rta/messagebundle_cs.properties +21 -6
- package/src/sap/ui/rta/messagebundle_cy.properties +21 -6
- package/src/sap/ui/rta/messagebundle_da.properties +21 -6
- package/src/sap/ui/rta/messagebundle_de.properties +21 -6
- package/src/sap/ui/rta/messagebundle_el.properties +21 -6
- package/src/sap/ui/rta/messagebundle_en.properties +18 -3
- package/src/sap/ui/rta/messagebundle_en_GB.properties +18 -3
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +15 -3
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +13 -3
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +18 -3
- package/src/sap/ui/rta/messagebundle_es.properties +21 -6
- package/src/sap/ui/rta/messagebundle_es_MX.properties +21 -6
- package/src/sap/ui/rta/messagebundle_et.properties +21 -6
- package/src/sap/ui/rta/messagebundle_fi.properties +21 -6
- package/src/sap/ui/rta/messagebundle_fr.properties +21 -6
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +21 -6
- package/src/sap/ui/rta/messagebundle_hi.properties +21 -6
- package/src/sap/ui/rta/messagebundle_hr.properties +21 -6
- package/src/sap/ui/rta/messagebundle_hu.properties +21 -6
- package/src/sap/ui/rta/messagebundle_id.properties +21 -6
- package/src/sap/ui/rta/messagebundle_it.properties +21 -6
- package/src/sap/ui/rta/messagebundle_iw.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ja.properties +21 -6
- package/src/sap/ui/rta/messagebundle_kk.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ko.properties +21 -6
- package/src/sap/ui/rta/messagebundle_lt.properties +21 -6
- package/src/sap/ui/rta/messagebundle_lv.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ms.properties +21 -6
- package/src/sap/ui/rta/messagebundle_nl.properties +21 -6
- package/src/sap/ui/rta/messagebundle_no.properties +21 -6
- package/src/sap/ui/rta/messagebundle_pl.properties +21 -6
- package/src/sap/ui/rta/messagebundle_pt.properties +21 -6
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ro.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ru.properties +21 -6
- package/src/sap/ui/rta/messagebundle_sh.properties +21 -6
- package/src/sap/ui/rta/messagebundle_sk.properties +21 -6
- package/src/sap/ui/rta/messagebundle_sl.properties +21 -6
- package/src/sap/ui/rta/messagebundle_sv.properties +21 -6
- package/src/sap/ui/rta/messagebundle_th.properties +21 -6
- package/src/sap/ui/rta/messagebundle_tr.properties +21 -6
- package/src/sap/ui/rta/messagebundle_uk.properties +21 -6
- package/src/sap/ui/rta/messagebundle_vi.properties +21 -6
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +21 -6
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +21 -6
- 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 +2 -2
- 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 +3 -3
- 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 +75 -66
- 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 +2 -22
- 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 +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +39 -21
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +48 -19
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -16
- 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 +4 -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/ActionsMenu.fragment.xml +0 -6
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +59 -20
- package/src/sap/ui/rta/toolbar/Adaptation.js +95 -13
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +24 -0
- 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/ManageAdaptations.js +30 -32
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +3 -15
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +130 -49
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +12 -10
- 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 +6 -3
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +15 -6
- package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +16 -9
- package/src/sap/ui/rta/util/validateStableIds.js +5 -2
package/THIRDPARTY.txt
CHANGED
|
@@ -478,7 +478,7 @@ License: Apache-2.0
|
|
|
478
478
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
479
479
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
480
480
|
|
|
481
|
-
Component: SAP Theming Base Content, version: 11.
|
|
481
|
+
Component: SAP Theming Base Content, version: 11.3.0
|
|
482
482
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
483
483
|
License: Apache-2.0
|
|
484
484
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.rta",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.114.0",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.rta",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.m": "1.
|
|
18
|
-
"@openui5/sap.ui.core": "1.
|
|
19
|
-
"@openui5/sap.ui.dt": "1.
|
|
20
|
-
"@openui5/sap.ui.fl": "1.
|
|
21
|
-
"@openui5/sap.ui.layout": "1.
|
|
17
|
+
"@openui5/sap.m": "1.114.0",
|
|
18
|
+
"@openui5/sap.ui.core": "1.114.0",
|
|
19
|
+
"@openui5/sap.ui.dt": "1.114.0",
|
|
20
|
+
"@openui5/sap.ui.fl": "1.114.0",
|
|
21
|
+
"@openui5/sap.ui.layout": "1.114.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/src/sap/ui/rta/.library
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.114.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with RTA controls.</documentation>
|
|
12
12
|
|
package/src/sap/ui/rta/Client.js
CHANGED
|
@@ -15,6 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/thirdparty/jquery",
|
|
16
16
|
"sap/ui/base/ManagedObject",
|
|
17
17
|
"sap/ui/core/BusyIndicator",
|
|
18
|
+
"sap/ui/core/Core",
|
|
18
19
|
"sap/ui/dt/DesignTime",
|
|
19
20
|
"sap/ui/dt/DOMUtil",
|
|
20
21
|
"sap/ui/dt/ElementUtil",
|
|
@@ -22,6 +23,7 @@ sap.ui.define([
|
|
|
22
23
|
"sap/ui/dt/OverlayRegistry",
|
|
23
24
|
"sap/ui/dt/Util",
|
|
24
25
|
"sap/ui/events/KeyCodes",
|
|
26
|
+
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
25
27
|
"sap/ui/fl/write/api/Version",
|
|
26
28
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
27
29
|
"sap/ui/fl/write/api/ControlPersonalizationWriteAPI",
|
|
@@ -62,6 +64,7 @@ sap.ui.define([
|
|
|
62
64
|
jQuery,
|
|
63
65
|
ManagedObject,
|
|
64
66
|
BusyIndicator,
|
|
67
|
+
Core,
|
|
65
68
|
DesignTime,
|
|
66
69
|
DOMUtil,
|
|
67
70
|
ElementUtil,
|
|
@@ -69,6 +72,7 @@ sap.ui.define([
|
|
|
69
72
|
OverlayRegistry,
|
|
70
73
|
DtUtil,
|
|
71
74
|
KeyCodes,
|
|
75
|
+
ManifestUtils,
|
|
72
76
|
Version,
|
|
73
77
|
ContextBasedAdaptationsAPI,
|
|
74
78
|
ControlPersonalizationWriteAPI,
|
|
@@ -116,7 +120,7 @@ sap.ui.define([
|
|
|
116
120
|
* @class The runtime authoring allows to adapt the fields of a running application.
|
|
117
121
|
* @extends sap.ui.base.ManagedObject
|
|
118
122
|
* @author SAP SE
|
|
119
|
-
* @version 1.
|
|
123
|
+
* @version 1.114.0
|
|
120
124
|
* @constructor
|
|
121
125
|
* @private
|
|
122
126
|
* @since 1.30
|
|
@@ -451,6 +455,7 @@ sap.ui.define([
|
|
|
451
455
|
|
|
452
456
|
return this._loadUShellServicesPromise
|
|
453
457
|
.then(initVersioning.bind(this))
|
|
458
|
+
.then(initContextBasedAdaptations.bind(this))
|
|
454
459
|
/*
|
|
455
460
|
Check if the application has personalized changes and reload without them;
|
|
456
461
|
Also Check if the application has an available draft and if yes, reload with those changes.
|
|
@@ -460,7 +465,8 @@ sap.ui.define([
|
|
|
460
465
|
layer: this.getLayer(),
|
|
461
466
|
selector: this.getRootControlInstance(),
|
|
462
467
|
versioningEnabled: this._oVersionsModel.getProperty("/versioningEnabled"),
|
|
463
|
-
developerMode: this.getFlexSettings().developerMode
|
|
468
|
+
developerMode: this.getFlexSettings().developerMode,
|
|
469
|
+
adaptationId: this._oContextBasedAdaptationsModel.getProperty("/displayedAdaptation/id")
|
|
464
470
|
});
|
|
465
471
|
}.bind(this))
|
|
466
472
|
.then(function(bReloadTriggered) {
|
|
@@ -785,10 +791,11 @@ sap.ui.define([
|
|
|
785
791
|
* @protected
|
|
786
792
|
*/
|
|
787
793
|
RuntimeAuthoring.prototype.destroy = function() {
|
|
788
|
-
|
|
789
|
-
|
|
794
|
+
var aDependentKeys = Object.keys(this._dependents);
|
|
795
|
+
aDependentKeys.forEach(function(sDependentKey) {
|
|
790
796
|
// Destroy should be called with suppress invalidate = true here to prevent static UI Area invalidation
|
|
791
|
-
|
|
797
|
+
this._dependents[sDependentKey].destroy(true);
|
|
798
|
+
this.removeDependent(sDependentKey);
|
|
792
799
|
}.bind(this));
|
|
793
800
|
|
|
794
801
|
Object.keys(this._mServices).forEach(function(sServiceName) {
|
|
@@ -1027,10 +1034,13 @@ sap.ui.define([
|
|
|
1027
1034
|
var bIsSaveAsAvailable = aRtaFeaturesAvailability[1];
|
|
1028
1035
|
var bIsContextBasedAdaptationAvailable = aRtaFeaturesAvailability[2];
|
|
1029
1036
|
var bIsHomePage = aRtaFeaturesAvailability[3];
|
|
1037
|
+
var oManifest = FlexUtils.getAppDescriptor(oRootControl);
|
|
1038
|
+
//context based adaptation is not supported for overview pages
|
|
1039
|
+
var bIsContextBasedAdaptationSupported = oManifest && !ManifestUtils.getOvpEntry(oManifest);
|
|
1030
1040
|
return {
|
|
1031
1041
|
publishAvailable: bIsPublishAvailable,
|
|
1032
1042
|
saveAsAvailable: !bIsHomePage && bIsPublishAvailable && bIsSaveAsAvailable,
|
|
1033
|
-
contextBasedAdaptationAvailable: !bIsHomePage && bIsContextBasedAdaptationAvailable
|
|
1043
|
+
contextBasedAdaptationAvailable: !bIsHomePage && bIsContextBasedAdaptationSupported && bIsContextBasedAdaptationAvailable
|
|
1034
1044
|
};
|
|
1035
1045
|
});
|
|
1036
1046
|
}
|
|
@@ -1284,44 +1294,108 @@ sap.ui.define([
|
|
|
1284
1294
|
return this.stop(true, true);
|
|
1285
1295
|
}
|
|
1286
1296
|
|
|
1287
|
-
function
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
// already displayed version needs no switch
|
|
1293
|
-
return;
|
|
1297
|
+
function onDeleteAdaptation() {
|
|
1298
|
+
if (this.canSave()) {
|
|
1299
|
+
showDeleteAdaptationMessageBox.call(this, "DAC_DATA_LOSS_DIALOG_DESCRIPTION", "DAC_DIALOG_HEADER", true /*bDirtyChanges*/);
|
|
1300
|
+
} else {
|
|
1301
|
+
showDeleteAdaptationMessageBox.call(this, "DAC_DIALOG_DESCRIPTION", "DAC_DIALOG_HEADER");
|
|
1294
1302
|
}
|
|
1303
|
+
}
|
|
1295
1304
|
|
|
1305
|
+
function showDeleteAdaptationMessageBox(sMessageKey, sTitleKey, bDirtyChanges) {
|
|
1306
|
+
Utils.showMessageBox("confirm", sMessageKey, {
|
|
1307
|
+
titleKey: sTitleKey
|
|
1308
|
+
}).then(function(sAction) {
|
|
1309
|
+
if (sAction === MessageBox.Action.OK) {
|
|
1310
|
+
BusyIndicator.show();
|
|
1311
|
+
if (bDirtyChanges) {
|
|
1312
|
+
// a reload is triggered later and will destroy RTA & the command stack
|
|
1313
|
+
this.getCommandStack().removeAllCommands(true);
|
|
1314
|
+
}
|
|
1315
|
+
deleteAdaptation.call(this);
|
|
1316
|
+
}
|
|
1317
|
+
}.bind(this));
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
function deleteAdaptation() {
|
|
1321
|
+
ContextBasedAdaptationsAPI.remove({
|
|
1322
|
+
control: this.getRootControlInstance(),
|
|
1323
|
+
layer: this.getLayer(),
|
|
1324
|
+
adaptationId: this._oContextBasedAdaptationsModel.getProperty("/displayedAdaptation/id")
|
|
1325
|
+
}).then(function() {
|
|
1326
|
+
BusyIndicator.hide();
|
|
1327
|
+
var sAdaptationId = this._oContextBasedAdaptationsModel.deleteAdaptation();
|
|
1328
|
+
switchAdaptation.call(this, sAdaptationId);
|
|
1329
|
+
}.bind(this)).catch(function(oError) {
|
|
1330
|
+
BusyIndicator.hide();
|
|
1331
|
+
Log.error(oError.stack);
|
|
1332
|
+
var sMessage = "MSG_LREP_TRANSFER_ERROR";
|
|
1333
|
+
var oOptions = { titleKey: "DAC_DIALOG_HEADER" };
|
|
1334
|
+
oOptions.details = oError.userMessage;
|
|
1335
|
+
Utils.showMessageBox("error", sMessage, oOptions);
|
|
1336
|
+
});
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
function handleDataLoss(sMessageKey, sTitleKey, callbackFn) {
|
|
1296
1340
|
if (this.canSave()) {
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
titleKey: "TIT_SWITCH_VERSION_DIALOG",
|
|
1341
|
+
Utils.showMessageBox("warning", sMessageKey, {
|
|
1342
|
+
titleKey: sTitleKey,
|
|
1300
1343
|
actions: [MessageBox.Action.YES, MessageBox.Action.NO, MessageBox.Action.CANCEL],
|
|
1301
1344
|
emphasizedAction: MessageBox.Action.YES
|
|
1302
1345
|
}).then(function(sAction) {
|
|
1303
1346
|
if (sAction === MessageBox.Action.YES) {
|
|
1304
1347
|
this._serializeToLrep()
|
|
1305
|
-
.then(
|
|
1348
|
+
.then(callbackFn);
|
|
1306
1349
|
} else if (sAction === MessageBox.Action.NO) {
|
|
1307
1350
|
// avoids the data loss popup; a reload is triggered later and will destroy RTA & the command stack
|
|
1308
1351
|
this.getCommandStack().removeAllCommands(true);
|
|
1309
|
-
|
|
1352
|
+
callbackFn();
|
|
1310
1353
|
}
|
|
1311
1354
|
return undefined;
|
|
1312
1355
|
}.bind(this));
|
|
1313
1356
|
return;
|
|
1314
1357
|
}
|
|
1315
|
-
|
|
1358
|
+
callbackFn();
|
|
1316
1359
|
}
|
|
1317
1360
|
|
|
1318
|
-
function
|
|
1361
|
+
function onSwitchAdaptation(oEvent) {
|
|
1362
|
+
if (oEvent.getParameter("trigger") === "SaveAs") {
|
|
1363
|
+
// remove all changes from command stack when triggered from saveAs dialog as they are already saved in a new adaptation
|
|
1364
|
+
this.getCommandStack().removeAllCommands(true);
|
|
1365
|
+
}
|
|
1366
|
+
var sAdaptationId = oEvent.getParameter("adaptationId");
|
|
1367
|
+
this._sSwitchToAdaptationId = sAdaptationId;
|
|
1368
|
+
return handleDataLoss.call(this, "MSG_SWITCH_VERSION_DIALOG", "BTN_SWITCH_ADAPTATIONS",
|
|
1369
|
+
switchAdaptation.bind(this, this._sSwitchToAdaptationId));
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
function switchAdaptation(sAdaptationId) {
|
|
1373
|
+
var sVersion = this._oVersionsModel.getProperty("/displayedVersion");
|
|
1374
|
+
switchVersion.call(this, sVersion, sAdaptationId);
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
function onSwitchVersion(oEvent) {
|
|
1378
|
+
var sVersion = oEvent.getParameter("version");
|
|
1379
|
+
var sDisplayedVersion = this._oVersionsModel.getProperty("/displayedVersion");
|
|
1380
|
+
|
|
1381
|
+
if (sVersion === sDisplayedVersion) {
|
|
1382
|
+
// already displayed version needs no switch
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
this._sSwitchToVersion = sVersion;
|
|
1387
|
+
return handleDataLoss.call(this, "MSG_SWITCH_VERSION_DIALOG", "TIT_SWITCH_VERSION_DIALOG",
|
|
1388
|
+
switchVersion.bind(this, this._sSwitchToVersion));
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
function switchVersion(sVersion, sAdaptationId) {
|
|
1319
1392
|
RuntimeAuthoring.enableRestart(this.getLayer(), this.getRootControlInstance());
|
|
1320
1393
|
|
|
1321
1394
|
VersionsAPI.loadVersionForApplication({
|
|
1322
1395
|
control: this.getRootControlInstance(),
|
|
1323
1396
|
layer: this.getLayer(),
|
|
1324
|
-
version: sVersion
|
|
1397
|
+
version: sVersion,
|
|
1398
|
+
adaptationId: sAdaptationId
|
|
1325
1399
|
});
|
|
1326
1400
|
var oReloadInfo = {
|
|
1327
1401
|
versionSwitch: true,
|
|
@@ -1374,6 +1448,15 @@ sap.ui.define([
|
|
|
1374
1448
|
}.bind(this));
|
|
1375
1449
|
}
|
|
1376
1450
|
|
|
1451
|
+
function initContextBasedAdaptations() {
|
|
1452
|
+
return ContextBasedAdaptationsAPI.initialize({
|
|
1453
|
+
control: this.getRootControlInstance(),
|
|
1454
|
+
layer: this.getLayer()
|
|
1455
|
+
}).then(function(oModel) {
|
|
1456
|
+
this._oContextBasedAdaptationsModel = oModel;
|
|
1457
|
+
}.bind(this));
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1377
1460
|
function createToolsMenu(mButtonsAvailability) {
|
|
1378
1461
|
if (!this.getDependent("toolbar")) {
|
|
1379
1462
|
var bUserLayer = this.getLayer() === Layer.USER;
|
|
@@ -1396,6 +1479,8 @@ sap.ui.define([
|
|
|
1396
1479
|
oProperties.activate = onActivate.bind(this);
|
|
1397
1480
|
oProperties.discardDraft = onDiscardDraft.bind(this);
|
|
1398
1481
|
oProperties.switchVersion = onSwitchVersion.bind(this);
|
|
1482
|
+
oProperties.switchAdaptation = onSwitchAdaptation.bind(this);
|
|
1483
|
+
oProperties.deleteAdaptation = onDeleteAdaptation.bind(this);
|
|
1399
1484
|
oProperties.openChangeCategorySelectionPopover = this.getChangeVisualization
|
|
1400
1485
|
? this.getChangeVisualization().openChangeCategorySelectionPopover.bind(this.getChangeVisualization())
|
|
1401
1486
|
: function() {};
|
|
@@ -1423,6 +1508,7 @@ sap.ui.define([
|
|
|
1423
1508
|
// the "Visualization" tab should not be visible if the "fiori-tools-rta-mode" URL-parameter is set to any value but "false"
|
|
1424
1509
|
var bVisualizationButtonVisible;
|
|
1425
1510
|
bVisualizationButtonVisible = !oUriParameters.has("fiori-tools-rta-mode") || oUriParameters.get("fiori-tools-rta-mode") === "false";
|
|
1511
|
+
var bFeedbackButtonVisible = Core.getConfiguration().getFlexibilityServices()[0].connector !== "LocalStorageConnector";
|
|
1426
1512
|
this.bPersistedDataTranslatable = false;
|
|
1427
1513
|
|
|
1428
1514
|
this._oToolbarControlsModel = new JSONModel({
|
|
@@ -1470,6 +1556,9 @@ sap.ui.define([
|
|
|
1470
1556
|
visualizationButton: {
|
|
1471
1557
|
visible: bVisualizationButtonVisible,
|
|
1472
1558
|
enabled: bVisualizationButtonVisible
|
|
1559
|
+
},
|
|
1560
|
+
feedbackButton: {
|
|
1561
|
+
visible: bFeedbackButtonVisible
|
|
1473
1562
|
}
|
|
1474
1563
|
});
|
|
1475
1564
|
|
|
@@ -1502,6 +1591,7 @@ sap.ui.define([
|
|
|
1502
1591
|
}.bind(this));
|
|
1503
1592
|
|
|
1504
1593
|
this.getToolbar().setModel(this._oVersionsModel, "versions");
|
|
1594
|
+
this.getToolbar().setModel(this._oContextBasedAdaptationsModel, "contextBasedAdaptations");
|
|
1505
1595
|
this.getToolbar().setModel(this._oToolbarControlsModel, "controls");
|
|
1506
1596
|
|
|
1507
1597
|
return Promise.all([oTranslationPromise, oSaveAsPromise]);
|
package/src/sap/ui/rta/Utils.js
CHANGED
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @class
|
|
25
25
|
* @extends sap.ui.base.ManagedObject
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.114.0
|
|
28
28
|
* @constructor
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.53
|
|
@@ -118,16 +118,17 @@ sap.ui.define([
|
|
|
118
118
|
});
|
|
119
119
|
|
|
120
120
|
aAllInlineChangeOperations.push(oInlineChangePromise);
|
|
121
|
-
|
|
122
|
-
// create a inline change using a change type 'appdescr_app_removeAllInboundsExceptOne'
|
|
123
|
-
oPropertyChange = AppVariantUtils.prepareRemoveAllInboundsExceptOneChange(sCurrentRunningInboundId);
|
|
124
|
-
aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_removeAllInboundsExceptOne", vSelector));
|
|
125
121
|
} else {
|
|
126
122
|
// create a inline change using a change type 'appdescr_app_changeInbound'
|
|
127
123
|
oPropertyChange = AppVariantUtils.prepareChangeInboundChange(sCurrentRunningInboundId, sAppVariantId, oAppVariantSpecificData);
|
|
128
124
|
aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_changeInbound", vSelector));
|
|
129
125
|
}
|
|
130
126
|
|
|
127
|
+
// remove all other inbounds except appVariant inbound
|
|
128
|
+
// create a inline change using a change type 'appdescr_app_removeAllInboundsExceptOne'
|
|
129
|
+
oPropertyChange = AppVariantUtils.prepareRemoveAllInboundsExceptOneChange(sCurrentRunningInboundId);
|
|
130
|
+
aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_removeAllInboundsExceptOne", vSelector));
|
|
131
|
+
|
|
131
132
|
return Promise.all(aAllInlineChangeOperations);
|
|
132
133
|
});
|
|
133
134
|
};
|