@openui5/sap.ui.rta 1.110.0 → 1.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +30 -11
- 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 +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +14 -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 +1 -1
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +1 -1
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +7 -1
- package/src/sap/ui/rta/messagebundle_ar.properties +4 -1
- package/src/sap/ui/rta/messagebundle_bg.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ca.properties +4 -1
- package/src/sap/ui/rta/messagebundle_cs.properties +4 -1
- package/src/sap/ui/rta/messagebundle_cy.properties +4 -1
- package/src/sap/ui/rta/messagebundle_da.properties +4 -1
- package/src/sap/ui/rta/messagebundle_de.properties +4 -1
- package/src/sap/ui/rta/messagebundle_el.properties +4 -1
- package/src/sap/ui/rta/messagebundle_en.properties +4 -1
- package/src/sap/ui/rta/messagebundle_en_GB.properties +4 -1
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +4 -1
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +10 -1
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +4 -1
- package/src/sap/ui/rta/messagebundle_es.properties +4 -1
- package/src/sap/ui/rta/messagebundle_es_MX.properties +4 -1
- package/src/sap/ui/rta/messagebundle_et.properties +4 -1
- package/src/sap/ui/rta/messagebundle_fi.properties +4 -1
- package/src/sap/ui/rta/messagebundle_fr.properties +4 -1
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +4 -1
- package/src/sap/ui/rta/messagebundle_hi.properties +4 -1
- package/src/sap/ui/rta/messagebundle_hr.properties +4 -1
- package/src/sap/ui/rta/messagebundle_hu.properties +4 -1
- package/src/sap/ui/rta/messagebundle_id.properties +4 -1
- package/src/sap/ui/rta/messagebundle_it.properties +4 -1
- package/src/sap/ui/rta/messagebundle_iw.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ja.properties +4 -1
- package/src/sap/ui/rta/messagebundle_kk.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ko.properties +4 -1
- package/src/sap/ui/rta/messagebundle_lt.properties +4 -1
- package/src/sap/ui/rta/messagebundle_lv.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ms.properties +4 -1
- package/src/sap/ui/rta/messagebundle_nl.properties +4 -1
- package/src/sap/ui/rta/messagebundle_no.properties +4 -1
- package/src/sap/ui/rta/messagebundle_pl.properties +4 -1
- package/src/sap/ui/rta/messagebundle_pt.properties +4 -1
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ro.properties +4 -1
- package/src/sap/ui/rta/messagebundle_ru.properties +4 -1
- package/src/sap/ui/rta/messagebundle_sh.properties +4 -1
- package/src/sap/ui/rta/messagebundle_sk.properties +4 -1
- package/src/sap/ui/rta/messagebundle_sl.properties +4 -1
- package/src/sap/ui/rta/messagebundle_sv.properties +4 -1
- package/src/sap/ui/rta/messagebundle_th.properties +4 -1
- package/src/sap/ui/rta/messagebundle_tr.properties +4 -1
- package/src/sap/ui/rta/messagebundle_uk.properties +4 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +4 -1
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +4 -1
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +4 -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 +2 -2
- 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 +10 -3
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +2 -2
- package/src/sap/ui/rta/plugin/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +3 -2
- package/src/sap/ui/rta/plugin/Resize.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +2 -2
- 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/AdditionalElementsAnalyzer.js +3 -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 +1 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +5 -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 +80 -3
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +5 -2
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +49 -9
- 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/changeVisualization/ChangeIndicator.js +2 -4
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +19 -1
|
@@ -70,7 +70,7 @@ sap.ui.define([
|
|
|
70
70
|
* @extends sap.ui.dt.Plugin
|
|
71
71
|
*
|
|
72
72
|
* @author SAP SE
|
|
73
|
-
* @version 1.
|
|
73
|
+
* @version 1.111.0
|
|
74
74
|
*
|
|
75
75
|
* @constructor
|
|
76
76
|
* @private
|
|
@@ -189,11 +189,18 @@ sap.ui.define([
|
|
|
189
189
|
}.bind(this));
|
|
190
190
|
} else if (oParams.type === "addOrSetAggregation") {
|
|
191
191
|
debounceFunction(this._mDebounceFunctions["addOrSet"], oOverlay, oParams.name, function() {
|
|
192
|
-
|
|
192
|
+
// Designtime might have been destroyed while waiting for the debounce callback
|
|
193
|
+
// In this case, the updates are no longer relevant
|
|
194
|
+
var oDesignTime = this.getDesignTime();
|
|
195
|
+
if (!oDesignTime) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (oDesignTime.getStatus() === "synced") {
|
|
193
200
|
aRelevantOverlays = this._getRelevantOverlays(oOverlay, oParams.name);
|
|
194
201
|
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
195
202
|
} else {
|
|
196
|
-
|
|
203
|
+
oDesignTime.attachEventOnce("synced", function () {
|
|
197
204
|
aRelevantOverlays = this._getRelevantOverlays(oOverlay, oParams.name);
|
|
198
205
|
this.evaluateEditable(aRelevantOverlays, {onRegistration: false});
|
|
199
206
|
}, this);
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @class The Remove allows trigger remove operations on the overlay
|
|
30
30
|
* @extends sap.ui.rta.plugin.Plugin
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.111.0
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
35
35
|
* @since 1.34
|
|
@@ -174,7 +174,7 @@ sap.ui.define([
|
|
|
174
174
|
* @private
|
|
175
175
|
*/
|
|
176
176
|
Remove.prototype._onKeyDown = function(oEvent) {
|
|
177
|
-
if (oEvent.keyCode === KeyCodes.DELETE) {
|
|
177
|
+
if (oEvent.keyCode === KeyCodes.DELETE || oEvent.keyCode === KeyCodes.BACKSPACE) {
|
|
178
178
|
oEvent.stopPropagation();
|
|
179
179
|
this.removeElement();
|
|
180
180
|
}
|
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* Provides Rename handling functionality
|
|
58
58
|
*
|
|
59
59
|
* @author SAP SE
|
|
60
|
-
* @version 1.
|
|
60
|
+
* @version 1.111.0
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @private
|
|
@@ -449,7 +449,8 @@ sap.ui.define([
|
|
|
449
449
|
RenameHandler._preventDefault.call(this, oEvent);
|
|
450
450
|
break;
|
|
451
451
|
case KeyCodes.DELETE:
|
|
452
|
-
|
|
452
|
+
case KeyCodes.BACKSPACE:
|
|
453
|
+
//Incident IDs: #1680315103, #2380033173
|
|
453
454
|
RenameHandler._stopPropagation.call(this, oEvent);
|
|
454
455
|
break;
|
|
455
456
|
default:
|
|
@@ -30,7 +30,7 @@ function (
|
|
|
30
30
|
* @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
|
|
31
31
|
* @extends sap.ui.rta.plugin.Plugin
|
|
32
32
|
* @author SAP SE
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.111.0
|
|
34
34
|
* @constructor
|
|
35
35
|
* @private
|
|
36
36
|
* @since 1.34
|
|
@@ -260,7 +260,7 @@ function (
|
|
|
260
260
|
}
|
|
261
261
|
return;
|
|
262
262
|
}
|
|
263
|
-
var bMultiSelection = oEvent.metaKey || oEvent.ctrlKey;
|
|
263
|
+
var bMultiSelection = oEvent.metaKey || oEvent.ctrlKey || oEvent.shiftKey;
|
|
264
264
|
var bContextMenu = oEvent.type === "contextmenu";
|
|
265
265
|
|
|
266
266
|
if (oOverlay && oOverlay.getSelectable()) {
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.111.0
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.94
|
|
38
38
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -380,7 +380,9 @@ sap.ui.define([
|
|
|
380
380
|
if (mModelProperty.hideFromReveal) {
|
|
381
381
|
return false;
|
|
382
382
|
}
|
|
383
|
-
|
|
383
|
+
if (bHasAddViaDelegate) {
|
|
384
|
+
_enhanceInvisibleElement(oInvisibleElement, mModelProperty);
|
|
385
|
+
}
|
|
384
386
|
return true;
|
|
385
387
|
}
|
|
386
388
|
// if model property is not found, it depends if the hidden field is a removed custom field (AddViaDelegate case) or a standard field.
|
|
@@ -75,7 +75,7 @@ sap.ui.define([
|
|
|
75
75
|
* @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
|
|
76
76
|
* @extends sap.ui.rta.plugin.Plugin
|
|
77
77
|
* @author SAP SE
|
|
78
|
-
* @version 1.
|
|
78
|
+
* @version 1.111.0
|
|
79
79
|
* @constructor
|
|
80
80
|
* @private
|
|
81
81
|
* @since 1.44
|
|
@@ -15,7 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
* Helper object containing methods for the AdditionalElements plugin
|
|
16
16
|
*
|
|
17
17
|
* @author SAP SE
|
|
18
|
-
* @version 1.
|
|
18
|
+
* @version 1.111.0
|
|
19
19
|
* @private
|
|
20
20
|
* @since 1.94
|
|
21
21
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* Helper object to build the RTA commands resulting from the AdditionalElements Plugin
|
|
26
26
|
*
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.111.0
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.94
|
|
31
31
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -110,7 +110,7 @@ sap.ui.define([
|
|
|
110
110
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
111
111
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
112
112
|
* @author SAP SE
|
|
113
|
-
* @version 1.
|
|
113
|
+
* @version 1.111.0
|
|
114
114
|
* @constructor
|
|
115
115
|
* @private
|
|
116
116
|
* @since 1.75
|
|
@@ -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.111.0
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
38
|
* @private
|
|
@@ -94,7 +94,10 @@ function(
|
|
|
94
94
|
Fiori.prototype.hide = function () {
|
|
95
95
|
return Adaptation.prototype.hide.apply(this, arguments)
|
|
96
96
|
.then(function () {
|
|
97
|
-
this._oFioriHeader
|
|
97
|
+
//TODO: this._oFioriHeader should never be empty here
|
|
98
|
+
if (this._oFioriHeader) {
|
|
99
|
+
this._oFioriHeader.removeStyleClass(FIORI_HIDDEN_CLASS);
|
|
100
|
+
}
|
|
98
101
|
}.bind(this));
|
|
99
102
|
};
|
|
100
103
|
|
|
@@ -12,7 +12,10 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/core/Fragment",
|
|
13
13
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
14
14
|
"sap/m/ColumnListItem",
|
|
15
|
-
"sap/ui/rta/Utils"
|
|
15
|
+
"sap/ui/rta/Utils",
|
|
16
|
+
"sap/ui/model/Filter",
|
|
17
|
+
"sap/ui/model/FilterOperator",
|
|
18
|
+
"sap/ui/model/json/JSONModel"
|
|
16
19
|
],
|
|
17
20
|
function(
|
|
18
21
|
Log,
|
|
@@ -21,7 +24,10 @@ function(
|
|
|
21
24
|
Fragment,
|
|
22
25
|
ContextBasedAdaptationsAPI,
|
|
23
26
|
ColumnListItem,
|
|
24
|
-
Utils
|
|
27
|
+
Utils,
|
|
28
|
+
Filter,
|
|
29
|
+
FilterOperator,
|
|
30
|
+
JSONModel
|
|
25
31
|
) {
|
|
26
32
|
"use strict";
|
|
27
33
|
|
|
@@ -61,6 +67,7 @@ function(
|
|
|
61
67
|
controller: {
|
|
62
68
|
formatContextColumnCell: formatContextColumnCell.bind(this),
|
|
63
69
|
formatContextColumnTooltip: formatContextColumnTooltip.bind(this),
|
|
70
|
+
onLiveSearch: onLiveSearch.bind(this),
|
|
64
71
|
moveUp: moveUp.bind(this),
|
|
65
72
|
moveDown: moveDown.bind(this),
|
|
66
73
|
onDropSelectedAdaptation: onDropSelectedAdaptation.bind(this),
|
|
@@ -78,6 +85,7 @@ function(
|
|
|
78
85
|
}.bind(this));
|
|
79
86
|
} else {
|
|
80
87
|
setEnabledPropertyOfMoveButton.call(this, false);
|
|
88
|
+
enableDragAndDropForAdaptationTable.call(this, true);
|
|
81
89
|
enableSaveButton.call(this, false);
|
|
82
90
|
}
|
|
83
91
|
return this._oManageAdaptationDialogPromise.then(function() {
|
|
@@ -86,7 +94,9 @@ function(
|
|
|
86
94
|
}.bind(this)).then(function(oAdaptationsModel) {
|
|
87
95
|
this.oAdaptationsModel = oAdaptationsModel;
|
|
88
96
|
this.oReferenceAdaptationsData = JSON.parse(JSON.stringify(oAdaptationsModel.getData()));
|
|
97
|
+
this._oControlConfigurationModel = new JSONModel({isTableItemSelected: false});
|
|
89
98
|
this._oManageAdaptationDialog.setModel(this.oAdaptationsModel, "contextBased");
|
|
99
|
+
this._oManageAdaptationDialog.setModel(this._oControlConfigurationModel, "controlConfiguration");
|
|
90
100
|
initializeRanks(this.oAdaptationsModel);
|
|
91
101
|
getAdaptationsTable.call(this).attachSelectionChange(onSelectionChange.bind(this));
|
|
92
102
|
return this._oManageAdaptationDialog.open();
|
|
@@ -112,7 +122,10 @@ function(
|
|
|
112
122
|
|
|
113
123
|
function onSelectionChange(oEvent) {
|
|
114
124
|
if (oEvent.getParameter("selected") === true) {
|
|
115
|
-
|
|
125
|
+
this._oControlConfigurationModel.setProperty("/isTableItemSelected", true);
|
|
126
|
+
if (isSearchFieldValueEmpty.call(this)) {
|
|
127
|
+
setEnabledPropertyOfMoveButton.call(this, true);
|
|
128
|
+
}
|
|
116
129
|
}
|
|
117
130
|
}
|
|
118
131
|
|
|
@@ -123,6 +136,47 @@ function(
|
|
|
123
136
|
oDownButton.setEnabled(bIsEnabled);
|
|
124
137
|
}
|
|
125
138
|
|
|
139
|
+
// ------ search field ------
|
|
140
|
+
function onLiveSearch(oEvent) {
|
|
141
|
+
var oFilters;
|
|
142
|
+
var sQuery = oEvent.getSource().getValue();
|
|
143
|
+
var oAdaptationsTable = getAdaptationsTable.call(this);
|
|
144
|
+
var oDefaultApplicationTable = getDefaultApplicationTable.call(this);
|
|
145
|
+
var sDefaultTableText = getDefaultApplicationTitle.call(this);
|
|
146
|
+
if (sQuery && sQuery.length > 0) {
|
|
147
|
+
setEnabledPropertyOfMoveButton.call(this, false);
|
|
148
|
+
enableDragAndDropForAdaptationTable.call(this, false);
|
|
149
|
+
//filter Table context
|
|
150
|
+
var oFilterByTitle = new Filter("title", FilterOperator.Contains, sQuery);
|
|
151
|
+
var oFilterByContextId = new Filter({
|
|
152
|
+
path: "contexts/role",
|
|
153
|
+
test: function(aRoles) {
|
|
154
|
+
return aRoles.some(function(sRole) {
|
|
155
|
+
return sRole.includes(sQuery.toUpperCase());
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
var oFilterCreatedBy = new Filter("createdBy", FilterOperator.Contains, sQuery);
|
|
160
|
+
var oFilterChangedBy = new Filter("changedBy", FilterOperator.Contains, sQuery);
|
|
161
|
+
oFilters = new Filter([oFilterByTitle, oFilterByContextId, oFilterCreatedBy, oFilterChangedBy]);
|
|
162
|
+
//Filter default Table context
|
|
163
|
+
if (sDefaultTableText.toUpperCase().includes(sQuery.toUpperCase())) {
|
|
164
|
+
oDefaultApplicationTable.setVisible(true);
|
|
165
|
+
} else {
|
|
166
|
+
oDefaultApplicationTable.setVisible(false);
|
|
167
|
+
}
|
|
168
|
+
} else {
|
|
169
|
+
enableDragAndDropForAdaptationTable.call(this, true);
|
|
170
|
+
if (this._oControlConfigurationModel.getProperty("/isTableItemSelected")) {
|
|
171
|
+
setEnabledPropertyOfMoveButton.call(this, true);
|
|
172
|
+
}
|
|
173
|
+
oDefaultApplicationTable.setVisible(true);
|
|
174
|
+
}
|
|
175
|
+
// update list binding
|
|
176
|
+
var oBindingTableContext = oAdaptationsTable.getBinding("items");
|
|
177
|
+
oBindingTableContext.filter(oFilters, "Application");
|
|
178
|
+
}
|
|
179
|
+
|
|
126
180
|
// ------ drag & drop of priority ------
|
|
127
181
|
function moveUp(oEvent) {
|
|
128
182
|
moveSelectedItem.call(this, "Up");
|
|
@@ -238,6 +292,26 @@ function(
|
|
|
238
292
|
return this.getToolbar().getControl("manageAdaptationDialog--" + sId);
|
|
239
293
|
}
|
|
240
294
|
|
|
295
|
+
function getDefaultApplicationTable() {
|
|
296
|
+
return getControlInDialog.call(this, "defaultContext");
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function getDefaultApplicationTitle() {
|
|
300
|
+
return getControlInDialog.call(this, "defaultApplicationTitle").getProperty("text");
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function getSearchField() {
|
|
304
|
+
return getControlInDialog.call(this, "searchField");
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
function isSearchFieldValueEmpty() {
|
|
308
|
+
return getSearchField.call(this).getValue().length === 0;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
function enableDragAndDropForAdaptationTable(bIsEnabled) {
|
|
312
|
+
getAdaptationsTable.call(this).getDragDropConfig()[0].setEnabled(bIsEnabled);
|
|
313
|
+
}
|
|
314
|
+
|
|
241
315
|
function onSaveReorderedAdaptations() {
|
|
242
316
|
if (didAdaptationsPriorityChange.call(this)) {
|
|
243
317
|
var oRtaInformation = this.getToolbar().getRtaInformation();
|
|
@@ -255,6 +329,9 @@ function(
|
|
|
255
329
|
}
|
|
256
330
|
|
|
257
331
|
function onCloseDialog() {
|
|
332
|
+
this._oControlConfigurationModel.setProperty("/isTableItemSelected", false);
|
|
333
|
+
getSearchField.call(this).setValue("");
|
|
334
|
+
getDefaultApplicationTable.call(this).setVisible(true);
|
|
258
335
|
this._oManageAdaptationDialog.getModel("contextBased").setData(null);
|
|
259
336
|
this._oManageAdaptationDialog.close();
|
|
260
337
|
}
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
}">
|
|
18
18
|
<headerToolbar>
|
|
19
19
|
<OverflowToolbar>
|
|
20
|
+
<SearchField id="searchField" liveChange=".onLiveSearch" width="80%" />
|
|
21
|
+
<ToolbarSpacer/>
|
|
20
22
|
<Button id="moveUpButton"
|
|
21
23
|
icon="sap-icon://navigation-up-arrow"
|
|
22
24
|
tooltip="{i18n>BTN_TOOLTIP_MOVE_UP}"
|
|
@@ -71,7 +73,8 @@
|
|
|
71
73
|
<CustomListItem>
|
|
72
74
|
<HBox>
|
|
73
75
|
<VBox class="sapUiSmallMarginTopBottom">
|
|
74
|
-
<Text text="{contextBased>title}"
|
|
76
|
+
<Text wrapping="false" maxLines="1" text="{contextBased>title}"
|
|
77
|
+
tooltip="{contextBased>title}"/>
|
|
75
78
|
</VBox>
|
|
76
79
|
</HBox>
|
|
77
80
|
</CustomListItem>
|
|
@@ -120,7 +123,7 @@
|
|
|
120
123
|
<CustomListItem>
|
|
121
124
|
<HBox>
|
|
122
125
|
<VBox class="sapUiSmallMarginTopBottom">
|
|
123
|
-
<Text text="{i18n>TXT_DEFAULT_APP}"/>
|
|
126
|
+
<Text id="defaultApplicationTitle" text="{i18n>TXT_DEFAULT_APP}"/>
|
|
124
127
|
<FormattedText htmlText=""/>
|
|
125
128
|
</VBox>
|
|
126
129
|
</HBox>
|
|
@@ -9,6 +9,7 @@ sap.ui.define([
|
|
|
9
9
|
"sap/base/Log",
|
|
10
10
|
"sap/base/strings/formatMessage",
|
|
11
11
|
"sap/ui/core/Fragment",
|
|
12
|
+
"sap/ui/core/ValueState",
|
|
12
13
|
"sap/ui/fl/Layer",
|
|
13
14
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
14
15
|
"sap/ui/fl/write/api/ContextSharingAPI",
|
|
@@ -20,6 +21,7 @@ sap.ui.define([
|
|
|
20
21
|
Log,
|
|
21
22
|
formatMessage,
|
|
22
23
|
Fragment,
|
|
24
|
+
ValueState,
|
|
23
25
|
Layer,
|
|
24
26
|
ContextBasedAdaptationsAPI,
|
|
25
27
|
ContextSharingAPI,
|
|
@@ -36,7 +38,7 @@ sap.ui.define([
|
|
|
36
38
|
* @class
|
|
37
39
|
*
|
|
38
40
|
* @author SAP SE
|
|
39
|
-
* @version 1.
|
|
41
|
+
* @version 1.111.0
|
|
40
42
|
*
|
|
41
43
|
* @constructor
|
|
42
44
|
* @private
|
|
@@ -86,15 +88,17 @@ sap.ui.define([
|
|
|
86
88
|
});
|
|
87
89
|
}.bind(this)).catch(function(oError) {
|
|
88
90
|
Log.error(oError.stack);
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
this.oAdaptationsModel = new JSONModel({ adaptations: [] });
|
|
92
|
+
return this.oAdaptationsModel;
|
|
93
|
+
}.bind(this)).then(function(oAdaptationsModel) {
|
|
94
|
+
this.oAdaptationsModel = oAdaptationsModel;
|
|
91
95
|
return openDialog.call(this, oAdaptationsModel);
|
|
92
96
|
}.bind(this));
|
|
93
97
|
};
|
|
94
98
|
|
|
95
99
|
// ------ open dialog -----
|
|
96
|
-
function openDialog(
|
|
97
|
-
formatPriorityText.call(this,
|
|
100
|
+
function openDialog(oAdaptationsModel) {
|
|
101
|
+
formatPriorityText.call(this, oAdaptationsModel.getData());
|
|
98
102
|
return this._oAddAdaptationDialog.open();
|
|
99
103
|
}
|
|
100
104
|
|
|
@@ -115,8 +119,7 @@ sap.ui.define([
|
|
|
115
119
|
this._oAddAdaptationDialog.setModel(this.oPrioritySelectionModel, "prioritySelectionModel");
|
|
116
120
|
}
|
|
117
121
|
|
|
118
|
-
function onAdaptationTitleChange(
|
|
119
|
-
this.sAdaptationTitle = oEvent.getParameter("value");
|
|
122
|
+
function onAdaptationTitleChange() {
|
|
120
123
|
enableSaveAsButton.call(this);
|
|
121
124
|
}
|
|
122
125
|
|
|
@@ -148,6 +151,40 @@ sap.ui.define([
|
|
|
148
151
|
this.sPriority = oEvent.getParameters().selectedItem.getProperty("key");
|
|
149
152
|
}
|
|
150
153
|
|
|
154
|
+
|
|
155
|
+
function checkAdaptationsNameConstraints() {
|
|
156
|
+
// check for empty adaptations title
|
|
157
|
+
if (this._oAddAdaptationDialog && this._oAddAdaptationDialog.isOpen()) {
|
|
158
|
+
var oInputField = this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input");
|
|
159
|
+
var iAdaptationTitleLength = oInputField.getValue().trim().length;
|
|
160
|
+
var iMaxTitleLength = 100;
|
|
161
|
+
if (iAdaptationTitleLength === 0) {
|
|
162
|
+
oInputField.setValueState(ValueState.Error);
|
|
163
|
+
oInputField.setValueStateText(this.oTextResources.getText("TXT_CTX_ERROR_EMPTY_TITLE"));
|
|
164
|
+
} else if (iAdaptationTitleLength > iMaxTitleLength) {
|
|
165
|
+
oInputField.setValueState(ValueState.Error);
|
|
166
|
+
oInputField.setValueStateText(this.oTextResources.getText("TXT_CTX_ERROR_MAX_LEN", [
|
|
167
|
+
iMaxTitleLength
|
|
168
|
+
]));
|
|
169
|
+
} else if (iAdaptationTitleLength > 0) {
|
|
170
|
+
// check for duplicates
|
|
171
|
+
var iIndexOfDuplicate = this.oAdaptationsModel.getProperty("/adaptations").findIndex(function(adaptation) {
|
|
172
|
+
if (adaptation.title.trim().toLowerCase() === oInputField.getValue().trim().toLowerCase()) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
return false;
|
|
176
|
+
});
|
|
177
|
+
if (iIndexOfDuplicate > -1) {
|
|
178
|
+
oInputField.setValueState(ValueState.Error);
|
|
179
|
+
oInputField.setValueStateText(this.oTextResources.getText("TXT_CTX_ERROR_DUPLICATE_TITLE"));
|
|
180
|
+
} else {
|
|
181
|
+
oInputField.setValueState(ValueState.None);
|
|
182
|
+
oInputField.setValueStateText(null);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
151
188
|
function createContextSharingComponent(sLayer) {
|
|
152
189
|
var mPropertyBag = { layer: sLayer || Layer.CUSTOMER };
|
|
153
190
|
return ContextSharingAPI.createComponent(mPropertyBag).then(function(oContextSharingComponent) {
|
|
@@ -163,7 +200,8 @@ sap.ui.define([
|
|
|
163
200
|
}
|
|
164
201
|
|
|
165
202
|
function getAdaptationTitle() {
|
|
166
|
-
|
|
203
|
+
var oInputField = this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input");
|
|
204
|
+
return oInputField ? oInputField.getValue().trim() : "";
|
|
167
205
|
}
|
|
168
206
|
|
|
169
207
|
function getAdaptationPriority() {
|
|
@@ -171,7 +209,9 @@ sap.ui.define([
|
|
|
171
209
|
}
|
|
172
210
|
|
|
173
211
|
function enableSaveAsButton() {
|
|
174
|
-
|
|
212
|
+
checkAdaptationsNameConstraints.call(this);
|
|
213
|
+
var oInputField = this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input");
|
|
214
|
+
var bEnable = oInputField.getValueState() === ValueState.None && this._oContextComponentInstance.getSelectedContexts().role.length > 0;
|
|
175
215
|
this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-saveButton").setEnabled(bEnable);
|
|
176
216
|
}
|
|
177
217
|
|