@openui5/sap.ui.rta 1.93.3 → 1.96.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/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- 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 +160 -121
- package/src/sap/ui/rta/Utils.js +73 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +4 -3
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +24 -17
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +107 -78
- package/src/sap/ui/rta/appVariant/Feature.js +5 -12
- package/src/sap/ui/rta/appVariant/Utils.js +10 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +35 -20
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_de.properties +1 -1
- 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 +4 -4
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +7 -4
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
- 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/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/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 +23 -9
- package/src/sap/ui/rta/messagebundle_ar.properties +14 -7
- package/src/sap/ui/rta/messagebundle_bg.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ca.properties +14 -7
- package/src/sap/ui/rta/messagebundle_cs.properties +14 -7
- package/src/sap/ui/rta/messagebundle_cy.properties +14 -7
- package/src/sap/ui/rta/messagebundle_da.properties +14 -7
- package/src/sap/ui/rta/messagebundle_de.properties +23 -16
- package/src/sap/ui/rta/messagebundle_el.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_GB.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +14 -7
- package/src/sap/ui/rta/messagebundle_es.properties +14 -7
- package/src/sap/ui/rta/messagebundle_es_MX.properties +14 -7
- package/src/sap/ui/rta/messagebundle_et.properties +14 -7
- package/src/sap/ui/rta/messagebundle_fi.properties +15 -8
- package/src/sap/ui/rta/messagebundle_fr.properties +14 -7
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +14 -7
- package/src/sap/ui/rta/messagebundle_hi.properties +14 -7
- package/src/sap/ui/rta/messagebundle_hr.properties +14 -7
- package/src/sap/ui/rta/messagebundle_hu.properties +14 -7
- package/src/sap/ui/rta/messagebundle_id.properties +16 -9
- package/src/sap/ui/rta/messagebundle_it.properties +14 -7
- package/src/sap/ui/rta/messagebundle_iw.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ja.properties +14 -7
- package/src/sap/ui/rta/messagebundle_kk.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ko.properties +14 -7
- package/src/sap/ui/rta/messagebundle_lt.properties +14 -7
- package/src/sap/ui/rta/messagebundle_lv.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ms.properties +14 -7
- package/src/sap/ui/rta/messagebundle_nl.properties +14 -7
- package/src/sap/ui/rta/messagebundle_no.properties +14 -7
- package/src/sap/ui/rta/messagebundle_pl.properties +14 -7
- package/src/sap/ui/rta/messagebundle_pt.properties +14 -7
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ro.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ru.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sh.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sk.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sl.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sv.properties +16 -9
- package/src/sap/ui/rta/messagebundle_th.properties +14 -7
- package/src/sap/ui/rta/messagebundle_tr.properties +14 -7
- package/src/sap/ui/rta/messagebundle_uk.properties +14 -7
- package/src/sap/ui/rta/messagebundle_vi.properties +14 -7
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +14 -7
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +14 -7
- 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/CompVariant.js +1 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +10 -5
- 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 +52 -2
- 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 +18 -61
- 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 +4 -1
- package/src/sap/ui/rta/plugin/Selection.js +35 -1
- package/src/sap/ui/rta/plugin/Settings.js +15 -14
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +133 -139
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +505 -0
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +74 -0
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +97 -260
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -2
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +136 -831
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +117 -0
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +337 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +8 -5
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +31 -29
- 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 +109 -62
- 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/themes/base/ChangeVisualization.less +16 -0
- package/src/sap/ui/rta/themes/base/Overlay.less +59 -58
- package/src/sap/ui/rta/{assets/InPageStyles.css → themes/base/OverlayWithScrollbar.less} +14 -12
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +12 -1
- package/src/sap/ui/rta/themes/base/library.source.less +3 -1
- package/src/sap/ui/rta/themes/sap_hcb/Overlay.less +2 -3
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +67 -48
- package/src/sap/ui/rta/toolbar/Adaptation.js +43 -38
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +4 -5
- package/src/sap/ui/rta/toolbar/Base.js +64 -18
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
- package/src/sap/ui/rta/toolbar/Fiori.js +9 -9
- package/src/sap/ui/rta/toolbar/FioriLike.js +4 -4
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +98 -0
- package/src/sap/ui/rta/toolbar/Personalization.js +8 -8
- package/src/sap/ui/rta/toolbar/Standalone.js +4 -4
- package/src/sap/ui/rta/toolbar/translation/Translation.js +52 -39
- package/src/sap/ui/rta/util/BindingsExtractor.js +24 -27
- package/src/sap/ui/rta/util/PluginManager.js +2 -4
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +3 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +21 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +71 -96
- package/ui5.yaml +4 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangesListPopover.fragment.xml +0 -23
|
@@ -45,7 +45,6 @@ sap.ui.define([
|
|
|
45
45
|
"sap/base/Log",
|
|
46
46
|
"sap/ui/events/KeyCodes",
|
|
47
47
|
"sap/ui/model/json/JSONModel",
|
|
48
|
-
"sap/ui/core/Fragment",
|
|
49
48
|
"sap/ui/rta/util/validateFlexEnabled",
|
|
50
49
|
"sap/ui/rta/util/changeVisualization/ChangeVisualization"
|
|
51
50
|
],
|
|
@@ -89,7 +88,6 @@ function(
|
|
|
89
88
|
Log,
|
|
90
89
|
KeyCodes,
|
|
91
90
|
JSONModel,
|
|
92
|
-
Fragment,
|
|
93
91
|
validateFlexEnabled,
|
|
94
92
|
ChangeVisualization
|
|
95
93
|
) {
|
|
@@ -109,7 +107,7 @@ function(
|
|
|
109
107
|
* @class The runtime authoring allows to adapt the fields of a running application.
|
|
110
108
|
* @extends sap.ui.base.ManagedObject
|
|
111
109
|
* @author SAP SE
|
|
112
|
-
* @version 1.
|
|
110
|
+
* @version 1.96.2
|
|
113
111
|
* @constructor
|
|
114
112
|
* @private
|
|
115
113
|
* @since 1.30
|
|
@@ -121,7 +119,7 @@ function(
|
|
|
121
119
|
// ---- control specific ----
|
|
122
120
|
library: "sap.ui.rta",
|
|
123
121
|
associations: {
|
|
124
|
-
/** The root control which the runtime authoring should handle. Can only be sap.ui.core.
|
|
122
|
+
/** The root control which the runtime authoring should handle. Can only be sap.ui.core.Control or sap.ui.core.UIComponent */
|
|
125
123
|
rootControl: {
|
|
126
124
|
type: "sap.ui.base.ManagedObject"
|
|
127
125
|
}
|
|
@@ -168,7 +166,7 @@ function(
|
|
|
168
166
|
}
|
|
169
167
|
},
|
|
170
168
|
|
|
171
|
-
/** Defines view state of
|
|
169
|
+
/** Defines view state of key user adaptation. Possible values: adaptation, navigation, visualization */
|
|
172
170
|
mode: {
|
|
173
171
|
type: "string",
|
|
174
172
|
defaultValue: "adaptation"
|
|
@@ -227,6 +225,7 @@ function(
|
|
|
227
225
|
this._dependents = {};
|
|
228
226
|
this._mServices = {};
|
|
229
227
|
this._mCustomServicesDictinary = {};
|
|
228
|
+
this._mUShellServices = {};
|
|
230
229
|
|
|
231
230
|
this.addDependent(new PluginManager(), "pluginManager");
|
|
232
231
|
this.addDependent(new PopupManager(), "popupManager");
|
|
@@ -246,6 +245,11 @@ function(
|
|
|
246
245
|
if (this._shouldValidateFlexEnabled()) {
|
|
247
246
|
this.attachEvent("start", validateFlexEnabled.bind(null, this));
|
|
248
247
|
}
|
|
248
|
+
|
|
249
|
+
this._loadUShellServicesPromise = FlexUtils.getUShellServices(["URLParsing", "AppLifeCycle", "CrossApplicationNavigation"])
|
|
250
|
+
.then(function (mUShellServices) {
|
|
251
|
+
this._mUShellServices = mUShellServices;
|
|
252
|
+
}.bind(this));
|
|
249
253
|
},
|
|
250
254
|
_RELOAD: {
|
|
251
255
|
NOT_NEEDED: "NO_RELOAD",
|
|
@@ -307,7 +311,7 @@ function(
|
|
|
307
311
|
};
|
|
308
312
|
|
|
309
313
|
RuntimeAuthoring.prototype.onPopupClose = function(oEvent) {
|
|
310
|
-
if (oEvent.getParameters()
|
|
314
|
+
if (oEvent.getParameters().isA("sap.m.Dialog")) {
|
|
311
315
|
this.getToolbar().setColor();
|
|
312
316
|
}
|
|
313
317
|
};
|
|
@@ -413,6 +417,15 @@ function(
|
|
|
413
417
|
}).then(this._setVersionsModel.bind(this));
|
|
414
418
|
};
|
|
415
419
|
|
|
420
|
+
function addOrRemoveStyleClass(oRootControl, bAdd) {
|
|
421
|
+
if (oRootControl.isA("sap.ui.core.UIComponent")) {
|
|
422
|
+
oRootControl = oRootControl.getRootControl();
|
|
423
|
+
}
|
|
424
|
+
if (oRootControl) {
|
|
425
|
+
oRootControl[bAdd ? "addStyleClass" : "removeStyleClass"]("sapUiRtaRoot");
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
416
429
|
/**
|
|
417
430
|
* Start UI adaptation at runtime (RTA).
|
|
418
431
|
* @return {Promise} Returns a Promise with the initialization of RTA
|
|
@@ -431,7 +444,8 @@ function(
|
|
|
431
444
|
return Promise.reject(vError);
|
|
432
445
|
}
|
|
433
446
|
|
|
434
|
-
return this.
|
|
447
|
+
return this._loadUShellServicesPromise
|
|
448
|
+
.then(this._initVersioning.bind(this))
|
|
435
449
|
/*
|
|
436
450
|
Check if the application has personalized changes and reload without them;
|
|
437
451
|
Also Check if the application has an available draft and if yes, reload with those changes.
|
|
@@ -497,15 +511,9 @@ function(
|
|
|
497
511
|
// this is needed to initially check if undo is available, e.g. when the stack gets initialized with changes
|
|
498
512
|
.then(this._onStackModified.bind(this))
|
|
499
513
|
.then(function () {
|
|
500
|
-
//
|
|
501
|
-
|
|
502
|
-
.
|
|
503
|
-
.then(function (sData) {
|
|
504
|
-
var sStyles = sData.replace(/%scrollWidth%/g, DOMUtil.getScrollbarWidth() + "px");
|
|
505
|
-
DOMUtil.insertStyles(sStyles, Overlay.getOverlayContainer().get(0));
|
|
506
|
-
});
|
|
507
|
-
})
|
|
508
|
-
.then(function () {
|
|
514
|
+
//Resolve the CSS variable set in themes/base/OverlayWithScrollbar.css
|
|
515
|
+
Overlay.getOverlayContainer().get(0).style.setProperty("--sap-ui-rta-scrollbar-scrollWidth", DOMUtil.getScrollbarWidth() + "px");
|
|
516
|
+
Overlay.getOverlayContainer().get(0).style.setProperty("--sap-ui-rta-scrollbar-scrollWidthPlusTwo", DOMUtil.getScrollbarWidth() + 2 + "px");
|
|
509
517
|
return oDesignTimePromise;
|
|
510
518
|
})
|
|
511
519
|
.then(function () {
|
|
@@ -518,11 +526,6 @@ function(
|
|
|
518
526
|
return this.getToolbar().show();
|
|
519
527
|
}
|
|
520
528
|
}.bind(this))
|
|
521
|
-
.then(function () {
|
|
522
|
-
if (this.getShowToolbars() && this.getChangeVisualization) {
|
|
523
|
-
this.getChangeVisualization().setRootControlId(this.getRootControl());
|
|
524
|
-
}
|
|
525
|
-
}.bind(this))
|
|
526
529
|
.then(function () {
|
|
527
530
|
if (Device.browser.name === "ff") {
|
|
528
531
|
// in FF shift+f10 also opens a browser context menu.
|
|
@@ -534,11 +537,7 @@ function(
|
|
|
534
537
|
this.fnKeyDown = this._onKeyDown.bind(this);
|
|
535
538
|
jQuery(document).on("keydown", this.fnKeyDown);
|
|
536
539
|
|
|
537
|
-
|
|
538
|
-
this._$RootControl = oRootOverlay.getAssociatedDomRef();
|
|
539
|
-
if (this._$RootControl) {
|
|
540
|
-
this._$RootControl.addClass("sapUiRtaRoot");
|
|
541
|
-
}
|
|
540
|
+
addOrRemoveStyleClass(this.getRootControlInstance(), true);
|
|
542
541
|
}.bind(this))
|
|
543
542
|
.then(function () {
|
|
544
543
|
this._sStatus = STARTED;
|
|
@@ -914,7 +913,7 @@ function(
|
|
|
914
913
|
}
|
|
915
914
|
var bTriggerReload = true;
|
|
916
915
|
this.getCommandStack().removeAllCommands();
|
|
917
|
-
var mParsedHash = this._removeVersionParameterForFLP(oReloadInfo, FlexUtils.getParsedURLHash(), bTriggerReload);
|
|
916
|
+
var mParsedHash = this._removeVersionParameterForFLP(oReloadInfo, FlexUtils.getParsedURLHash(this._getUShellService("URLParsing")), bTriggerReload);
|
|
918
917
|
this._triggerCrossAppNavigation(mParsedHash);
|
|
919
918
|
return this.stop(true, true);
|
|
920
919
|
};
|
|
@@ -933,6 +932,7 @@ function(
|
|
|
933
932
|
})
|
|
934
933
|
.then(this._handleDiscard.bind(this));
|
|
935
934
|
}
|
|
935
|
+
return undefined;
|
|
936
936
|
}.bind(this));
|
|
937
937
|
};
|
|
938
938
|
|
|
@@ -947,23 +947,23 @@ function(
|
|
|
947
947
|
|
|
948
948
|
if (this.canUndo()) {
|
|
949
949
|
this._nSwitchToVersion = nVersion;
|
|
950
|
-
|
|
950
|
+
Utils.showMessageBox("warning", "MSG_SWITCH_VERSION_DIALOG", {
|
|
951
951
|
titleKey: "TIT_SWITCH_VERSION_DIALOG",
|
|
952
952
|
actions: [MessageBox.Action.YES, MessageBox.Action.NO, MessageBox.Action.CANCEL],
|
|
953
953
|
emphasizedAction: MessageBox.Action.YES
|
|
954
954
|
}).then(function (sAction) {
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
this._switchVersion(this._nSwitchToVersion);
|
|
955
|
+
if (sAction === MessageBox.Action.YES) {
|
|
956
|
+
this._serializeToLrep(this)
|
|
957
|
+
.then(this._switchVersion.bind(this, this._nSwitchToVersion));
|
|
958
|
+
} else if (sAction === MessageBox.Action.NO) {
|
|
959
|
+
// avoids the data loss popup; a reload is triggered later and will destroy RTA & the command stack
|
|
960
|
+
this.getCommandStack().removeAllCommands(true);
|
|
961
|
+
this._switchVersion(this._nSwitchToVersion);
|
|
963
962
|
}
|
|
963
|
+
return undefined;
|
|
964
964
|
}.bind(this));
|
|
965
|
+
return;
|
|
965
966
|
}
|
|
966
|
-
|
|
967
967
|
this._switchVersion(nVersion);
|
|
968
968
|
};
|
|
969
969
|
|
|
@@ -973,7 +973,7 @@ function(
|
|
|
973
973
|
RuntimeAuthoring.enableRestart(this.getLayer(), this.getRootControlInstance());
|
|
974
974
|
|
|
975
975
|
if (!FlexUtils.getUshellContainer()) {
|
|
976
|
-
if (!ReloadInfoAPI.hasVersionParameterWithValue({value: sVersion})) {
|
|
976
|
+
if (!ReloadInfoAPI.hasVersionParameterWithValue({value: sVersion}, this._getUShellService("URLParsing"))) {
|
|
977
977
|
var oReloadInfo = {
|
|
978
978
|
versionSwitch: true,
|
|
979
979
|
version: sVersion
|
|
@@ -982,20 +982,25 @@ function(
|
|
|
982
982
|
}
|
|
983
983
|
return this._reloadPage();
|
|
984
984
|
}
|
|
985
|
-
var mParsedHash = FlexUtils.getParsedURLHash();
|
|
985
|
+
var mParsedHash = FlexUtils.getParsedURLHash(this._getUShellService("URLParsing"));
|
|
986
986
|
VersionsAPI.loadVersionForApplication({
|
|
987
987
|
selector: this.getRootControlInstance(),
|
|
988
988
|
layer: this.getLayer(),
|
|
989
989
|
version: nVersion
|
|
990
990
|
});
|
|
991
991
|
var aVersionsParameter = mParsedHash.params[sap.ui.fl.Versions.UrlParameter];
|
|
992
|
-
if (
|
|
992
|
+
if (
|
|
993
|
+
aVersionsParameter &&
|
|
994
|
+
aVersionsParameter[0] === sVersion &&
|
|
995
|
+
this._getUShellService("AppLifeCycle")
|
|
996
|
+
) {
|
|
993
997
|
// RTA was started with a version parameter, the displayed version has changed and the key user switches back
|
|
994
|
-
|
|
998
|
+
this._getUShellService("AppLifeCycle").reloadCurrentApp();
|
|
995
999
|
} else {
|
|
996
1000
|
mParsedHash.params[sap.ui.fl.Versions.UrlParameter] = sVersion;
|
|
997
1001
|
this._triggerCrossAppNavigation(mParsedHash);
|
|
998
1002
|
}
|
|
1003
|
+
return undefined;
|
|
999
1004
|
};
|
|
1000
1005
|
|
|
1001
1006
|
RuntimeAuthoring.prototype._setUriParameter = function (sParameters) {
|
|
@@ -1004,45 +1009,40 @@ function(
|
|
|
1004
1009
|
|
|
1005
1010
|
RuntimeAuthoring.prototype._createToolsMenu = function(aButtonsVisibility) {
|
|
1006
1011
|
if (!this.getDependent("toolbar")) {
|
|
1007
|
-
var
|
|
1012
|
+
var bUserLayer = this.getLayer() === Layer.USER;
|
|
1013
|
+
var oProperties = {
|
|
1014
|
+
rtaInformation: {
|
|
1015
|
+
flexSettings: this.getFlexSettings(),
|
|
1016
|
+
rootControl: this.getRootControlInstance(),
|
|
1017
|
+
commandStack: this.getCommandStack()
|
|
1018
|
+
},
|
|
1019
|
+
textResources: this._getTextResources(),
|
|
1020
|
+
restore: this._onRestore.bind(this),
|
|
1021
|
+
exit: this.stop.bind(this, false, bUserLayer)
|
|
1022
|
+
};
|
|
1008
1023
|
|
|
1009
|
-
if (
|
|
1010
|
-
|
|
1024
|
+
if (!bUserLayer) {
|
|
1025
|
+
oProperties.transport = this._onTransport.bind(this);
|
|
1026
|
+
oProperties.undo = this._onUndo.bind(this);
|
|
1027
|
+
oProperties.redo = this._onRedo.bind(this);
|
|
1028
|
+
oProperties.modeChange = this._onModeChange.bind(this);
|
|
1029
|
+
oProperties.activate = this._onActivate.bind(this);
|
|
1030
|
+
oProperties.discardDraft = this._onDiscardDraft.bind(this);
|
|
1031
|
+
oProperties.switchVersion = this._onSwitchVersion.bind(this);
|
|
1032
|
+
oProperties.onCommandCategorySelection = this.getChangeVisualization
|
|
1033
|
+
? this.getChangeVisualization().onCommandCategorySelection.bind(this.getChangeVisualization())
|
|
1034
|
+
: function () {};
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
var oToolbar;
|
|
1038
|
+
if (bUserLayer) {
|
|
1039
|
+
oToolbar = new PersonalizationToolbar(oProperties);
|
|
1011
1040
|
} else if (Utils.isOriginalFioriToolbarAccessible()) {
|
|
1012
|
-
|
|
1041
|
+
oToolbar = new FioriToolbar(oProperties);
|
|
1013
1042
|
} else if (Utils.getFiori2Renderer()) {
|
|
1014
|
-
|
|
1043
|
+
oToolbar = new FioriLikeToolbar(oProperties);
|
|
1015
1044
|
} else {
|
|
1016
|
-
|
|
1017
|
-
}
|
|
1018
|
-
var oToolbar;
|
|
1019
|
-
if (this.getLayer() === Layer.USER) {
|
|
1020
|
-
oToolbar = new ToolbarConstructor({
|
|
1021
|
-
textResources: this._getTextResources(),
|
|
1022
|
-
//events
|
|
1023
|
-
exit: this.stop.bind(this, false, true),
|
|
1024
|
-
restore: this._onRestore.bind(this)
|
|
1025
|
-
});
|
|
1026
|
-
} else {
|
|
1027
|
-
oToolbar = new ToolbarConstructor({
|
|
1028
|
-
textResources: this._getTextResources(),
|
|
1029
|
-
//events
|
|
1030
|
-
exit: this.stop.bind(this, false, false),
|
|
1031
|
-
transport: this._onTransport.bind(this),
|
|
1032
|
-
restore: this._onRestore.bind(this),
|
|
1033
|
-
undo: this._onUndo.bind(this),
|
|
1034
|
-
redo: this._onRedo.bind(this),
|
|
1035
|
-
modeChange: this._onModeChange.bind(this),
|
|
1036
|
-
manageApps: RtaAppVariantFeature.onGetOverview.bind(null, true, this.getLayer()),
|
|
1037
|
-
appVariantOverview: this._onGetAppVariantOverview.bind(this),
|
|
1038
|
-
saveAs: RtaAppVariantFeature.onSaveAs.bind(RtaAppVariantFeature, true, true, this.getLayer(), null),
|
|
1039
|
-
activate: this._onActivate.bind(this),
|
|
1040
|
-
discardDraft: this._onDiscardDraft.bind(this),
|
|
1041
|
-
switchVersion: this._onSwitchVersion.bind(this),
|
|
1042
|
-
toggleChangeVisualization: this.getChangeVisualization
|
|
1043
|
-
? this.getChangeVisualization().toggleActive.bind(this.getChangeVisualization())
|
|
1044
|
-
: function () {}
|
|
1045
|
-
});
|
|
1045
|
+
oToolbar = new StandaloneToolbar(oProperties);
|
|
1046
1046
|
}
|
|
1047
1047
|
this.addDependent(oToolbar, "toolbar");
|
|
1048
1048
|
|
|
@@ -1088,13 +1088,6 @@ function(
|
|
|
1088
1088
|
return Promise.resolve();
|
|
1089
1089
|
};
|
|
1090
1090
|
|
|
1091
|
-
RuntimeAuthoring.prototype._onGetAppVariantOverview = function(oEvent) {
|
|
1092
|
-
var oItem = oEvent.getParameter("item");
|
|
1093
|
-
|
|
1094
|
-
var bTriggeredForKeyUser = oItem.getId() === "keyUser";
|
|
1095
|
-
return RtaAppVariantFeature.onGetOverview(bTriggeredForKeyUser, this.getLayer());
|
|
1096
|
-
};
|
|
1097
|
-
|
|
1098
1091
|
/**
|
|
1099
1092
|
* Exit Runtime Authoring - destroy all controls and plugins
|
|
1100
1093
|
*
|
|
@@ -1119,8 +1112,8 @@ function(
|
|
|
1119
1112
|
jQuery(document).off("keydown", this.fnKeyDown);
|
|
1120
1113
|
}
|
|
1121
1114
|
|
|
1122
|
-
if (this.
|
|
1123
|
-
this.
|
|
1115
|
+
if (this.getRootControlInstance()) {
|
|
1116
|
+
addOrRemoveStyleClass(this.getRootControlInstance(), false);
|
|
1124
1117
|
}
|
|
1125
1118
|
|
|
1126
1119
|
this.setCommandStack(null);
|
|
@@ -1188,7 +1181,7 @@ function(
|
|
|
1188
1181
|
* the changes for both places will be deleted. For App Variants all the changes are saved in one place.
|
|
1189
1182
|
*
|
|
1190
1183
|
* @private
|
|
1191
|
-
* @returns {Promise}
|
|
1184
|
+
* @returns {Promise} Resolves when change persistence is resetted
|
|
1192
1185
|
*/
|
|
1193
1186
|
RuntimeAuthoring.prototype._deleteChanges = function() {
|
|
1194
1187
|
var sLayer = this.getLayer();
|
|
@@ -1199,7 +1192,7 @@ function(
|
|
|
1199
1192
|
}).then(function () {
|
|
1200
1193
|
ReloadInfoAPI.removeInfoSessionStorage(oSelector);
|
|
1201
1194
|
var oReloadInfo = {
|
|
1202
|
-
isDraftAvailable: ReloadInfoAPI.hasVersionParameterWithValue({value: sLayer}),
|
|
1195
|
+
isDraftAvailable: ReloadInfoAPI.hasVersionParameterWithValue({value: sLayer}, this._getUShellService("URLParsing")),
|
|
1203
1196
|
layer: sLayer,
|
|
1204
1197
|
deleteMaxLayer: false,
|
|
1205
1198
|
triggerHardReload: true
|
|
@@ -1280,25 +1273,28 @@ function(
|
|
|
1280
1273
|
*/
|
|
1281
1274
|
RuntimeAuthoring.prototype._onRestore = function() {
|
|
1282
1275
|
var sLayer = this.getLayer();
|
|
1283
|
-
var
|
|
1284
|
-
?
|
|
1285
|
-
:
|
|
1286
|
-
var
|
|
1287
|
-
?
|
|
1288
|
-
:
|
|
1276
|
+
var sMessageKey = sLayer === Layer.USER
|
|
1277
|
+
? "FORM_PERS_RESET_MESSAGE_PERSONALIZATION"
|
|
1278
|
+
: "FORM_PERS_RESET_MESSAGE";
|
|
1279
|
+
var sTitleKey = sLayer === Layer.USER
|
|
1280
|
+
? "BTN_RESTORE"
|
|
1281
|
+
: "FORM_PERS_RESET_TITLE";
|
|
1289
1282
|
|
|
1290
1283
|
this.getPluginManager().handleStopCutPaste();
|
|
1291
1284
|
|
|
1292
|
-
return Utils.showMessageBox("warning",
|
|
1293
|
-
titleKey:
|
|
1285
|
+
return Utils.showMessageBox("warning", sMessageKey, {
|
|
1286
|
+
titleKey: sTitleKey,
|
|
1294
1287
|
actions: [MessageBox.Action.OK, MessageBox.Action.CANCEL],
|
|
1295
1288
|
emphasizedAction: MessageBox.Action.OK
|
|
1296
1289
|
}).then(function(sAction) {
|
|
1297
1290
|
if (sAction === MessageBox.Action.OK) {
|
|
1298
1291
|
RuntimeAuthoring.enableRestart(sLayer, this.getRootControlInstance());
|
|
1299
|
-
this._deleteChanges()
|
|
1300
|
-
|
|
1292
|
+
return this._deleteChanges()
|
|
1293
|
+
.then(function () {
|
|
1294
|
+
this.getCommandStack().removeAllCommands();
|
|
1295
|
+
}.bind(this));
|
|
1301
1296
|
}
|
|
1297
|
+
return undefined;
|
|
1302
1298
|
}.bind(this));
|
|
1303
1299
|
};
|
|
1304
1300
|
|
|
@@ -1439,12 +1435,15 @@ function(
|
|
|
1439
1435
|
};
|
|
1440
1436
|
|
|
1441
1437
|
RuntimeAuthoring.prototype._triggerCrossAppNavigation = function(mParsedHash) {
|
|
1442
|
-
if (
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1438
|
+
if (
|
|
1439
|
+
(this.getLayer() !== Layer.USER) &&
|
|
1440
|
+
this._getUShellService("CrossApplicationNavigation")
|
|
1441
|
+
) {
|
|
1442
|
+
this._getUShellService("CrossApplicationNavigation")
|
|
1443
|
+
.toExternal(this._buildNavigationArguments(mParsedHash));
|
|
1444
|
+
return true;
|
|
1447
1445
|
}
|
|
1446
|
+
return false;
|
|
1448
1447
|
};
|
|
1449
1448
|
|
|
1450
1449
|
RuntimeAuthoring.prototype._removeVersionParameterForFLP = function(oReloadInfo, mParsedHash, bTriggerReload) {
|
|
@@ -1453,13 +1452,16 @@ function(
|
|
|
1453
1452
|
return mParsedHash;
|
|
1454
1453
|
}
|
|
1455
1454
|
|
|
1456
|
-
var sVersionParameter = FlexUtils.getParameter(flexLibrary.Versions.UrlParameter);
|
|
1455
|
+
var sVersionParameter = FlexUtils.getParameter(flexLibrary.Versions.UrlParameter, this._getUShellService("URLParsing"));
|
|
1457
1456
|
if (sVersionParameter) {
|
|
1458
1457
|
delete mParsedHash.params[flexLibrary.Versions.UrlParameter];
|
|
1459
|
-
} else if (
|
|
1460
|
-
|
|
1458
|
+
} else if (
|
|
1459
|
+
(this._isDraftAvailable() || bTriggerReload /* for discarding of dirty changes */) &&
|
|
1460
|
+
!oReloadInfo.hasHigherLayerChanges &&
|
|
1461
|
+
this._getUShellService("AppLifeCycle")
|
|
1462
|
+
) {
|
|
1461
1463
|
// reloading this way only works when we dont have to remove max-layer parameter, see _removeMaxLayerParameterForFLP
|
|
1462
|
-
|
|
1464
|
+
this._getUShellService("AppLifeCycle").reloadCurrentApp();
|
|
1463
1465
|
}
|
|
1464
1466
|
return mParsedHash;
|
|
1465
1467
|
};
|
|
@@ -1487,14 +1489,18 @@ function(
|
|
|
1487
1489
|
return this._triggerHardReload(oReloadInfo);
|
|
1488
1490
|
}
|
|
1489
1491
|
|
|
1490
|
-
var mParsedHash = FlexUtils.getParsedURLHash();
|
|
1492
|
+
var mParsedHash = FlexUtils.getParsedURLHash(this._getUShellService("URLParsing"));
|
|
1491
1493
|
if (!mParsedHash) {
|
|
1492
|
-
return;
|
|
1494
|
+
return undefined;
|
|
1493
1495
|
}
|
|
1494
1496
|
|
|
1495
1497
|
// allContexts do not change the url parameter to trigger a reload
|
|
1496
|
-
if (
|
|
1497
|
-
|
|
1498
|
+
if (
|
|
1499
|
+
oReloadInfo.allContexts &&
|
|
1500
|
+
!oReloadInfo.hasHigherLayerChanges &&
|
|
1501
|
+
this._getUShellService("AppLifeCycle")
|
|
1502
|
+
) {
|
|
1503
|
+
this._getUShellService("AppLifeCycle").reloadCurrentApp();
|
|
1498
1504
|
}
|
|
1499
1505
|
|
|
1500
1506
|
mParsedHash = this._removeMaxLayerParameterForFLP(oReloadInfo, mParsedHash);
|
|
@@ -1601,7 +1607,7 @@ function(
|
|
|
1601
1607
|
};
|
|
1602
1608
|
|
|
1603
1609
|
RuntimeAuthoring.prototype._triggerReloadOnStart = function(oReloadInfo) {
|
|
1604
|
-
|
|
1610
|
+
if (this._getUShellService("CrossApplicationNavigation")) {
|
|
1605
1611
|
if (oReloadInfo.isDraftAvailable) {
|
|
1606
1612
|
// clears FlexState and triggers reloading of the flex data without blocking
|
|
1607
1613
|
VersionsAPI.loadDraftForApplication({
|
|
@@ -1615,7 +1621,7 @@ function(
|
|
|
1615
1621
|
allContexts: oReloadInfo.allContexts
|
|
1616
1622
|
});
|
|
1617
1623
|
}
|
|
1618
|
-
}
|
|
1624
|
+
}
|
|
1619
1625
|
var sReason = this._getReloadMessageOnStart(oReloadInfo);
|
|
1620
1626
|
if (!sReason) {
|
|
1621
1627
|
return Promise.resolve();
|
|
@@ -1624,8 +1630,12 @@ function(
|
|
|
1624
1630
|
.then(function() {
|
|
1625
1631
|
RuntimeAuthoring.enableRestart(oReloadInfo.layer, this.getRootControlInstance());
|
|
1626
1632
|
// allContexts do not change the url parameter to trigger a reload
|
|
1627
|
-
if (
|
|
1628
|
-
|
|
1633
|
+
if (
|
|
1634
|
+
oReloadInfo.allContexts &&
|
|
1635
|
+
!oReloadInfo.hasHigherLayerChanges &&
|
|
1636
|
+
this._getUShellService("AppLifeCycle")
|
|
1637
|
+
) {
|
|
1638
|
+
this._getUShellService("AppLifeCycle").reloadCurrentApp();
|
|
1629
1639
|
}
|
|
1630
1640
|
if (FlexUtils.getUshellContainer()) {
|
|
1631
1641
|
// clears FlexState and triggers reloading of the flex data without blocking
|
|
@@ -1651,7 +1661,8 @@ function(
|
|
|
1651
1661
|
layer: this.getLayer(),
|
|
1652
1662
|
selector: this.getRootControlInstance(),
|
|
1653
1663
|
ignoreMaxLayerParameter: false,
|
|
1654
|
-
includeCtrlVariants: true
|
|
1664
|
+
includeCtrlVariants: true,
|
|
1665
|
+
URLParsingService: this._getUShellService("URLParsing")
|
|
1655
1666
|
};
|
|
1656
1667
|
return ReloadInfoAPI.getReloadReasonsForStart(oReloadInfo)
|
|
1657
1668
|
.then(function (oReloadInfo) {
|
|
@@ -1661,6 +1672,7 @@ function(
|
|
|
1661
1672
|
if (oReloadInfo.hasHigherLayerChanges || oReloadInfo.isDraftAvailable || oReloadInfo.allContexts) {
|
|
1662
1673
|
return this._triggerReloadOnStart(oReloadInfo);
|
|
1663
1674
|
}
|
|
1675
|
+
return undefined;
|
|
1664
1676
|
}.bind(this));
|
|
1665
1677
|
};
|
|
1666
1678
|
|
|
@@ -1669,10 +1681,11 @@ function(
|
|
|
1669
1681
|
* This function must only be called outside of the ushell.
|
|
1670
1682
|
*
|
|
1671
1683
|
* @param {Object} oReloadInfo - Information to determine reload is needed
|
|
1672
|
-
* @returns {Promise}
|
|
1684
|
+
* @returns {Promise} Resolves when page reload is triggered
|
|
1673
1685
|
*/
|
|
1674
1686
|
RuntimeAuthoring.prototype._triggerHardReload = function(oReloadInfo) {
|
|
1675
1687
|
oReloadInfo.parameters = document.location.search;
|
|
1688
|
+
oReloadInfo.URLParsingService = this._getUShellService("URLParsing");
|
|
1676
1689
|
var sParameters = ReloadInfoAPI.handleUrlParametersForStandalone(oReloadInfo);
|
|
1677
1690
|
if (document.location.search !== sParameters) {
|
|
1678
1691
|
this._setUriParameter(sParameters);
|
|
@@ -1701,7 +1714,8 @@ function(
|
|
|
1701
1714
|
changesNeedReload: bChangesNeedReload,
|
|
1702
1715
|
isDraftAvailable: this._oVersionsModel.getProperty("/draftAvailable"),
|
|
1703
1716
|
versioningEnabled: this._oVersionsModel.getProperty("/versioningEnabled"),
|
|
1704
|
-
activeVersion: this._oVersionsModel.getProperty("/activeVersion")
|
|
1717
|
+
activeVersion: this._oVersionsModel.getProperty("/activeVersion"),
|
|
1718
|
+
URLParsingService: this._getUShellService("URLParsing")
|
|
1705
1719
|
};
|
|
1706
1720
|
oReloadInfo = ReloadInfoAPI.getReloadMethod(oReloadInfo);
|
|
1707
1721
|
return this._handleReloadMessageBoxOnExit(oReloadInfo).then(function () {
|
|
@@ -1719,10 +1733,31 @@ function(
|
|
|
1719
1733
|
* @param {string} sNewMode The new value for the 'mode' property
|
|
1720
1734
|
*/
|
|
1721
1735
|
RuntimeAuthoring.prototype.setMode = function (sNewMode) {
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
this.
|
|
1725
|
-
|
|
1736
|
+
var sCurrentMode = this.getMode();
|
|
1737
|
+
if (sCurrentMode !== sNewMode) {
|
|
1738
|
+
var oChangeVisualization = this.getChangeVisualization && this.getChangeVisualization();
|
|
1739
|
+
if (sNewMode === "visualization" || sCurrentMode === "visualization") {
|
|
1740
|
+
oChangeVisualization.triggerModeChange(this.getRootControl(), this.getToolbar());
|
|
1741
|
+
}
|
|
1742
|
+
var oTabHandlingPlugin = this.getPluginManager().getPlugin("tabHandling");
|
|
1743
|
+
var oSelectionPlugin = this.getPluginManager().getPlugin("selection");
|
|
1744
|
+
|
|
1745
|
+
// Switch between another mode and navigation -> toggle overlay & App-Tabindex enablement
|
|
1746
|
+
if (sCurrentMode === "navigation" || sNewMode === "navigation") {
|
|
1747
|
+
this._oDesignTime.setEnabled(sNewMode !== "navigation");
|
|
1748
|
+
oTabHandlingPlugin[(sNewMode === "navigation") ? "restoreTabIndex" : "removeTabIndex"]();
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
oTabHandlingPlugin[(sNewMode === "adaptation") ? "restoreOverlayTabIndex" : "removeOverlayTabIndex"]();
|
|
1752
|
+
oSelectionPlugin.setIsActive(!(sNewMode === "visualization"));
|
|
1753
|
+
|
|
1754
|
+
Overlay.getOverlayContainer().toggleClass("sapUiRtaVisualizationMode", (sNewMode === "visualization"));
|
|
1755
|
+
if (sNewMode === "visualization") {
|
|
1756
|
+
jQuery(".sapUiDtOverlayMovable").css("cursor", "default");
|
|
1757
|
+
} else {
|
|
1758
|
+
jQuery(".sapUiDtOverlayMovable").css("cursor", "move");
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1726
1761
|
this._oToolbarControlsModel.setProperty("/modeSwitcher", sNewMode);
|
|
1727
1762
|
this.setProperty("mode", sNewMode);
|
|
1728
1763
|
this.fireModeChanged({mode: sNewMode});
|
|
@@ -1938,5 +1973,9 @@ function(
|
|
|
1938
1973
|
return this.startService(sName);
|
|
1939
1974
|
};
|
|
1940
1975
|
|
|
1976
|
+
RuntimeAuthoring.prototype._getUShellService = function(sServiceName) {
|
|
1977
|
+
return FlexUtils.getUshellContainer() && this._mUShellServices[sServiceName];
|
|
1978
|
+
};
|
|
1979
|
+
|
|
1941
1980
|
return RuntimeAuthoring;
|
|
1942
1981
|
});
|
package/src/sap/ui/rta/Utils.js
CHANGED
|
@@ -12,6 +12,9 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/fl/LayerUtils",
|
|
13
13
|
"sap/ui/dt/OverlayUtil",
|
|
14
14
|
"sap/ui/dt/DOMUtil",
|
|
15
|
+
"sap/ui/dt/ElementUtil",
|
|
16
|
+
"sap/ui/dt/MetadataPropagationUtil",
|
|
17
|
+
"sap/ui/rta/util/hasStableId",
|
|
15
18
|
"sap/m/MessageBox",
|
|
16
19
|
"sap/ui/rta/util/BindingsExtractor",
|
|
17
20
|
"sap/base/util/restricted/_omit",
|
|
@@ -26,6 +29,9 @@ function(
|
|
|
26
29
|
FlexLayerUtils,
|
|
27
30
|
OverlayUtil,
|
|
28
31
|
DOMUtil,
|
|
32
|
+
ElementUtil,
|
|
33
|
+
MetadataPropagationUtil,
|
|
34
|
+
hasStableId,
|
|
29
35
|
MessageBox,
|
|
30
36
|
BindingsExtractor,
|
|
31
37
|
_omit,
|
|
@@ -40,7 +46,7 @@ function(
|
|
|
40
46
|
* @class Utility functionality to work with controls, e.g. iterate through aggregations, find parents, etc.
|
|
41
47
|
*
|
|
42
48
|
* @author SAP SE
|
|
43
|
-
* @version 1.
|
|
49
|
+
* @version 1.96.2
|
|
44
50
|
*
|
|
45
51
|
* @private
|
|
46
52
|
* @static
|
|
@@ -553,5 +559,71 @@ function(
|
|
|
553
559
|
}, {});
|
|
554
560
|
};
|
|
555
561
|
|
|
562
|
+
/**
|
|
563
|
+
* Checks drop ability for aggregation overlays
|
|
564
|
+
* @param {sap.ui.dt.Overlay} oAggregationOverlay Aggregation overlay object
|
|
565
|
+
* @param {sap.ui.dt.ElementOverlay} oMovedOverlay Overlay being moved/added
|
|
566
|
+
* @param {sap.ui.rta.Plugin} oPlugin RTA plugin calling this method
|
|
567
|
+
* @param {boolean} [bOverlayNotInDom] Flag defining if overlay is not in DOM
|
|
568
|
+
* @return {Promise.<boolean>} Promise with true value if overlay can be added to the aggregation overlay or false value if not.
|
|
569
|
+
* @override
|
|
570
|
+
*/
|
|
571
|
+
Utils.checkTargetZone = function(oAggregationOverlay, oMovedOverlay, oPlugin, bOverlayNotInDom) {
|
|
572
|
+
function fnHasMoveAction(oAggregationOverlay, oElement, oRelevantContainer, oPlugin) {
|
|
573
|
+
var oAggregationDTMetadata = oAggregationOverlay.getDesignTimeMetadata();
|
|
574
|
+
var oMoveAction = oAggregationDTMetadata.getAction("move", oElement);
|
|
575
|
+
if (!oMoveAction) {
|
|
576
|
+
return Promise.resolve(false);
|
|
577
|
+
}
|
|
578
|
+
// moveChangeHandler information is always located on the relevant container
|
|
579
|
+
return oPlugin.hasChangeHandler(oMoveAction.changeType, oRelevantContainer);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
return ElementUtil.checkTargetZone(oAggregationOverlay, oMovedOverlay, bOverlayNotInDom)
|
|
583
|
+
.then(function(bTargetZone) {
|
|
584
|
+
if (!bTargetZone) {
|
|
585
|
+
return false;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
var oMovedElement = oMovedOverlay.getElement();
|
|
589
|
+
var oTargetOverlay = oAggregationOverlay.getParent();
|
|
590
|
+
var oMovedRelevantContainer = oMovedOverlay.getRelevantContainer();
|
|
591
|
+
|
|
592
|
+
// the element or the parent overlay might be destroyed or not available
|
|
593
|
+
if (!oMovedElement || !oTargetOverlay) {
|
|
594
|
+
return false;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
var oTargetElement = oTargetOverlay.getElement();
|
|
598
|
+
var oAggregationDtMetadata = oAggregationOverlay.getDesignTimeMetadata();
|
|
599
|
+
|
|
600
|
+
// determine target relevantContainer
|
|
601
|
+
var vTargetRelevantContainerAfterMove = MetadataPropagationUtil.getRelevantContainerForPropagation(oAggregationDtMetadata.getData(), oMovedElement);
|
|
602
|
+
vTargetRelevantContainerAfterMove = vTargetRelevantContainerAfterMove || oTargetElement;
|
|
603
|
+
|
|
604
|
+
// check for same relevantContainer
|
|
605
|
+
if (
|
|
606
|
+
!oMovedRelevantContainer
|
|
607
|
+
|| !vTargetRelevantContainerAfterMove
|
|
608
|
+
|| !hasStableId(oTargetOverlay)
|
|
609
|
+
|| oMovedRelevantContainer !== vTargetRelevantContainerAfterMove
|
|
610
|
+
) {
|
|
611
|
+
return false;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
// check if binding context is the same
|
|
615
|
+
if (
|
|
616
|
+
// binding context is not relevant if the element is being moved inside its parent
|
|
617
|
+
oMovedOverlay.getParent().getElement() !== oTargetElement
|
|
618
|
+
&& !Utils.checkSourceTargetBindingCompatibility(oMovedElement, oTargetElement)
|
|
619
|
+
) {
|
|
620
|
+
return false;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
// check if movedOverlay is movable into the target aggregation
|
|
624
|
+
return fnHasMoveAction(oAggregationOverlay, oMovedElement, vTargetRelevantContainerAfterMove, oPlugin);
|
|
625
|
+
});
|
|
626
|
+
};
|
|
627
|
+
|
|
556
628
|
return Utils;
|
|
557
629
|
}, /* bExport= */true);
|
|
@@ -143,9 +143,10 @@ function(
|
|
|
143
143
|
var aIcons = [];
|
|
144
144
|
|
|
145
145
|
aUI5Icons.forEach(function(sName) {
|
|
146
|
+
var iconInfo = IconPool.getIconInfo(sName);
|
|
146
147
|
aIcons.push({
|
|
147
|
-
icon:
|
|
148
|
-
name: sName.toLowerCase()
|
|
148
|
+
icon: iconInfo.uri,
|
|
149
|
+
name: (iconInfo.text === "") ? sName.toLowerCase() : iconInfo.text
|
|
149
150
|
});
|
|
150
151
|
});
|
|
151
152
|
|
|
@@ -283,7 +284,7 @@ function(
|
|
|
283
284
|
|
|
284
285
|
// initialize dialog and create member variables.
|
|
285
286
|
this.setTitle(oResources.getText("CREATE_APP_VARIANT_DIALOG_TITLE"));
|
|
286
|
-
this.setContentWidth("
|
|
287
|
+
this.setContentWidth("700px");
|
|
287
288
|
this.setContentHeight("250px");
|
|
288
289
|
|
|
289
290
|
oCustomTileModel = new JSONModel({
|