@openui5/sap.ui.rta 1.112.2 → 1.114.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRDPARTY.txt +1 -1
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +1 -1
- package/src/sap/ui/rta/RuntimeAuthoring.js +111 -21
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +6 -5
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +1 -1
- package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +1 -1
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +93 -76
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +40 -4
- package/src/sap/ui/rta/messagebundle_ar.properties +21 -6
- package/src/sap/ui/rta/messagebundle_bg.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ca.properties +21 -6
- package/src/sap/ui/rta/messagebundle_cs.properties +21 -6
- package/src/sap/ui/rta/messagebundle_cy.properties +21 -6
- package/src/sap/ui/rta/messagebundle_da.properties +21 -6
- package/src/sap/ui/rta/messagebundle_de.properties +21 -6
- package/src/sap/ui/rta/messagebundle_el.properties +21 -6
- package/src/sap/ui/rta/messagebundle_en.properties +18 -3
- package/src/sap/ui/rta/messagebundle_en_GB.properties +18 -3
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +15 -3
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +13 -3
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +18 -3
- package/src/sap/ui/rta/messagebundle_es.properties +21 -6
- package/src/sap/ui/rta/messagebundle_es_MX.properties +21 -6
- package/src/sap/ui/rta/messagebundle_et.properties +21 -6
- package/src/sap/ui/rta/messagebundle_fi.properties +21 -6
- package/src/sap/ui/rta/messagebundle_fr.properties +21 -6
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +21 -6
- package/src/sap/ui/rta/messagebundle_hi.properties +21 -6
- package/src/sap/ui/rta/messagebundle_hr.properties +21 -6
- package/src/sap/ui/rta/messagebundle_hu.properties +21 -6
- package/src/sap/ui/rta/messagebundle_id.properties +21 -6
- package/src/sap/ui/rta/messagebundle_it.properties +21 -6
- package/src/sap/ui/rta/messagebundle_iw.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ja.properties +21 -6
- package/src/sap/ui/rta/messagebundle_kk.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ko.properties +21 -6
- package/src/sap/ui/rta/messagebundle_lt.properties +21 -6
- package/src/sap/ui/rta/messagebundle_lv.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ms.properties +21 -6
- package/src/sap/ui/rta/messagebundle_nl.properties +21 -6
- package/src/sap/ui/rta/messagebundle_no.properties +21 -6
- package/src/sap/ui/rta/messagebundle_pl.properties +21 -6
- package/src/sap/ui/rta/messagebundle_pt.properties +21 -6
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ro.properties +21 -6
- package/src/sap/ui/rta/messagebundle_ru.properties +21 -6
- package/src/sap/ui/rta/messagebundle_sh.properties +21 -6
- package/src/sap/ui/rta/messagebundle_sk.properties +21 -6
- package/src/sap/ui/rta/messagebundle_sl.properties +21 -6
- package/src/sap/ui/rta/messagebundle_sv.properties +21 -6
- package/src/sap/ui/rta/messagebundle_th.properties +21 -6
- package/src/sap/ui/rta/messagebundle_tr.properties +21 -6
- package/src/sap/ui/rta/messagebundle_uk.properties +21 -6
- package/src/sap/ui/rta/messagebundle_vi.properties +21 -6
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +21 -6
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +21 -6
- 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 +2 -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 +3 -3
- 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 +75 -66
- package/src/sap/ui/rta/plugin/Resize.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +2 -22
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +39 -21
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +48 -19
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -16
- package/src/sap/ui/rta/service/Action.js +1 -1
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- package/src/sap/ui/rta/service/Outline.js +4 -1
- package/src/sap/ui/rta/service/Property.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/service/SupportTools.js +1 -1
- package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +0 -6
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +59 -20
- package/src/sap/ui/rta/toolbar/Adaptation.js +95 -13
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +24 -0
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +30 -32
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +3 -15
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +130 -49
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +12 -10
- package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +1 -1
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ReloadManager.js +6 -3
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +15 -6
- package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +16 -9
- package/src/sap/ui/rta/util/validateStableIds.js +5 -2
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
* Provides Rename handling functionality
|
|
40
40
|
*
|
|
41
41
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.114.0
|
|
43
43
|
*
|
|
44
44
|
* @constructor
|
|
45
45
|
* @private
|
|
@@ -65,11 +65,11 @@ sap.ui.define([
|
|
|
65
65
|
},
|
|
66
66
|
|
|
67
67
|
_setEditableFieldPosition: function() {
|
|
68
|
-
if (this.
|
|
69
|
-
this.
|
|
70
|
-
this.
|
|
68
|
+
if (this._oEditableField) {
|
|
69
|
+
jQuery(this._oEditableField).offset({left: DOMUtil.getOffset(this._oEditableControlDomRef).left});
|
|
70
|
+
jQuery(this._oEditableField).offset({top: DOMUtil.getOffset(this._oEditableControlDomRef).top});
|
|
71
71
|
this._oEditedOverlay.setSelected(true);
|
|
72
|
-
this.
|
|
72
|
+
this._oEditableField.focus();
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
|
|
@@ -85,22 +85,22 @@ sap.ui.define([
|
|
|
85
85
|
|
|
86
86
|
var oDesignTimeMetadata = this._oEditedOverlay.getDesignTimeMetadata();
|
|
87
87
|
|
|
88
|
-
var
|
|
88
|
+
var oEditableControlDomRef = oDesignTimeMetadata.getAssociatedDomRef(oElement, mPropertyBag.domRef);
|
|
89
89
|
|
|
90
90
|
// if the Control is currently not visible on the screen, we have to scroll it into view
|
|
91
|
-
if (!Utils.isElementInViewport(
|
|
92
|
-
|
|
91
|
+
if (!Utils.isElementInViewport(oEditableControlDomRef)) {
|
|
92
|
+
oEditableControlDomRef.get(0).scrollIntoView();
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
this.
|
|
95
|
+
this._oEditableControlDomRef = oEditableControlDomRef.get(0); /* Text Control */
|
|
96
96
|
var mMutators = typeof mPropertyBag.getTextMutators === "function"
|
|
97
97
|
? mPropertyBag.getTextMutators(oElement)
|
|
98
98
|
: {
|
|
99
99
|
getText: function () {
|
|
100
|
-
return this.
|
|
100
|
+
return this._oEditableControlDomRef.textContent;
|
|
101
101
|
}.bind(this),
|
|
102
102
|
setText: function (sNewText) {
|
|
103
|
-
this.
|
|
103
|
+
this._oEditableControlDomRef.textContent = sNewText;
|
|
104
104
|
}.bind(this)
|
|
105
105
|
};
|
|
106
106
|
this._fnGetControlText = mMutators.getText;
|
|
@@ -109,9 +109,9 @@ sap.ui.define([
|
|
|
109
109
|
|
|
110
110
|
// case where the editable control has it's own overlay
|
|
111
111
|
var oOverlayForWrapper = OverlayRegistry.getOverlay(
|
|
112
|
-
|
|
113
|
-
?
|
|
114
|
-
:
|
|
112
|
+
oEditableControlDomRef.jquery
|
|
113
|
+
? oEditableControlDomRef.get(0).id
|
|
114
|
+
: oEditableControlDomRef.id
|
|
115
115
|
);
|
|
116
116
|
|
|
117
117
|
// if the editable control overlay could not be found, then the passed overlay should be considered
|
|
@@ -119,11 +119,11 @@ sap.ui.define([
|
|
|
119
119
|
if (!oOverlayForWrapper) {
|
|
120
120
|
oOverlayForWrapper = this._oEditedOverlay;
|
|
121
121
|
var _oControlForWrapperDomRef = ElementUtil.getDomRef(oElement); /* Main Control */
|
|
122
|
-
var _oEditableControlParentDomRef = this.
|
|
122
|
+
var _oEditableControlParentDomRef = this._oEditableControlDomRef.parentNode; /* Text Control parent */
|
|
123
123
|
var iControlForWrapperWidth = _oControlForWrapperDomRef ? parseInt(_oControlForWrapperDomRef.offsetWidth) : "NaN"; /* Main Control Width */
|
|
124
124
|
|
|
125
125
|
if (!isNaN(iControlForWrapperWidth)) {
|
|
126
|
-
var iEditableControlWidth = parseInt(this.
|
|
126
|
+
var iEditableControlWidth = parseInt(this._oEditableControlDomRef.offsetWidth);
|
|
127
127
|
var iEditableControlParentWidth = parseInt(_oEditableControlParentDomRef.offsetWidth);
|
|
128
128
|
|
|
129
129
|
iWidthDifference = iControlForWrapperWidth - iEditableControlWidth;
|
|
@@ -136,7 +136,7 @@ sap.ui.define([
|
|
|
136
136
|
if (iWidthDifference < 0 && iEditableControlParentWidth) {
|
|
137
137
|
if (_oEditableControlParentDomRef.id !== _oControlForWrapperDomRef.id
|
|
138
138
|
&& aVisibleChildren.length === 1
|
|
139
|
-
&& aVisibleChildren[0].id === this.
|
|
139
|
+
&& aVisibleChildren[0].id === this._oEditableControlDomRef.id
|
|
140
140
|
&& iControlForWrapperWidth > iEditableControlParentWidth) {
|
|
141
141
|
iWidthDifference = iControlForWrapperWidth - iEditableControlParentWidth;
|
|
142
142
|
} else {
|
|
@@ -155,65 +155,65 @@ sap.ui.define([
|
|
|
155
155
|
var _oEditableFieldDomRef = document.createElement("div");
|
|
156
156
|
_oEditableFieldDomRef.setAttribute("contentEditable", "true");
|
|
157
157
|
_oWrapperDomRef.append(_oEditableFieldDomRef);
|
|
158
|
-
|
|
159
|
-
this._$editableField = jQuery(_oEditableFieldDomRef);
|
|
158
|
+
this._oEditableField = _oEditableFieldDomRef;
|
|
160
159
|
|
|
161
160
|
// if label is empty, set a preliminary dummy text at the control to get an overlay
|
|
162
161
|
var sCurrentText = this._fnGetControlText();
|
|
163
162
|
if (sCurrentText === "") {
|
|
164
163
|
this._fnSetControlText("_?_");
|
|
165
|
-
this.
|
|
164
|
+
this._oEditableField.textContent = "";
|
|
166
165
|
} else {
|
|
167
|
-
this.
|
|
166
|
+
this._oEditableField.textContent = sCurrentText;
|
|
168
167
|
}
|
|
169
168
|
|
|
170
169
|
this.setOldValue(RenameHandler._getCurrentEditableFieldText.call(this));
|
|
171
170
|
|
|
172
|
-
DOMUtil.copyComputedStyle(this.
|
|
173
|
-
this.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
171
|
+
DOMUtil.copyComputedStyle(this._oEditableControlDomRef, this._oEditableField);
|
|
172
|
+
while (this._oEditableField.lastElementChild) {
|
|
173
|
+
this._oEditableField.removeChild(this._oEditableField.lastElementChild);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
this._oEditableField.style.visibility = "hidden";
|
|
177
|
+
this._oEditableField.style["-moz-user-modify"] = "read-write";
|
|
178
|
+
this._oEditableField.style["-webkit-user-modify"] = "read-write";
|
|
179
|
+
this._oEditableField.style["-ms-user-modify"] = "read-write";
|
|
180
|
+
this._oEditableField.style["user-modify"] = "read-write";
|
|
181
|
+
this._oEditableField.style.userSelect = "text";
|
|
182
|
+
this._oEditableField.style["-webkit-user-select"] = "text";
|
|
183
|
+
this._oEditableField.style.textOverflow = "clip";
|
|
184
|
+
this._oEditableField.style.whiteSpace = "nowrap";
|
|
186
185
|
|
|
187
186
|
//only for renaming variants in edge browser [SPECIAL CASE]
|
|
188
187
|
if (
|
|
189
188
|
Device.browser.name === "ed"
|
|
190
189
|
&& oElement.getMetadata().getName() === "sap.ui.fl.variants.VariantManagement"
|
|
191
190
|
) {
|
|
192
|
-
this.
|
|
193
|
-
"line-height": "normal"
|
|
194
|
-
});
|
|
191
|
+
this._oEditableField.style.lineHeight = "normal";
|
|
195
192
|
}
|
|
196
193
|
|
|
197
194
|
Overlay.getMutationObserver().ignoreOnce({
|
|
198
|
-
target: this.
|
|
195
|
+
target: this._oEditableControlDomRef
|
|
199
196
|
});
|
|
200
197
|
|
|
201
|
-
this.
|
|
202
|
-
|
|
203
|
-
this.
|
|
204
|
-
this.
|
|
205
|
-
|
|
206
|
-
this.
|
|
207
|
-
this.
|
|
208
|
-
|
|
209
|
-
this.
|
|
210
|
-
this.
|
|
211
|
-
|
|
212
|
-
this.
|
|
213
|
-
|
|
198
|
+
this._FocusHandler = RenameHandler._onEditableFieldFocus.bind(this);
|
|
199
|
+
this._oBlurHandler = RenameHandler._onEditableFieldBlur.bind(this);
|
|
200
|
+
this._oKeyDownHandler = RenameHandler._onEditableFieldKeydown.bind(this);
|
|
201
|
+
this._oStopPropagationHandler = RenameHandler._stopPropagation.bind(this);
|
|
202
|
+
|
|
203
|
+
this._oEditableField.addEventListener("focus", this._FocusHandler, {once: true});
|
|
204
|
+
this._oEditableField.addEventListener("blur", this._oBlurHandler);
|
|
205
|
+
this._oEditableField.addEventListener("keydown", this._oKeyDownHandler);
|
|
206
|
+
this._oEditableField.addEventListener("dragstart", this._oStopPropagationHandler);
|
|
207
|
+
this._oEditableField.addEventListener("drag", this._oStopPropagationHandler);
|
|
208
|
+
this._oEditableField.addEventListener("dragend", this._oStopPropagationHandler);
|
|
209
|
+
this._oEditableField.addEventListener("click", this._oStopPropagationHandler);
|
|
210
|
+
this._oEditableField.addEventListener("mousedown", this._oStopPropagationHandler);
|
|
211
|
+
|
|
212
|
+
this._oEditableControlDomRef.style.visibility = "hidden";
|
|
213
|
+
jQuery(_oWrapperDomRef).offset({left: DOMUtil.getOffset(this._oEditableControlDomRef).left});
|
|
214
214
|
RenameHandler._setEditableFieldPosition.apply(this);
|
|
215
|
-
this.
|
|
216
|
-
this.
|
|
215
|
+
this._oEditableField.style.visibility = "";
|
|
216
|
+
this._oEditableField.focus();
|
|
217
217
|
|
|
218
218
|
// If scrolling happens during startEdit, the position of the editable field can be wrong
|
|
219
219
|
// To avoid this, the position is recalculated after the scrollbar synchronization is ready
|
|
@@ -226,7 +226,7 @@ sap.ui.define([
|
|
|
226
226
|
mPropertyBag.overlay.setSelected(true);
|
|
227
227
|
sap.ui.getCore().getEventBus().publish("sap.ui.rta", mPropertyBag.pluginMethodName, {
|
|
228
228
|
overlay: mPropertyBag.overlay,
|
|
229
|
-
editableField: this.
|
|
229
|
+
editableField: this._oEditableField
|
|
230
230
|
});
|
|
231
231
|
},
|
|
232
232
|
|
|
@@ -296,22 +296,27 @@ sap.ui.define([
|
|
|
296
296
|
_stopEdit: function (bRestoreFocus, sPluginMethodName) {
|
|
297
297
|
var oOverlay;
|
|
298
298
|
this.setBusy(false);
|
|
299
|
+
this._oEditableField.removeEventListener("blur", this._oBlurHandler);
|
|
300
|
+
this._oEditableField.removeEventListener("focus", this._FocusHandler);
|
|
301
|
+
this._oEditableField.removeEventListener("keydown", this._oKeyDownHandler);
|
|
302
|
+
this._oEditableField.removeEventListener("dragstart", this._oStopPropagationHandler);
|
|
303
|
+
this._oEditableField.removeEventListener("drag", this._oStopPropagationHandler);
|
|
304
|
+
this._oEditableField.removeEventListener("dragend", this._oStopPropagationHandler);
|
|
305
|
+
this._oEditableField.removeEventListener("click", this._oStopPropagationHandler);
|
|
306
|
+
this._oEditableField.removeEventListener("mousedown", this._oStopPropagationHandler);
|
|
299
307
|
|
|
300
308
|
// exchange the dummy text at the label with the genuine empty text (see start_edit function)
|
|
301
309
|
if (this._fnGetControlText() === "_?_") {
|
|
302
310
|
this._fnSetControlText("");
|
|
303
311
|
}
|
|
304
312
|
|
|
305
|
-
//TODO: check why test gets red when this is replaced by vanilla JS
|
|
306
|
-
this._oEditedOverlay.$().find(".sapUiRtaEditableField").remove();
|
|
307
313
|
Overlay.getMutationObserver().ignoreOnce({
|
|
308
|
-
target: this.
|
|
314
|
+
target: this._oEditableControlDomRef
|
|
309
315
|
});
|
|
310
|
-
this.
|
|
316
|
+
this._oEditableControlDomRef.style.visibility = "visible";
|
|
311
317
|
|
|
312
318
|
if (bRestoreFocus) {
|
|
313
319
|
oOverlay = this._oEditedOverlay;
|
|
314
|
-
|
|
315
320
|
oOverlay.setSelected(true);
|
|
316
321
|
oOverlay.focus();
|
|
317
322
|
}
|
|
@@ -319,8 +324,12 @@ sap.ui.define([
|
|
|
319
324
|
this._aOverlaysWithScrollbar.forEach(function(oOverlayWithScrollbar) {
|
|
320
325
|
oOverlayWithScrollbar.detachScrollSynced(RenameHandler._setEditableFieldPosition, this);
|
|
321
326
|
}.bind(this));
|
|
322
|
-
delete this.
|
|
323
|
-
|
|
327
|
+
delete this._oEditableField;
|
|
328
|
+
var oEditField = this._oEditedOverlay.getDomRef() && this._oEditedOverlay.getDomRef().querySelector(".sapUiRtaEditableField");
|
|
329
|
+
if (oEditField) {
|
|
330
|
+
oEditField.remove();
|
|
331
|
+
}
|
|
332
|
+
delete this._oEditableControlDomRef;
|
|
324
333
|
delete this._oEditedOverlay;
|
|
325
334
|
delete this._bBlurOrKeyDownStarted;
|
|
326
335
|
delete this._fnGetControlText;
|
|
@@ -331,8 +340,8 @@ sap.ui.define([
|
|
|
331
340
|
});
|
|
332
341
|
},
|
|
333
342
|
|
|
334
|
-
_onEditableFieldBlur: function () {
|
|
335
|
-
return RenameHandler._handlePostRename.call(this, false);
|
|
343
|
+
_onEditableFieldBlur: function (oEvent) {
|
|
344
|
+
return RenameHandler._handlePostRename.call(this, false, oEvent);
|
|
336
345
|
},
|
|
337
346
|
|
|
338
347
|
_handlePostRename: function (bRestoreFocus, oEvent) {
|
|
@@ -415,7 +424,7 @@ sap.ui.define([
|
|
|
415
424
|
_getCurrentEditableFieldText: function () {
|
|
416
425
|
// Rename to empty string should not be possible
|
|
417
426
|
// to prevent issues with disappearing elements
|
|
418
|
-
var sText = this.
|
|
427
|
+
var sText = this._oEditableField ? this._oEditableField.textContent.trim() : "";
|
|
419
428
|
return sText === "" ? sEmptyTextKey : sText;
|
|
420
429
|
},
|
|
421
430
|
|
|
@@ -432,7 +441,7 @@ sap.ui.define([
|
|
|
432
441
|
},
|
|
433
442
|
|
|
434
443
|
_exit: function() {
|
|
435
|
-
if (this.
|
|
444
|
+
if (this._oEditableControlDomRef) {
|
|
436
445
|
this.stopEdit(false);
|
|
437
446
|
}
|
|
438
447
|
}
|
|
@@ -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.114.0
|
|
34
34
|
* @constructor
|
|
35
35
|
* @private
|
|
36
36
|
* @since 1.34
|
|
@@ -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.114.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.
|
|
@@ -79,25 +79,6 @@ sap.ui.define([
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
function checkInvalidAddActions(bSibling, oSourceElementOverlay, oPlugin) {
|
|
83
|
-
var mParents = AdditionalElementsUtils.getParents(bSibling, oSourceElementOverlay, oPlugin);
|
|
84
|
-
var oDesignTimeMetadata = mParents.parentOverlay && mParents.parentOverlay.getDesignTimeMetadata();
|
|
85
|
-
var aAddODataPropertyActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("addODataProperty", mParents.parent) : [];
|
|
86
|
-
if (aAddODataPropertyActions.length > 0) {
|
|
87
|
-
Log.error("Outdated addODataProperty action in designtime metadata in "
|
|
88
|
-
+ oDesignTimeMetadata.getData().designtimeModule
|
|
89
|
-
+ " or propagated or via instance specific designtime metadata.");
|
|
90
|
-
}
|
|
91
|
-
var aAddActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("add", mParents.parent) : [];
|
|
92
|
-
aAddActions.forEach(function(mAddAction) {
|
|
93
|
-
if (mAddAction["custom"]) {
|
|
94
|
-
Log.error("Outdated custom add action in designtime metadata in "
|
|
95
|
-
+ oDesignTimeMetadata.getData().designtimeModule
|
|
96
|
-
+ " or propagated or via instance specific designtime metadata.");
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
|
|
101
82
|
function getInvisibleElements (oParentOverlay, sAggregationName, oPlugin) {
|
|
102
83
|
var oParentElement = oParentOverlay.getElement();
|
|
103
84
|
if (!oParentElement) {
|
|
@@ -337,8 +318,7 @@ sap.ui.define([
|
|
|
337
318
|
|
|
338
319
|
return Promise.all([
|
|
339
320
|
oRevealActionsPromise,
|
|
340
|
-
oAddPropertyActionsPromise
|
|
341
|
-
checkInvalidAddActions(bSibling, oSourceElementOverlay, oPlugin)
|
|
321
|
+
oAddPropertyActionsPromise
|
|
342
322
|
]).then(function(aAllActions) {
|
|
343
323
|
//join and condense all action data
|
|
344
324
|
var mAllActions = merge(aAllActions[0], aAllActions[1]);
|
|
@@ -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.114.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.114.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.114.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.
|
|
@@ -117,7 +117,7 @@ sap.ui.define([
|
|
|
117
117
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
118
118
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
119
119
|
* @author SAP SE
|
|
120
|
-
* @version 1.
|
|
120
|
+
* @version 1.114.0
|
|
121
121
|
* @constructor
|
|
122
122
|
* @private
|
|
123
123
|
* @since 1.75
|
|
@@ -4,17 +4,20 @@
|
|
|
4
4
|
xmlns:form="sap.ui.layout.form"
|
|
5
5
|
xmlns:util="sap.ui.fl.util"
|
|
6
6
|
xmlns:layout="sap.ui.layout">
|
|
7
|
-
<Dialog
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
<Dialog
|
|
8
|
+
id="sapUiRtaAddIFrameDialog"
|
|
9
|
+
title="{/text/dialogTitle}"
|
|
10
|
+
verticalScrolling="true"
|
|
11
|
+
resizable="false"
|
|
12
|
+
class="sapUiRtaAddIFrameDialog"
|
|
13
|
+
draggable="true"
|
|
14
|
+
validationSuccess="onValidationSuccess"
|
|
15
|
+
validationError="onValidationError"
|
|
16
|
+
parseError="onValidationError"
|
|
17
|
+
contentWidth="50rem"
|
|
18
|
+
contentHeight="44rem"
|
|
19
|
+
core:require="{ FloatType: 'sap/ui/model/type/Float' }"
|
|
20
|
+
>
|
|
18
21
|
<content>
|
|
19
22
|
|
|
20
23
|
<layout:VerticalLayout
|
|
@@ -61,12 +64,19 @@
|
|
|
61
64
|
text="{/text/widthLabel}">
|
|
62
65
|
</Label>
|
|
63
66
|
<Input id="sapUiRtaAddIFrameDialog_WidthInput" class="sapUiRtaAddIFrameDialogWidthInput"
|
|
64
|
-
value="{path: '/frameWidth/value', type: '
|
|
67
|
+
value="{path: '/frameWidth/value', type: 'FloatType', constraints: {minimum: 1}}"
|
|
65
68
|
valueState="{/frameWidth/valueState}"/>
|
|
66
|
-
<Select
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
<Select
|
|
70
|
+
id="sapUiRtaAddIFrameDialog_WidthUnit"
|
|
71
|
+
class="sapUiRtaAddIFrameDialogWidthUnit"
|
|
72
|
+
ariaLabelledBy="sapUiRtaAddIFrameDialog_WidthUnitLabel"
|
|
73
|
+
selectedKey="{/frameWidthUnit/value}"
|
|
74
|
+
items="{/unitsOfWidthMeasure}"
|
|
75
|
+
showSecondaryValues= "true"
|
|
76
|
+
columnRatio="1:5"
|
|
77
|
+
width="auto"
|
|
78
|
+
maxWidth="400px">
|
|
79
|
+
<core:ListItem key="{unit}" text="{unit}" additionalText="{descriptionText}"/>
|
|
70
80
|
</Select>
|
|
71
81
|
</form:content>
|
|
72
82
|
</form:SimpleForm>
|
|
@@ -80,12 +90,20 @@
|
|
|
80
90
|
<Label id="sapUiRtaAddIFrameDialog_HeightLabel" class="sapUiRtaAddIFrameDialogHeightLabel" labelFor="sapUiRtaAddIFrameDialog_HeightInput"
|
|
81
91
|
text="{/text/heightLabel}"/>
|
|
82
92
|
<Input id="sapUiRtaAddIFrameDialog_HeightInput" class="sapUiRtaAddIFrameDialogHeightInput"
|
|
83
|
-
value="{path: '/frameHeight/value', type: '
|
|
93
|
+
value="{path: '/frameHeight/value', type: 'FloatType', constraints: {minimum: 1}}"
|
|
84
94
|
valueState="{/frameHeight/valueState}"/>
|
|
85
|
-
<Select
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
<Select
|
|
96
|
+
id="sapUiRtaAddIFrameDialog_HeightUnit"
|
|
97
|
+
class="sapUiRtaAddIFrameDialogHeightUnit"
|
|
98
|
+
ariaLabelledBy="sapUiRtaAddIFrameDialog_HeightUnitLabel"
|
|
99
|
+
selectedKey="{/frameHeightUnit/value}"
|
|
100
|
+
forceSelection="false"
|
|
101
|
+
items="{/unitsOfHeightMeasure}"
|
|
102
|
+
showSecondaryValues= "true"
|
|
103
|
+
columnRatio="1:5"
|
|
104
|
+
width="auto"
|
|
105
|
+
maxWidth="400px">
|
|
106
|
+
<core:ListItem key="{unit}" text="{= ${unit} === 'vh' ? '%' : ${unit}}" additionalText="{descriptionText}"/>
|
|
89
107
|
</Select>
|
|
90
108
|
</form:content>
|
|
91
109
|
</form:SimpleForm>
|