@openui5/sap.ui.rta 1.111.2 → 1.112.2
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 +41 -14
- 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 +5 -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 +9 -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 +5 -2
- 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 +22 -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 +5 -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 +18 -0
- package/src/sap/ui/rta/messagebundle_ar.properties +13 -1
- package/src/sap/ui/rta/messagebundle_bg.properties +13 -1
- package/src/sap/ui/rta/messagebundle_ca.properties +13 -1
- package/src/sap/ui/rta/messagebundle_cs.properties +13 -1
- package/src/sap/ui/rta/messagebundle_cy.properties +13 -1
- package/src/sap/ui/rta/messagebundle_da.properties +13 -1
- package/src/sap/ui/rta/messagebundle_de.properties +13 -1
- package/src/sap/ui/rta/messagebundle_el.properties +13 -1
- package/src/sap/ui/rta/messagebundle_en.properties +13 -1
- package/src/sap/ui/rta/messagebundle_en_GB.properties +13 -1
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +13 -1
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +10 -2
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +13 -1
- package/src/sap/ui/rta/messagebundle_es.properties +13 -1
- package/src/sap/ui/rta/messagebundle_es_MX.properties +13 -1
- package/src/sap/ui/rta/messagebundle_et.properties +13 -1
- package/src/sap/ui/rta/messagebundle_fi.properties +13 -1
- package/src/sap/ui/rta/messagebundle_fr.properties +13 -1
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +14 -2
- package/src/sap/ui/rta/messagebundle_hi.properties +13 -1
- package/src/sap/ui/rta/messagebundle_hr.properties +13 -1
- package/src/sap/ui/rta/messagebundle_hu.properties +13 -1
- package/src/sap/ui/rta/messagebundle_id.properties +13 -1
- package/src/sap/ui/rta/messagebundle_it.properties +13 -1
- package/src/sap/ui/rta/messagebundle_iw.properties +13 -1
- package/src/sap/ui/rta/messagebundle_ja.properties +13 -1
- package/src/sap/ui/rta/messagebundle_kk.properties +13 -1
- package/src/sap/ui/rta/messagebundle_ko.properties +13 -1
- package/src/sap/ui/rta/messagebundle_lt.properties +13 -1
- package/src/sap/ui/rta/messagebundle_lv.properties +13 -1
- package/src/sap/ui/rta/messagebundle_ms.properties +13 -1
- package/src/sap/ui/rta/messagebundle_nl.properties +13 -1
- package/src/sap/ui/rta/messagebundle_no.properties +13 -1
- package/src/sap/ui/rta/messagebundle_pl.properties +13 -1
- package/src/sap/ui/rta/messagebundle_pt.properties +14 -2
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +13 -1
- package/src/sap/ui/rta/messagebundle_ro.properties +13 -1
- package/src/sap/ui/rta/messagebundle_ru.properties +13 -1
- package/src/sap/ui/rta/messagebundle_sh.properties +13 -1
- package/src/sap/ui/rta/messagebundle_sk.properties +13 -1
- package/src/sap/ui/rta/messagebundle_sl.properties +13 -1
- package/src/sap/ui/rta/messagebundle_sv.properties +13 -1
- package/src/sap/ui/rta/messagebundle_th.properties +13 -1
- package/src/sap/ui/rta/messagebundle_tr.properties +13 -1
- package/src/sap/ui/rta/messagebundle_uk.properties +13 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +13 -1
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +13 -1
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +13 -1
- 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 +15 -11
- package/src/sap/ui/rta/plugin/RenameHandler.js +6 -56
- 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 +13 -6
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +73 -48
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +16 -14
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +34 -3
- 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 +9 -0
- package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +19 -21
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +1 -1
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +30 -22
- package/src/sap/ui/rta/toolbar/Adaptation.js +118 -66
- package/src/sap/ui/rta/toolbar/Base.js +6 -2
- package/src/sap/ui/rta/toolbar/Fiori.js +49 -10
- 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 +16 -6
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +17 -0
- 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/UrlParser.js +14 -7
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +8 -5
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +15 -10
- package/src/sap/ui/rta/util/validateText.js +71 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.rta",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.112.2",
|
|
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.112.2",
|
|
18
|
+
"@openui5/sap.ui.core": "1.112.2",
|
|
19
|
+
"@openui5/sap.ui.dt": "1.112.2",
|
|
20
|
+
"@openui5/sap.ui.fl": "1.112.2",
|
|
21
|
+
"@openui5/sap.ui.layout": "1.112.2"
|
|
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.112.2</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with RTA controls.</documentation>
|
|
12
12
|
|
package/src/sap/ui/rta/Client.js
CHANGED
|
@@ -116,7 +116,7 @@ sap.ui.define([
|
|
|
116
116
|
* @class The runtime authoring allows to adapt the fields of a running application.
|
|
117
117
|
* @extends sap.ui.base.ManagedObject
|
|
118
118
|
* @author SAP SE
|
|
119
|
-
* @version 1.
|
|
119
|
+
* @version 1.112.2
|
|
120
120
|
* @constructor
|
|
121
121
|
* @private
|
|
122
122
|
* @since 1.30
|
|
@@ -589,10 +589,13 @@ sap.ui.define([
|
|
|
589
589
|
};
|
|
590
590
|
|
|
591
591
|
function showSaveConfirmation() {
|
|
592
|
-
|
|
592
|
+
var bVersionEnabled = this._oVersionsModel.getProperty("/versioningEnabled");
|
|
593
|
+
var sWarningMessageKey = bVersionEnabled ? "MSG_UNSAVED_DRAFT_CHANGES_ON_CLOSE" : "MSG_UNSAVED_CHANGES_ON_CLOSE";
|
|
594
|
+
var sSaveButtonTextKey = bVersionEnabled ? "BTN_UNSAVED_DRAFT_CHANGES_ON_CLOSE_SAVE" : "BTN_UNSAVED_CHANGES_ON_CLOSE_SAVE";
|
|
595
|
+
return Utils.showMessageBox("warning", sWarningMessageKey, {
|
|
593
596
|
titleKey: "TIT_UNSAVED_CHANGES_ON_CLOSE",
|
|
594
597
|
actionKeys: [
|
|
595
|
-
|
|
598
|
+
sSaveButtonTextKey,
|
|
596
599
|
"BTN_UNSAVED_CHANGES_ON_CLOSE_DONT_SAVE"
|
|
597
600
|
],
|
|
598
601
|
emphasizedActionKey: "BTN_UNSAVED_CHANGES_ON_CLOSE_SAVE",
|
|
@@ -614,10 +617,9 @@ sap.ui.define([
|
|
|
614
617
|
checkToolbarAndExecuteFunction.call(this, "setBusy", true);
|
|
615
618
|
return waitForPendingActions.call(this)
|
|
616
619
|
.then(function() {
|
|
617
|
-
var oCommandStack = this.getCommandStack();
|
|
618
620
|
var sLayer = this.getLayer();
|
|
619
|
-
if (sLayer !== Layer.USER && !bSkipSave &&
|
|
620
|
-
return showSaveConfirmation()
|
|
621
|
+
if (sLayer !== Layer.USER && !bSkipSave && this.canSave()) {
|
|
622
|
+
return showSaveConfirmation.call(this)
|
|
621
623
|
.then(function (sAction) {
|
|
622
624
|
if (sAction === MessageBox.Action.CANCEL) {
|
|
623
625
|
bUserCancelled = true;
|
|
@@ -886,6 +888,10 @@ sap.ui.define([
|
|
|
886
888
|
return this.getCommandStack().canUndo();
|
|
887
889
|
};
|
|
888
890
|
|
|
891
|
+
RuntimeAuthoring.prototype.canSave = function() {
|
|
892
|
+
return this.getCommandStack().canSave();
|
|
893
|
+
};
|
|
894
|
+
|
|
889
895
|
RuntimeAuthoring.prototype.canRedo = function() {
|
|
890
896
|
return this.getCommandStack().canRedo();
|
|
891
897
|
};
|
|
@@ -932,8 +938,7 @@ sap.ui.define([
|
|
|
932
938
|
*/
|
|
933
939
|
RuntimeAuthoring.prototype._onUnload = function() {
|
|
934
940
|
// this function is still in the prototype scope for easier testing
|
|
935
|
-
|
|
936
|
-
if (oCommandStack.canUndo() && this.getShowWindowUnloadDialog()) {
|
|
941
|
+
if (this.canSave() && this.getShowWindowUnloadDialog()) {
|
|
937
942
|
return this._getTextResources().getText("MSG_UNSAVED_CHANGES");
|
|
938
943
|
}
|
|
939
944
|
window.onbeforeunload = this._oldUnloadHandler;
|
|
@@ -1083,6 +1088,7 @@ sap.ui.define([
|
|
|
1083
1088
|
var oCommandStack = this.getCommandStack();
|
|
1084
1089
|
var bCanUndo = oCommandStack.canUndo();
|
|
1085
1090
|
var bCanRedo = oCommandStack.canRedo();
|
|
1091
|
+
var bCanSave = oCommandStack.canSave();
|
|
1086
1092
|
var bWasSaved = oCommandStack.getSaved();
|
|
1087
1093
|
var bTranslationRelevantDirtyChange = this._oToolbarControlsModel.getProperty("/translation/visible") &&
|
|
1088
1094
|
TranslationAPI.hasTranslationRelevantDirtyChanges({layer: Layer.CUSTOMER, selector: this.getRootControlInstance()});
|
|
@@ -1091,8 +1097,8 @@ sap.ui.define([
|
|
|
1091
1097
|
this._oVersionsModel.setDirtyChanges(PersistenceWriteAPI.hasDirtyChanges({selector: this.getRootControlInstance()}));
|
|
1092
1098
|
this._oToolbarControlsModel.setProperty("/undo/enabled", bCanUndo);
|
|
1093
1099
|
this._oToolbarControlsModel.setProperty("/redo/enabled", bCanRedo);
|
|
1094
|
-
this._oToolbarControlsModel.setProperty("/save/enabled",
|
|
1095
|
-
this._oToolbarControlsModel.setProperty("/restore/enabled", this.bInitialResetEnabled ||
|
|
1100
|
+
this._oToolbarControlsModel.setProperty("/save/enabled", bCanSave);
|
|
1101
|
+
this._oToolbarControlsModel.setProperty("/restore/enabled", this.bInitialResetEnabled || bCanSave || bWasSaved);
|
|
1096
1102
|
this._oToolbarControlsModel.setProperty("/translation/enabled", this.bPersistedDataTranslatable || bTranslationRelevantDirtyChange);
|
|
1097
1103
|
}
|
|
1098
1104
|
this.fireUndoRedoStackModified();
|
|
@@ -1157,7 +1163,18 @@ sap.ui.define([
|
|
|
1157
1163
|
|
|
1158
1164
|
function saveOnly(oEvent) {
|
|
1159
1165
|
var fnCallback = oEvent.getParameter("callback") || function() {};
|
|
1166
|
+
var bVersionsEnabled = this._oVersionsModel.getProperty("/versioningEnabled");
|
|
1160
1167
|
return this.save()
|
|
1168
|
+
.then(function() {
|
|
1169
|
+
showMessageToast.call(
|
|
1170
|
+
this,
|
|
1171
|
+
bVersionsEnabled ? "MSG_SAVE_DRAFT_SUCCESS" : "MSG_SAVE_SUCCESS",
|
|
1172
|
+
{ duration: 5000 }
|
|
1173
|
+
);
|
|
1174
|
+
}.bind(this))
|
|
1175
|
+
.catch(function(vError) {
|
|
1176
|
+
return showTechnicalError(vError);
|
|
1177
|
+
})
|
|
1161
1178
|
.then(fnCallback);
|
|
1162
1179
|
}
|
|
1163
1180
|
|
|
@@ -1276,7 +1293,7 @@ sap.ui.define([
|
|
|
1276
1293
|
return;
|
|
1277
1294
|
}
|
|
1278
1295
|
|
|
1279
|
-
if (this.
|
|
1296
|
+
if (this.canSave()) {
|
|
1280
1297
|
this._sSwitchToVersion = sVersion;
|
|
1281
1298
|
Utils.showMessageBox("warning", "MSG_SWITCH_VERSION_DIALOG", {
|
|
1282
1299
|
titleKey: "TIT_SWITCH_VERSION_DIALOG",
|
|
@@ -1584,8 +1601,9 @@ sap.ui.define([
|
|
|
1584
1601
|
*
|
|
1585
1602
|
* @param {object} vAction - The create action from designtime metadata
|
|
1586
1603
|
* @param {string} sNewControlID - The id of the newly created container
|
|
1604
|
+
* @param {string} sNewContainerName - The name of the newly created container
|
|
1587
1605
|
*/
|
|
1588
|
-
function scheduleRenameOnCreatedContainer(vAction, sNewControlID) {
|
|
1606
|
+
function scheduleRenameOnCreatedContainer(vAction, sNewControlID, sNewContainerName) {
|
|
1589
1607
|
var fnStartEdit = function(oElementOverlay) {
|
|
1590
1608
|
oElementOverlay.setSelected(true);
|
|
1591
1609
|
this.getPluginManager().getPlugin("rename").startEdit(oElementOverlay);
|
|
@@ -1596,7 +1614,15 @@ sap.ui.define([
|
|
|
1596
1614
|
var sNewContainerID = this.getPluginManager().getPlugin("createContainer").getCreatedContainerId(vAction, oElementOverlay.getElement().getId());
|
|
1597
1615
|
var oContainerElementOverlay = OverlayRegistry.getOverlay(sNewContainerID);
|
|
1598
1616
|
if (oContainerElementOverlay) {
|
|
1599
|
-
|
|
1617
|
+
if (sNewContainerName) {
|
|
1618
|
+
this.getPluginManager().getPlugin("rename").createRenameCommand(oContainerElementOverlay, sNewContainerName)
|
|
1619
|
+
.then(function() {
|
|
1620
|
+
// The create container and rename must be a single command in the stack
|
|
1621
|
+
this.getCommandStack().compositeLastTwoCommands();
|
|
1622
|
+
}.bind(this));
|
|
1623
|
+
} else {
|
|
1624
|
+
fnStartEdit(oContainerElementOverlay);
|
|
1625
|
+
}
|
|
1600
1626
|
} else {
|
|
1601
1627
|
scheduleOnCreatedAndVisible.call(this, sNewContainerID, fnStartEdit);
|
|
1602
1628
|
}
|
|
@@ -1614,6 +1640,7 @@ sap.ui.define([
|
|
|
1614
1640
|
var oCommand = oEvent.getParameter("command");
|
|
1615
1641
|
var sNewControlID = oEvent.getParameter("newControlId");
|
|
1616
1642
|
var vAction = oEvent.getParameter("action");
|
|
1643
|
+
var sContainerTitle = oEvent.getParameter("title");
|
|
1617
1644
|
|
|
1618
1645
|
this._pElementModified = this._pElementModified.then(function() {
|
|
1619
1646
|
this.getPluginManager().handleStopCutPaste();
|
|
@@ -1628,7 +1655,7 @@ sap.ui.define([
|
|
|
1628
1655
|
}
|
|
1629
1656
|
});
|
|
1630
1657
|
if (vAction) {
|
|
1631
|
-
scheduleRenameOnCreatedContainer.call(this, vAction, sNewControlID);
|
|
1658
|
+
scheduleRenameOnCreatedContainer.call(this, vAction, sNewControlID, sContainerTitle);
|
|
1632
1659
|
}
|
|
1633
1660
|
}
|
|
1634
1661
|
return this.getCommandStack().pushAndExecute(oCommand)
|
package/src/sap/ui/rta/Utils.js
CHANGED
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @class
|
|
17
17
|
* @extends sap.ui.rta.command.FlexCommand
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.112.2
|
|
20
20
|
* @constructor
|
|
21
21
|
* @private
|
|
22
22
|
* @since 1.75
|
|
@@ -52,6 +52,10 @@ sap.ui.define([
|
|
|
52
52
|
type: "string",
|
|
53
53
|
group: "content"
|
|
54
54
|
},
|
|
55
|
+
title: {
|
|
56
|
+
type: "string",
|
|
57
|
+
group: "content"
|
|
58
|
+
},
|
|
55
59
|
changeType: {
|
|
56
60
|
type: "string",
|
|
57
61
|
defaultValue: "addIFrame"
|
|
@@ -13,7 +13,7 @@ sap.ui.define(["sap/ui/base/ManagedObject"], function(ManagedObject) {
|
|
|
13
13
|
* @extends sap.ui.base.ManagedObject
|
|
14
14
|
*
|
|
15
15
|
* @author SAP SE
|
|
16
|
-
* @version 1.
|
|
16
|
+
* @version 1.112.2
|
|
17
17
|
*
|
|
18
18
|
* @constructor
|
|
19
19
|
* @private
|
|
@@ -31,6 +31,14 @@ sap.ui.define(["sap/ui/base/ManagedObject"], function(ManagedObject) {
|
|
|
31
31
|
},
|
|
32
32
|
runtimeOnly: {
|
|
33
33
|
type: "boolean"
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* decides if the command execution is relevant for persistency which
|
|
37
|
+
* enables or disables the save option
|
|
38
|
+
*/
|
|
39
|
+
relevantForSave: {
|
|
40
|
+
type: "boolean",
|
|
41
|
+
defaultValue: true
|
|
34
42
|
}
|
|
35
43
|
},
|
|
36
44
|
associations: {
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
* @class
|
|
23
23
|
* @extends sap.ui.rta.command.BaseCommand
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.112.2
|
|
26
26
|
* @constructor
|
|
27
27
|
* @private
|
|
28
28
|
* @since 1.50
|
|
@@ -44,6 +44,10 @@ sap.ui.define([
|
|
|
44
44
|
},
|
|
45
45
|
associations: {},
|
|
46
46
|
events: {}
|
|
47
|
+
},
|
|
48
|
+
constructor: function() {
|
|
49
|
+
BaseCommand.apply(this, arguments);
|
|
50
|
+
this.setRelevantForSave(false);
|
|
47
51
|
}
|
|
48
52
|
});
|
|
49
53
|
|
|
@@ -60,7 +64,6 @@ sap.ui.define([
|
|
|
60
64
|
return oElement ? flUtils.getAppComponentForControl(oElement) : this.getSelector().appComponent;
|
|
61
65
|
};
|
|
62
66
|
|
|
63
|
-
|
|
64
67
|
/**
|
|
65
68
|
* Template Method to implement execute logic, with ensure precondition Element is available.
|
|
66
69
|
*
|
|
@@ -59,7 +59,7 @@ sap.ui.define([
|
|
|
59
59
|
* @class
|
|
60
60
|
* @extends sap.ui.base.ManagedObject
|
|
61
61
|
* @author SAP SE
|
|
62
|
-
* @version 1.
|
|
62
|
+
* @version 1.112.2
|
|
63
63
|
* @constructor
|
|
64
64
|
* @private
|
|
65
65
|
* @since 1.34
|
|
@@ -289,6 +289,12 @@ sap.ui.define([
|
|
|
289
289
|
return (this._toBeExecuted + 1) < this.getCommands().length;
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
+
Stack.prototype.canSave = function() {
|
|
293
|
+
return this.canUndo() && this.getAllExecutedCommands().some(function(oCommand) {
|
|
294
|
+
return oCommand.getRelevantForSave();
|
|
295
|
+
});
|
|
296
|
+
};
|
|
297
|
+
|
|
292
298
|
Stack.prototype.undo = function() {
|
|
293
299
|
return this._unExecute();
|
|
294
300
|
};
|
|
@@ -343,5 +349,20 @@ sap.ui.define([
|
|
|
343
349
|
return aCommands;
|
|
344
350
|
};
|
|
345
351
|
|
|
352
|
+
/**
|
|
353
|
+
* Combines the last two commands into a composite command
|
|
354
|
+
*
|
|
355
|
+
* @private
|
|
356
|
+
*/
|
|
357
|
+
Stack.prototype.compositeLastTwoCommands = function() {
|
|
358
|
+
var oLastCommand = this.pop();
|
|
359
|
+
var oSecondLastCommand = this.pop();
|
|
360
|
+
|
|
361
|
+
var oCompositeCommand = new CompositeCommand();
|
|
362
|
+
oCompositeCommand.addCommand(oSecondLastCommand);
|
|
363
|
+
oCompositeCommand.addCommand(oLastCommand);
|
|
364
|
+
this.push(oCompositeCommand);
|
|
365
|
+
};
|
|
366
|
+
|
|
346
367
|
return Stack;
|
|
347
368
|
});
|
|
@@ -18,7 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
* @class
|
|
19
19
|
* @extends sap.ui.rta.command.BaseCommand
|
|
20
20
|
* @author SAP SE
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.112.2
|
|
22
22
|
* @constructor
|
|
23
23
|
* @private
|
|
24
24
|
* @since 1.87
|
|
@@ -38,6 +38,10 @@ sap.ui.define([
|
|
|
38
38
|
type: "boolean"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
},
|
|
42
|
+
constructor: function() {
|
|
43
|
+
BaseCommand.apply(this, arguments);
|
|
44
|
+
this.setRelevantForSave(false);
|
|
41
45
|
}
|
|
42
46
|
});
|
|
43
47
|
|