@openui5/sap.ui.rta 1.113.0 → 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 +97 -19
- 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 +22 -2
- package/src/sap/ui/rta/messagebundle_ar.properties +12 -4
- package/src/sap/ui/rta/messagebundle_bg.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ca.properties +12 -4
- package/src/sap/ui/rta/messagebundle_cs.properties +12 -4
- package/src/sap/ui/rta/messagebundle_cy.properties +12 -4
- package/src/sap/ui/rta/messagebundle_da.properties +12 -4
- package/src/sap/ui/rta/messagebundle_de.properties +12 -4
- package/src/sap/ui/rta/messagebundle_el.properties +12 -4
- package/src/sap/ui/rta/messagebundle_en.properties +10 -2
- package/src/sap/ui/rta/messagebundle_en_GB.properties +10 -2
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +7 -2
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -2
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +10 -2
- package/src/sap/ui/rta/messagebundle_es.properties +12 -4
- package/src/sap/ui/rta/messagebundle_es_MX.properties +12 -4
- package/src/sap/ui/rta/messagebundle_et.properties +12 -4
- package/src/sap/ui/rta/messagebundle_fi.properties +12 -4
- package/src/sap/ui/rta/messagebundle_fr.properties +12 -4
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +12 -4
- package/src/sap/ui/rta/messagebundle_hi.properties +12 -4
- package/src/sap/ui/rta/messagebundle_hr.properties +12 -4
- package/src/sap/ui/rta/messagebundle_hu.properties +12 -4
- package/src/sap/ui/rta/messagebundle_id.properties +12 -4
- package/src/sap/ui/rta/messagebundle_it.properties +12 -4
- package/src/sap/ui/rta/messagebundle_iw.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ja.properties +16 -8
- package/src/sap/ui/rta/messagebundle_kk.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ko.properties +16 -8
- package/src/sap/ui/rta/messagebundle_lt.properties +12 -4
- package/src/sap/ui/rta/messagebundle_lv.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ms.properties +16 -8
- package/src/sap/ui/rta/messagebundle_nl.properties +12 -4
- package/src/sap/ui/rta/messagebundle_no.properties +12 -4
- package/src/sap/ui/rta/messagebundle_pl.properties +12 -4
- package/src/sap/ui/rta/messagebundle_pt.properties +12 -4
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ro.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ru.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sh.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sk.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sl.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sv.properties +12 -4
- package/src/sap/ui/rta/messagebundle_th.properties +12 -4
- package/src/sap/ui/rta/messagebundle_tr.properties +12 -4
- package/src/sap/ui/rta/messagebundle_uk.properties +12 -4
- package/src/sap/ui/rta/messagebundle_vi.properties +12 -4
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +12 -4
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +12 -4
- 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 +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 +17 -13
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.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 +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/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 +20 -26
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +3 -15
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +119 -33
- 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 +1 -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/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
|
|
@@ -461,7 +465,8 @@ sap.ui.define([
|
|
|
461
465
|
layer: this.getLayer(),
|
|
462
466
|
selector: this.getRootControlInstance(),
|
|
463
467
|
versioningEnabled: this._oVersionsModel.getProperty("/versioningEnabled"),
|
|
464
|
-
developerMode: this.getFlexSettings().developerMode
|
|
468
|
+
developerMode: this.getFlexSettings().developerMode,
|
|
469
|
+
adaptationId: this._oContextBasedAdaptationsModel.getProperty("/displayedAdaptation/id")
|
|
465
470
|
});
|
|
466
471
|
}.bind(this))
|
|
467
472
|
.then(function(bReloadTriggered) {
|
|
@@ -1029,10 +1034,13 @@ sap.ui.define([
|
|
|
1029
1034
|
var bIsSaveAsAvailable = aRtaFeaturesAvailability[1];
|
|
1030
1035
|
var bIsContextBasedAdaptationAvailable = aRtaFeaturesAvailability[2];
|
|
1031
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);
|
|
1032
1040
|
return {
|
|
1033
1041
|
publishAvailable: bIsPublishAvailable,
|
|
1034
1042
|
saveAsAvailable: !bIsHomePage && bIsPublishAvailable && bIsSaveAsAvailable,
|
|
1035
|
-
contextBasedAdaptationAvailable: !bIsHomePage && bIsContextBasedAdaptationAvailable
|
|
1043
|
+
contextBasedAdaptationAvailable: !bIsHomePage && bIsContextBasedAdaptationSupported && bIsContextBasedAdaptationAvailable
|
|
1036
1044
|
};
|
|
1037
1045
|
});
|
|
1038
1046
|
}
|
|
@@ -1286,44 +1294,108 @@ sap.ui.define([
|
|
|
1286
1294
|
return this.stop(true, true);
|
|
1287
1295
|
}
|
|
1288
1296
|
|
|
1289
|
-
function
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
// already displayed version needs no switch
|
|
1295
|
-
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");
|
|
1296
1302
|
}
|
|
1303
|
+
}
|
|
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
|
+
}
|
|
1297
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) {
|
|
1298
1340
|
if (this.canSave()) {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
titleKey: "TIT_SWITCH_VERSION_DIALOG",
|
|
1341
|
+
Utils.showMessageBox("warning", sMessageKey, {
|
|
1342
|
+
titleKey: sTitleKey,
|
|
1302
1343
|
actions: [MessageBox.Action.YES, MessageBox.Action.NO, MessageBox.Action.CANCEL],
|
|
1303
1344
|
emphasizedAction: MessageBox.Action.YES
|
|
1304
1345
|
}).then(function(sAction) {
|
|
1305
1346
|
if (sAction === MessageBox.Action.YES) {
|
|
1306
1347
|
this._serializeToLrep()
|
|
1307
|
-
.then(
|
|
1348
|
+
.then(callbackFn);
|
|
1308
1349
|
} else if (sAction === MessageBox.Action.NO) {
|
|
1309
1350
|
// avoids the data loss popup; a reload is triggered later and will destroy RTA & the command stack
|
|
1310
1351
|
this.getCommandStack().removeAllCommands(true);
|
|
1311
|
-
|
|
1352
|
+
callbackFn();
|
|
1312
1353
|
}
|
|
1313
1354
|
return undefined;
|
|
1314
1355
|
}.bind(this));
|
|
1315
1356
|
return;
|
|
1316
1357
|
}
|
|
1317
|
-
|
|
1358
|
+
callbackFn();
|
|
1359
|
+
}
|
|
1360
|
+
|
|
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));
|
|
1318
1370
|
}
|
|
1319
1371
|
|
|
1320
|
-
function
|
|
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) {
|
|
1321
1392
|
RuntimeAuthoring.enableRestart(this.getLayer(), this.getRootControlInstance());
|
|
1322
1393
|
|
|
1323
1394
|
VersionsAPI.loadVersionForApplication({
|
|
1324
1395
|
control: this.getRootControlInstance(),
|
|
1325
1396
|
layer: this.getLayer(),
|
|
1326
|
-
version: sVersion
|
|
1397
|
+
version: sVersion,
|
|
1398
|
+
adaptationId: sAdaptationId
|
|
1327
1399
|
});
|
|
1328
1400
|
var oReloadInfo = {
|
|
1329
1401
|
versionSwitch: true,
|
|
@@ -1407,6 +1479,8 @@ sap.ui.define([
|
|
|
1407
1479
|
oProperties.activate = onActivate.bind(this);
|
|
1408
1480
|
oProperties.discardDraft = onDiscardDraft.bind(this);
|
|
1409
1481
|
oProperties.switchVersion = onSwitchVersion.bind(this);
|
|
1482
|
+
oProperties.switchAdaptation = onSwitchAdaptation.bind(this);
|
|
1483
|
+
oProperties.deleteAdaptation = onDeleteAdaptation.bind(this);
|
|
1410
1484
|
oProperties.openChangeCategorySelectionPopover = this.getChangeVisualization
|
|
1411
1485
|
? this.getChangeVisualization().openChangeCategorySelectionPopover.bind(this.getChangeVisualization())
|
|
1412
1486
|
: function() {};
|
|
@@ -1434,6 +1508,7 @@ sap.ui.define([
|
|
|
1434
1508
|
// the "Visualization" tab should not be visible if the "fiori-tools-rta-mode" URL-parameter is set to any value but "false"
|
|
1435
1509
|
var bVisualizationButtonVisible;
|
|
1436
1510
|
bVisualizationButtonVisible = !oUriParameters.has("fiori-tools-rta-mode") || oUriParameters.get("fiori-tools-rta-mode") === "false";
|
|
1511
|
+
var bFeedbackButtonVisible = Core.getConfiguration().getFlexibilityServices()[0].connector !== "LocalStorageConnector";
|
|
1437
1512
|
this.bPersistedDataTranslatable = false;
|
|
1438
1513
|
|
|
1439
1514
|
this._oToolbarControlsModel = new JSONModel({
|
|
@@ -1481,6 +1556,9 @@ sap.ui.define([
|
|
|
1481
1556
|
visualizationButton: {
|
|
1482
1557
|
visible: bVisualizationButtonVisible,
|
|
1483
1558
|
enabled: bVisualizationButtonVisible
|
|
1559
|
+
},
|
|
1560
|
+
feedbackButton: {
|
|
1561
|
+
visible: bFeedbackButtonVisible
|
|
1484
1562
|
}
|
|
1485
1563
|
});
|
|
1486
1564
|
|
|
@@ -1513,7 +1591,7 @@ sap.ui.define([
|
|
|
1513
1591
|
}.bind(this));
|
|
1514
1592
|
|
|
1515
1593
|
this.getToolbar().setModel(this._oVersionsModel, "versions");
|
|
1516
|
-
this.getToolbar().setModel(this._oContextBasedAdaptationsModel, "
|
|
1594
|
+
this.getToolbar().setModel(this._oContextBasedAdaptationsModel, "contextBasedAdaptations");
|
|
1517
1595
|
this.getToolbar().setModel(this._oToolbarControlsModel, "controls");
|
|
1518
1596
|
|
|
1519
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
|
};
|