@openui5/sap.ui.rta 1.114.0 → 1.115.1
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 +0 -5
- package/THIRDPARTY.txt +0 -6
- 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 +67 -43
- package/src/sap/ui/rta/Utils.js +36 -2
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +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 -8
- package/src/sap/ui/rta/command/ControlVariantSave.js +5 -6
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +7 -10
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -5
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -12
- 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 +4 -2
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +1 -1
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +8 -0
- package/src/sap/ui/rta/messagebundle_ar.properties +7 -3
- package/src/sap/ui/rta/messagebundle_bg.properties +7 -3
- package/src/sap/ui/rta/messagebundle_ca.properties +7 -3
- package/src/sap/ui/rta/messagebundle_cs.properties +7 -3
- package/src/sap/ui/rta/messagebundle_cy.properties +7 -3
- package/src/sap/ui/rta/messagebundle_da.properties +6 -2
- package/src/sap/ui/rta/messagebundle_de.properties +6 -2
- package/src/sap/ui/rta/messagebundle_el.properties +7 -3
- package/src/sap/ui/rta/messagebundle_en.properties +4 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +4 -0
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +7 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -0
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +4 -0
- package/src/sap/ui/rta/messagebundle_es.properties +6 -2
- package/src/sap/ui/rta/messagebundle_es_MX.properties +7 -3
- package/src/sap/ui/rta/messagebundle_et.properties +7 -3
- package/src/sap/ui/rta/messagebundle_fi.properties +7 -3
- package/src/sap/ui/rta/messagebundle_fr.properties +6 -2
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +7 -3
- package/src/sap/ui/rta/messagebundle_hi.properties +7 -3
- package/src/sap/ui/rta/messagebundle_hr.properties +7 -3
- package/src/sap/ui/rta/messagebundle_hu.properties +7 -3
- package/src/sap/ui/rta/messagebundle_id.properties +7 -3
- package/src/sap/ui/rta/messagebundle_it.properties +6 -2
- package/src/sap/ui/rta/messagebundle_iw.properties +7 -3
- package/src/sap/ui/rta/messagebundle_ja.properties +20 -16
- package/src/sap/ui/rta/messagebundle_kk.properties +7 -3
- package/src/sap/ui/rta/messagebundle_ko.properties +7 -3
- package/src/sap/ui/rta/messagebundle_lt.properties +7 -3
- package/src/sap/ui/rta/messagebundle_lv.properties +7 -3
- package/src/sap/ui/rta/messagebundle_ms.properties +7 -3
- package/src/sap/ui/rta/messagebundle_nl.properties +6 -2
- package/src/sap/ui/rta/messagebundle_no.properties +7 -3
- package/src/sap/ui/rta/messagebundle_pl.properties +7 -3
- package/src/sap/ui/rta/messagebundle_pt.properties +6 -2
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +6 -2
- package/src/sap/ui/rta/messagebundle_ro.properties +6 -2
- package/src/sap/ui/rta/messagebundle_ru.properties +7 -3
- package/src/sap/ui/rta/messagebundle_sh.properties +7 -3
- package/src/sap/ui/rta/messagebundle_sk.properties +7 -3
- package/src/sap/ui/rta/messagebundle_sl.properties +7 -3
- package/src/sap/ui/rta/messagebundle_sv.properties +6 -2
- package/src/sap/ui/rta/messagebundle_th.properties +8 -4
- package/src/sap/ui/rta/messagebundle_tr.properties +7 -3
- package/src/sap/ui/rta/messagebundle_uk.properties +7 -3
- package/src/sap/ui/rta/messagebundle_vi.properties +7 -3
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +7 -3
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +7 -3
- 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 +6 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +4 -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 +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 +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 +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.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 +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 +11 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +23 -4
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +2 -2
- 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 +52 -22
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +3 -2
- package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +2 -2
- 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 +30 -22
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +42 -24
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +5 -7
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +52 -1
- package/src/sap/ui/rta/view/RemoveElementDialog.fragment.xml +1 -1
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @author SAP SE
|
|
28
28
|
* @experimental Since 1.106
|
|
29
29
|
* @since 1.106
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.115.1
|
|
31
31
|
* @private
|
|
32
32
|
* @ui5-restricted
|
|
33
33
|
*/
|
|
@@ -122,6 +122,11 @@ sap.ui.define([
|
|
|
122
122
|
.then(console.log); // eslint-disable-line no-console
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
function printDesignTimeMetadata(oRta, mPayload) {
|
|
126
|
+
var oOverlay = Core.byId(mPayload.overlayId);
|
|
127
|
+
console.log(oOverlay.getDesignTimeMetadata().getData()); // eslint-disable-line no-console
|
|
128
|
+
}
|
|
129
|
+
|
|
125
130
|
// List of supported handlers
|
|
126
131
|
var mHandlers = {
|
|
127
132
|
getOverlayInfo: {
|
|
@@ -132,6 +137,10 @@ sap.ui.define([
|
|
|
132
137
|
printChangeHandler: {
|
|
133
138
|
handler: printChangeHandler,
|
|
134
139
|
id: "ui5FlexibilitySupport.submodules.overlayInfo"
|
|
140
|
+
},
|
|
141
|
+
printDesignTimeMetadata: {
|
|
142
|
+
handler: printDesignTimeMetadata,
|
|
143
|
+
id: "ui5FlexibilitySupport.submodules.overlayInfo"
|
|
135
144
|
}
|
|
136
145
|
};
|
|
137
146
|
|
|
@@ -143,6 +152,7 @@ sap.ui.define([
|
|
|
143
152
|
* - type: specifies, what action should be taken. Possible values:
|
|
144
153
|
* - getOverlayInfo (request information about an overlay)
|
|
145
154
|
* - printChangeHandler (a specified change handler object is to be printed to the console)
|
|
155
|
+
* - printDesignTimeMetadata (the calculated designtime metadata of the overlay is to be printed to the console)
|
|
146
156
|
* - content: type-specific information, e.g. for getOverlayInfo, an 'overlayId' is provided
|
|
147
157
|
*
|
|
148
158
|
* @method sap.ui.rta.service.SupportTools.onMessageReceived
|
|
@@ -53,7 +53,7 @@ sap.ui.define([
|
|
|
53
53
|
* @extends sap.ui.rta.toolbar.Base
|
|
54
54
|
*
|
|
55
55
|
* @author SAP SE
|
|
56
|
-
* @version 1.
|
|
56
|
+
* @version 1.115.1
|
|
57
57
|
*
|
|
58
58
|
* @constructor
|
|
59
59
|
* @private
|
|
@@ -352,15 +352,34 @@ sap.ui.define([
|
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
function onSaveAsAdaptation() {
|
|
355
|
-
this.
|
|
355
|
+
Utils.checkDraftOverwrite(this.getModel("versions"))
|
|
356
|
+
.then(function() {
|
|
357
|
+
this.getExtension("contextBasedSaveAs", SaveAsAdaptation).openAddAdaptationDialog(this.getRtaInformation().flexSettings.layer);
|
|
358
|
+
}.bind(this))
|
|
359
|
+
.catch(handleError);
|
|
356
360
|
}
|
|
357
361
|
|
|
358
362
|
function onEditAdaptation() {
|
|
359
|
-
this.
|
|
363
|
+
Utils.checkDraftOverwrite(this.getModel("versions"))
|
|
364
|
+
.then(function() {
|
|
365
|
+
this.getExtension("contextBasedSaveAs", SaveAsAdaptation).openAddAdaptationDialog(this.getRtaInformation().flexSettings.layer, true /*bIsEditMode*/);
|
|
366
|
+
}.bind(this))
|
|
367
|
+
.catch(handleError);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
function handleError(oError) {
|
|
371
|
+
if (oError !== "cancel") {
|
|
372
|
+
Utils.showMessageBox("error", "MSG_LREP_TRANSFER_ERROR", {error: oError});
|
|
373
|
+
Log.error("sap.ui.rta: " + oError.stack || oError.message || oError);
|
|
374
|
+
}
|
|
360
375
|
}
|
|
361
376
|
|
|
362
377
|
function onDeleteAdaptation() {
|
|
363
|
-
this.
|
|
378
|
+
Utils.checkDraftOverwrite(this.getModel("versions"))
|
|
379
|
+
.then(function() {
|
|
380
|
+
this.fireEvent("deleteAdaptation");
|
|
381
|
+
}.bind(this))
|
|
382
|
+
.catch(handleError);
|
|
364
383
|
}
|
|
365
384
|
|
|
366
385
|
function onManageAdaptations() {
|
|
@@ -32,7 +32,7 @@ function(
|
|
|
32
32
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.115.1
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
38
|
* @private
|
|
@@ -50,7 +50,7 @@ function(
|
|
|
50
50
|
|
|
51
51
|
Fiori.prototype.init = function () {
|
|
52
52
|
this._oRenderer = Utils.getFiori2Renderer();
|
|
53
|
-
this._oFioriHeader = this._oRenderer.getRootControl().
|
|
53
|
+
this._oFioriHeader = this._oRenderer.getRootControl().getShellHeader();
|
|
54
54
|
Adaptation.prototype.init.apply(this, arguments);
|
|
55
55
|
};
|
|
56
56
|
|
|
@@ -77,6 +77,8 @@ function(
|
|
|
77
77
|
moveDown: moveDown.bind(this),
|
|
78
78
|
onDropSelectedAdaptation: onDropSelectedAdaptation.bind(this),
|
|
79
79
|
onSaveReorderedAdaptations: onSaveReorderedAdaptations.bind(this),
|
|
80
|
+
isAdaptationsSelected: isAdaptationsSelected.bind(this),
|
|
81
|
+
getIndexOfSelectedAdaptation: getIndexOfSelectedAdaptation.bind(this),
|
|
80
82
|
onClose: onCloseDialog.bind(this)
|
|
81
83
|
}
|
|
82
84
|
}).then(function(oDialog) {
|
|
@@ -85,7 +87,7 @@ function(
|
|
|
85
87
|
this.getToolbar().addDependent(this._oManageAdaptationDialog);
|
|
86
88
|
}.bind(this));
|
|
87
89
|
} else {
|
|
88
|
-
|
|
90
|
+
syncEnabledPropertyOfMoveButtons.call(this);
|
|
89
91
|
enableDragAndDropForAdaptationTable.call(this, true);
|
|
90
92
|
enableSaveButton.call(this, false);
|
|
91
93
|
}
|
|
@@ -127,26 +129,36 @@ function(
|
|
|
127
129
|
var oOptions = {
|
|
128
130
|
year: "numeric",
|
|
129
131
|
month: "short",
|
|
130
|
-
day: "numeric"
|
|
132
|
+
day: "numeric",
|
|
133
|
+
hour: "numeric",
|
|
134
|
+
minute: "numeric"
|
|
131
135
|
};
|
|
132
136
|
var sLanguage = sap.ui.getCore().getConfiguration().getLanguage();
|
|
133
|
-
return sModifiedBy + "\n" + oUi5Date.
|
|
137
|
+
return sModifiedBy + "\n" + oUi5Date.toLocaleTimeString(sLanguage, oOptions);
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
function onSelectionChange(oEvent) {
|
|
137
141
|
if (oEvent.getParameter("selected") === true) {
|
|
138
142
|
this._oControlConfigurationModel.setProperty("/isTableItemSelected", true);
|
|
139
|
-
|
|
140
|
-
setEnabledPropertyOfMoveButton.call(this, true);
|
|
141
|
-
}
|
|
143
|
+
syncEnabledPropertyOfMoveButtons.call(this);
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
|
|
145
|
-
function
|
|
147
|
+
function syncEnabledPropertyOfMoveButtons() {
|
|
146
148
|
var oUpButton = getControlInDialog.call(this, "moveUpButton");
|
|
147
149
|
var oDownButton = getControlInDialog.call(this, "moveDownButton");
|
|
148
|
-
|
|
149
|
-
|
|
150
|
+
if (isSearchFieldValueEmpty.call(this)) {
|
|
151
|
+
if (isAdaptationsSelected.call(this)) {
|
|
152
|
+
oUpButton.setEnabled(getIndexOfSelectedAdaptation.call(this) > 0);
|
|
153
|
+
oDownButton.setEnabled(getIndexOfSelectedAdaptation.call(this) < this.oAdaptationsModel.getProperty("/count") - 1);
|
|
154
|
+
} else {
|
|
155
|
+
oUpButton.setEnabled(false);
|
|
156
|
+
oDownButton.setEnabled(false);
|
|
157
|
+
}
|
|
158
|
+
} else {
|
|
159
|
+
oUpButton.setEnabled(false);
|
|
160
|
+
oDownButton.setEnabled(false);
|
|
161
|
+
}
|
|
150
162
|
}
|
|
151
163
|
|
|
152
164
|
// ------ search field ------
|
|
@@ -157,7 +169,7 @@ function(
|
|
|
157
169
|
var oDefaultApplicationTable = getDefaultApplicationTable.call(this);
|
|
158
170
|
var sDefaultTableText = getDefaultApplicationTitle.call(this);
|
|
159
171
|
if (sQuery && sQuery.length > 0) {
|
|
160
|
-
|
|
172
|
+
syncEnabledPropertyOfMoveButtons.call(this);
|
|
161
173
|
enableDragAndDropForAdaptationTable.call(this, false);
|
|
162
174
|
//filter Table context
|
|
163
175
|
var oFilterByTitle = new Filter("title", FilterOperator.Contains, sQuery);
|
|
@@ -181,7 +193,7 @@ function(
|
|
|
181
193
|
} else {
|
|
182
194
|
enableDragAndDropForAdaptationTable.call(this, true);
|
|
183
195
|
if (this._oControlConfigurationModel.getProperty("/isTableItemSelected")) {
|
|
184
|
-
|
|
196
|
+
syncEnabledPropertyOfMoveButtons.call(this);
|
|
185
197
|
}
|
|
186
198
|
oDefaultApplicationTable.setVisible(true);
|
|
187
199
|
}
|
|
@@ -235,6 +247,7 @@ function(
|
|
|
235
247
|
// after move select the sibling
|
|
236
248
|
oTable.getItems()[iSiblingItemIndex].setSelected(true).focus();
|
|
237
249
|
enableSaveButton.call(this, didAdaptationsPriorityChange.call(this));
|
|
250
|
+
syncEnabledPropertyOfMoveButtons.call(this);
|
|
238
251
|
}
|
|
239
252
|
|
|
240
253
|
function onDropSelectedAdaptation(oEvent) {
|
|
@@ -318,20 +331,37 @@ function(
|
|
|
318
331
|
getAdaptationsTable.call(this).getDragDropConfig()[0].setEnabled(bIsEnabled);
|
|
319
332
|
}
|
|
320
333
|
|
|
334
|
+
function isAdaptationsSelected() {
|
|
335
|
+
var oAdaptationsTable = getAdaptationsTable.call(this);
|
|
336
|
+
return oAdaptationsTable.getSelectedContextPaths().length > 0;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
function getIndexOfSelectedAdaptation() {
|
|
340
|
+
var oAdaptationsTable = getAdaptationsTable.call(this);
|
|
341
|
+
if (oAdaptationsTable.getSelectedContextPaths().length > 0) {
|
|
342
|
+
var aSplitedPath = oAdaptationsTable.getSelectedContextPaths()[0].split("/");
|
|
343
|
+
var iIndexOfSelectedItem = Number(aSplitedPath[aSplitedPath.length - 1]);
|
|
344
|
+
return iIndexOfSelectedItem;
|
|
345
|
+
}
|
|
346
|
+
return -1;
|
|
347
|
+
}
|
|
348
|
+
|
|
321
349
|
function onSaveReorderedAdaptations() {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
350
|
+
Utils.checkDraftOverwrite(this.getModel("versions")).then(function() {
|
|
351
|
+
var oRtaInformation = this.getToolbar().getRtaInformation();
|
|
352
|
+
var aAdaptationPriorities = this.oAdaptationsModel.getProperty("/adaptations").map(function(oAdaptation) { return oAdaptation.id; });
|
|
353
|
+
return ContextBasedAdaptationsAPI.reorder({control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer, parameters: {priorities: aAdaptationPriorities}});
|
|
354
|
+
}.bind(this)).then(function() {
|
|
355
|
+
var oAllUpdatedAdaptations = Object.assign(this.oAdaptationsModel.getProperty("/allAdaptations"), this.oAdaptationsModel.getProperty("/adaptations"));
|
|
356
|
+
this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
|
|
357
|
+
onCloseDialog.call(this);
|
|
358
|
+
}.bind(this))
|
|
325
359
|
.catch(function(oError) {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
Utils.showMessageBox("error", sMessage, oOptions);
|
|
360
|
+
if (oError !== "cancel") {
|
|
361
|
+
Utils.showMessageBox("error", "MSG_LREP_TRANSFER_ERROR", { titleKey: "BTN_MANAGE_APP_CTX", error: oError});
|
|
362
|
+
Log.error("sap.ui.rta: " + oError.stack || oError.message || oError);
|
|
363
|
+
}
|
|
331
364
|
});
|
|
332
|
-
var oAllUpdatedAdaptations = Object.assign(this.oAdaptationsModel.getProperty("/allAdaptations"), this.oAdaptationsModel.getProperty("/adaptations"));
|
|
333
|
-
this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
|
|
334
|
-
onCloseDialog.call(this);
|
|
335
365
|
}
|
|
336
366
|
|
|
337
367
|
function onCloseDialog() {
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
* @class
|
|
44
44
|
*
|
|
45
45
|
* @author SAP SE
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.115.1
|
|
47
47
|
*
|
|
48
48
|
* @constructor
|
|
49
49
|
* @private
|
|
@@ -279,7 +279,8 @@ sap.ui.define([
|
|
|
279
279
|
var oInputField = this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input");
|
|
280
280
|
var bEnable;
|
|
281
281
|
var bRolesSelectedAndValidTitle = this._oContextComponentInstance.getSelectedContexts().role.length > 0
|
|
282
|
-
&& oInputField.getValueState() === ValueState.None
|
|
282
|
+
&& oInputField.getValueState() === ValueState.None
|
|
283
|
+
&& oInputField.getValue().length > 0;
|
|
283
284
|
if (this._bIsEditMode && this._mEditProperties && this.oDialogModel) {
|
|
284
285
|
bEnable = bRolesSelectedAndValidTitle
|
|
285
286
|
// check that some of the properties title, priority, roles have been changed
|
|
@@ -36,7 +36,7 @@ sap.ui.define([
|
|
|
36
36
|
* @class
|
|
37
37
|
*
|
|
38
38
|
* @author SAP SE
|
|
39
|
-
* @version 1.
|
|
39
|
+
* @version 1.115.1
|
|
40
40
|
*
|
|
41
41
|
* @constructor
|
|
42
42
|
* @private
|
|
@@ -124,7 +124,7 @@ sap.ui.define([
|
|
|
124
124
|
|
|
125
125
|
return DateFormat.getInstance({
|
|
126
126
|
format: "yMMMdjm"
|
|
127
|
-
}).format(new Date(sTimeStamp));
|
|
127
|
+
}).format(new Date(sTimeStamp + "Z"));
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
function getGroupHeaderFactory(oGroup) {
|
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @namespace sap.ui.rta.util.ReloadManager
|
|
31
31
|
* @alias sap.ui.rta.util.ReloadManager
|
|
32
32
|
* @since 1.104
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.115.1
|
|
34
34
|
* @private
|
|
35
35
|
* @ui5-restricted
|
|
36
36
|
*/
|
|
@@ -77,7 +77,7 @@ sap.ui.define([
|
|
|
77
77
|
sReason = "MSG_DRAFT_EXISTS";
|
|
78
78
|
} else if (oReloadInfo.allContexts) {
|
|
79
79
|
sReason = "MSG_RESTRICTED_CONTEXT_EXIST";
|
|
80
|
-
}
|
|
80
|
+
}// TODO add app descr changes case for start?
|
|
81
81
|
return sReason;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -94,6 +94,9 @@ sap.ui.define([
|
|
|
94
94
|
if (oReloadInfo.allContexts) {
|
|
95
95
|
return "MSG_RELOAD_WITH_PERSONALIZATION_AND_RESTRICTED_CONTEXT";
|
|
96
96
|
}
|
|
97
|
+
if (oReloadInfo.switchEndUserAdaptation) {
|
|
98
|
+
return "MSG_RELOAD_WITH_PERSONALIZATION_AND_CONTEXT_BASED_ADAPTATION";
|
|
99
|
+
}
|
|
97
100
|
return "MSG_RELOAD_WITH_PERSONALIZATION_AND_VIEWS";
|
|
98
101
|
}
|
|
99
102
|
|
|
@@ -112,6 +115,10 @@ sap.ui.define([
|
|
|
112
115
|
if (oReloadInfo.allContexts) {
|
|
113
116
|
return "MSG_RELOAD_WITHOUT_ALL_CONTEXT";
|
|
114
117
|
}
|
|
118
|
+
|
|
119
|
+
if (oReloadInfo.switchEndUserAdaptation) {
|
|
120
|
+
return "MSG_RELOAD_OTHER_CONTEXT_BASED_ADAPTATION";
|
|
121
|
+
}
|
|
115
122
|
return undefined;
|
|
116
123
|
}
|
|
117
124
|
|
|
@@ -127,33 +134,34 @@ sap.ui.define([
|
|
|
127
134
|
}
|
|
128
135
|
|
|
129
136
|
function triggerReloadOnStart(oReloadInfo, bVersioningEnabled, bDeveloperMode) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
return Promise.resolve().then(function() {
|
|
138
|
+
if (mUShellServices.CrossApplicationNavigation && bVersioningEnabled) {
|
|
139
|
+
// clears FlexState and triggers reloading of the flex data without blocking
|
|
140
|
+
if (oReloadInfo.isDraftAvailable) {
|
|
141
|
+
return VersionsAPI.loadDraftForApplication({
|
|
142
|
+
control: oReloadInfo.selector,
|
|
143
|
+
layer: oReloadInfo.layer,
|
|
144
|
+
allContexts: oReloadInfo.allContexts,
|
|
145
|
+
adaptationId: oReloadInfo.adaptationId
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
return VersionsAPI.loadVersionForApplication({
|
|
141
149
|
control: oReloadInfo.selector,
|
|
142
150
|
layer: oReloadInfo.layer,
|
|
143
151
|
allContexts: oReloadInfo.allContexts,
|
|
144
152
|
adaptationId: oReloadInfo.adaptationId
|
|
145
153
|
});
|
|
146
154
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
155
|
+
return undefined;
|
|
156
|
+
}).then(function() {
|
|
157
|
+
var sReason = getReloadMessageOnStart(oReloadInfo);
|
|
158
|
+
// showing messages in visual editor is leading to blocked screen. In this case we should reload without message
|
|
159
|
+
return bDeveloperMode ? undefined : Utils.showMessageBox("information", sReason);
|
|
160
|
+
}).then(function() {
|
|
152
161
|
ReloadManager.enableAutomaticStart(oReloadInfo.layer, oReloadInfo.selector);
|
|
153
162
|
oReloadInfo.onStart = true;
|
|
154
163
|
return ReloadManager.triggerReload(oReloadInfo);
|
|
155
|
-
})
|
|
156
|
-
.then(function() {
|
|
164
|
+
}).then(function() {
|
|
157
165
|
return true;
|
|
158
166
|
});
|
|
159
167
|
}
|
|
@@ -270,6 +278,7 @@ sap.ui.define([
|
|
|
270
278
|
* @param {sap.ui.fl.Selector} mProperties.selector - Root control
|
|
271
279
|
* @param {boolean} mProperties.versioningEnabled - Whether versioning is enabled
|
|
272
280
|
* @param {boolean} mProperties.developerMode - Whether the developer mode is set
|
|
281
|
+
* @param {string} mProperties.adaptationId - Context-based adaptation ID of the currently displayed adaptation
|
|
273
282
|
*
|
|
274
283
|
* @return {Promise<boolean>} Resolving to <code>false</code> means that reload is not necessary
|
|
275
284
|
*/
|
|
@@ -282,8 +291,7 @@ sap.ui.define([
|
|
|
282
291
|
URLParsingService: mUShellServices.URLParsing
|
|
283
292
|
});
|
|
284
293
|
return ReloadInfoAPI.getReloadReasonsForStart(mProperties).then(function(oReloadInfo) {
|
|
285
|
-
|
|
286
|
-
if (oReloadInfo.hasHigherLayerChanges || oReloadInfo.isDraftAvailable || oReloadInfo.allContexts) {
|
|
294
|
+
if (oReloadInfo.hasHigherLayerChanges || oReloadInfo.isDraftAvailable || oReloadInfo.allContexts || oReloadInfo.switchAdaptation) {
|
|
287
295
|
return triggerReloadOnStart(oReloadInfo, mProperties.versioningEnabled, mProperties.developerMode);
|
|
288
296
|
}
|
|
289
297
|
return undefined;
|
|
@@ -40,7 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
|
|
41
41
|
* @author SAP SE
|
|
42
42
|
* @since 1.84.0
|
|
43
|
-
* @version 1.
|
|
43
|
+
* @version 1.115.1
|
|
44
44
|
* @private
|
|
45
45
|
*/
|
|
46
46
|
var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
|
|
@@ -106,6 +106,8 @@ sap.ui.define([
|
|
|
106
106
|
type: "object"
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
},
|
|
110
|
+
detailPopoverOpened: {
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
113
|
},
|
|
@@ -140,8 +142,8 @@ sap.ui.define([
|
|
|
140
142
|
constructor: function() {
|
|
141
143
|
this._oDetailModel = new JSONModel();
|
|
142
144
|
this._oDetailModel.setDefaultBindingMode("OneWay");
|
|
143
|
-
this._fnHoverTrue = this.
|
|
144
|
-
this._fnHoverFalse = this.
|
|
145
|
+
this._fnHoverTrue = this._setHoverStyleClasses.bind(this, true);
|
|
146
|
+
this._fnHoverFalse = this._setHoverStyleClasses.bind(this, false);
|
|
145
147
|
Control.prototype.constructor.apply(this, arguments);
|
|
146
148
|
// is needed to prevent that multiple events listeners are attached
|
|
147
149
|
// to the same overlay because setVisible is called multiple times
|
|
@@ -149,14 +151,19 @@ sap.ui.define([
|
|
|
149
151
|
}
|
|
150
152
|
});
|
|
151
153
|
|
|
152
|
-
function
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
154
|
+
function handleBrowserEventsOnOverlay(oOverlay, sEventHandler) {
|
|
155
|
+
oOverlay[sEventHandler]("click", this._onSelect, this);
|
|
156
|
+
oOverlay[sEventHandler]("tap", this._onSelect, this);
|
|
157
|
+
oOverlay[sEventHandler]("keydown", this._onKeyDown, this);
|
|
158
|
+
oOverlay[sEventHandler]("mouseover", this._fnHoverTrue);
|
|
159
|
+
oOverlay[sEventHandler]("focusin", this._fnHoverTrue);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Hover/focus events are handled by the ChangeVisualization (because it can affect multiple indicators at once)
|
|
163
|
+
function handleBrowserEventsOnIndicator(oIndicator, sEventHandler) {
|
|
164
|
+
oIndicator[sEventHandler]("click", this._onSelect, this);
|
|
165
|
+
oIndicator[sEventHandler]("tap", this._onSelect, this);
|
|
166
|
+
oIndicator[sEventHandler]("keydown", this._onKeyDown, this);
|
|
160
167
|
}
|
|
161
168
|
|
|
162
169
|
function centerVertically(oIndicator) {
|
|
@@ -257,7 +264,7 @@ sap.ui.define([
|
|
|
257
264
|
|
|
258
265
|
ChangeIndicator.prototype.init = function() {
|
|
259
266
|
this._iOldTabIndex = 0;
|
|
260
|
-
|
|
267
|
+
handleBrowserEventsOnIndicator.call(this, this, "attachBrowserEvent");
|
|
261
268
|
};
|
|
262
269
|
|
|
263
270
|
ChangeIndicator.prototype.setVisible = function(bVisible) {
|
|
@@ -266,11 +273,11 @@ sap.ui.define([
|
|
|
266
273
|
// needed because the change indicator cleanup is only triggered on save and exit
|
|
267
274
|
if (oOverlay) {
|
|
268
275
|
if (bVisible && !this._bEventAttachedToElement) {
|
|
269
|
-
|
|
276
|
+
handleBrowserEventsOnOverlay.call(this, oOverlay, "attachBrowserEvent");
|
|
270
277
|
this._bEventAttachedToElement = true;
|
|
271
278
|
}
|
|
272
279
|
if (!bVisible) {
|
|
273
|
-
|
|
280
|
+
handleBrowserEventsOnOverlay.call(this, oOverlay, "detachBrowserEvent");
|
|
274
281
|
this._bEventAttachedToElement = false;
|
|
275
282
|
if (this.getAggregation("_popover")) {
|
|
276
283
|
this.getAggregation("_popover").destroy();
|
|
@@ -320,7 +327,7 @@ sap.ui.define([
|
|
|
320
327
|
if (this._bScheduledForFocus) {
|
|
321
328
|
// Element was supposed to be focused before rendering
|
|
322
329
|
this.focus();
|
|
323
|
-
this.
|
|
330
|
+
this._setHoverStyleClasses(true);
|
|
324
331
|
}
|
|
325
332
|
};
|
|
326
333
|
|
|
@@ -334,9 +341,9 @@ sap.ui.define([
|
|
|
334
341
|
if (this.getAggregation("_popover")) {
|
|
335
342
|
this.getAggregation("_popover").destroy();
|
|
336
343
|
}
|
|
337
|
-
|
|
344
|
+
handleBrowserEventsOnOverlay.call(this, oOverlay, "detachBrowserEvent");
|
|
338
345
|
}
|
|
339
|
-
|
|
346
|
+
handleBrowserEventsOnIndicator.call(this, this, "detachBrowserEvent");
|
|
340
347
|
};
|
|
341
348
|
|
|
342
349
|
ChangeIndicator.prototype.setChanges = function(aChanges) {
|
|
@@ -353,7 +360,7 @@ sap.ui.define([
|
|
|
353
360
|
ChangeIndicator.prototype._onSelect = function(oEvent) {
|
|
354
361
|
this.focus();
|
|
355
362
|
oEvent.stopPropagation();
|
|
356
|
-
this.
|
|
363
|
+
this._toggleDetailPopover();
|
|
357
364
|
};
|
|
358
365
|
|
|
359
366
|
ChangeIndicator.prototype._onKeyDown = function(oEvent) {
|
|
@@ -366,11 +373,19 @@ sap.ui.define([
|
|
|
366
373
|
});
|
|
367
374
|
};
|
|
368
375
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
376
|
+
// When the detail popover is opened the overlay should be selected
|
|
377
|
+
ChangeIndicator.prototype.onDetailPopoverOpened = function(oEvent) {
|
|
378
|
+
oEvent.preventDefault();
|
|
379
|
+
this._setHoverStyleClasses(true);
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
ChangeIndicator.prototype.onIndicatorBrowserInteraction = function(bAdd, oEvent) {
|
|
383
|
+
oEvent.stopPropagation();
|
|
384
|
+
oEvent.preventDefault();
|
|
385
|
+
this._setHoverStyleClasses(bAdd);
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
ChangeIndicator.prototype._setHoverStyleClasses = function(bAdd) {
|
|
374
389
|
var oOverlay = Core.byId(this.getOverlayId());
|
|
375
390
|
if (oOverlay.getMetadata().getName() !== "sap.ui.dt.ElementOverlay") {
|
|
376
391
|
return;
|
|
@@ -380,7 +395,7 @@ sap.ui.define([
|
|
|
380
395
|
this[sFunctionName]("sapUiRtaHover");
|
|
381
396
|
};
|
|
382
397
|
|
|
383
|
-
ChangeIndicator.prototype.
|
|
398
|
+
ChangeIndicator.prototype._toggleDetailPopover = function() {
|
|
384
399
|
if (!this.getAggregation("_popover")) {
|
|
385
400
|
//store the tabindex (tabindex will be removed on opening the popover)
|
|
386
401
|
this._iOldTabIndex = this.getDomRef().getAttribute("tabindex");
|
|
@@ -393,13 +408,16 @@ sap.ui.define([
|
|
|
393
408
|
this.setAggregation("_popover", oPopover);
|
|
394
409
|
oPopover.setModel(this._oDetailModel, "details");
|
|
395
410
|
oPopover.openBy(this);
|
|
411
|
+
this.fireDetailPopoverOpened();
|
|
396
412
|
}.bind(this));
|
|
397
413
|
} else {
|
|
398
414
|
if (this.getAggregation("_popover").isOpen()) {
|
|
399
415
|
return this.getAggregation("_popover").close();
|
|
400
416
|
}
|
|
401
417
|
this.getAggregation("_popover").openBy(this);
|
|
418
|
+
this.fireDetailPopoverOpened();
|
|
402
419
|
}
|
|
420
|
+
return undefined;
|
|
403
421
|
};
|
|
404
422
|
|
|
405
423
|
ChangeIndicator.prototype._showDependentElements = function(oEvent) {
|