@openui5/sap.ui.rta 1.113.0 → 1.114.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/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 +157 -53
- package/src/sap/ui/rta/Utils.js +35 -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 +4 -2
- 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 +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 +93 -76
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +40 -2
- package/src/sap/ui/rta/messagebundle_ar.properties +12 -4
- package/src/sap/ui/rta/messagebundle_bg.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ca.properties +12 -4
- package/src/sap/ui/rta/messagebundle_cs.properties +12 -4
- package/src/sap/ui/rta/messagebundle_cy.properties +12 -4
- package/src/sap/ui/rta/messagebundle_da.properties +12 -4
- package/src/sap/ui/rta/messagebundle_de.properties +12 -4
- package/src/sap/ui/rta/messagebundle_el.properties +12 -4
- package/src/sap/ui/rta/messagebundle_en.properties +10 -2
- package/src/sap/ui/rta/messagebundle_en_GB.properties +10 -2
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +7 -2
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -2
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +10 -2
- package/src/sap/ui/rta/messagebundle_es.properties +12 -4
- package/src/sap/ui/rta/messagebundle_es_MX.properties +12 -4
- package/src/sap/ui/rta/messagebundle_et.properties +12 -4
- package/src/sap/ui/rta/messagebundle_fi.properties +12 -4
- package/src/sap/ui/rta/messagebundle_fr.properties +12 -4
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +12 -4
- package/src/sap/ui/rta/messagebundle_hi.properties +12 -4
- package/src/sap/ui/rta/messagebundle_hr.properties +12 -4
- package/src/sap/ui/rta/messagebundle_hu.properties +12 -4
- package/src/sap/ui/rta/messagebundle_id.properties +12 -4
- package/src/sap/ui/rta/messagebundle_it.properties +12 -4
- package/src/sap/ui/rta/messagebundle_iw.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ja.properties +16 -8
- package/src/sap/ui/rta/messagebundle_kk.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ko.properties +16 -8
- package/src/sap/ui/rta/messagebundle_lt.properties +12 -4
- package/src/sap/ui/rta/messagebundle_lv.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ms.properties +16 -8
- package/src/sap/ui/rta/messagebundle_nl.properties +12 -4
- package/src/sap/ui/rta/messagebundle_no.properties +12 -4
- package/src/sap/ui/rta/messagebundle_pl.properties +12 -4
- package/src/sap/ui/rta/messagebundle_pt.properties +12 -4
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ro.properties +12 -4
- package/src/sap/ui/rta/messagebundle_ru.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sh.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sk.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sl.properties +12 -4
- package/src/sap/ui/rta/messagebundle_sv.properties +12 -4
- package/src/sap/ui/rta/messagebundle_th.properties +12 -4
- package/src/sap/ui/rta/messagebundle_tr.properties +12 -4
- package/src/sap/ui/rta/messagebundle_uk.properties +12 -4
- package/src/sap/ui/rta/messagebundle_vi.properties +12 -4
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +12 -4
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +12 -4
- 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 +11 -24
- 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 +17 -13
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.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 +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/Adaptation.fragment.xml +59 -20
- package/src/sap/ui/rta/toolbar/Adaptation.js +161 -12
- 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 +68 -37
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +5 -23
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +121 -35
- 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 +32 -21
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -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
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
<Button
|
|
110
110
|
id="sapUiRta_actionsMenu"
|
|
111
111
|
icon="sap-icon://menu2"
|
|
112
|
-
visible="{= ${controls>/modeSwitcher} === 'adaptation' && (${controls>/translation/visible} || ${controls>/appVariantMenu/visible} || ${controls>/restore/visible}
|
|
112
|
+
visible="{= ${controls>/modeSwitcher} === 'adaptation' && (${controls>/translation/visible} || ${controls>/appVariantMenu/visible} || ${controls>/restore/visible})}"
|
|
113
113
|
enabled="{controls>/actionsMenuButton/enabled}"
|
|
114
114
|
type="Transparent"
|
|
115
115
|
tooltip="{i18n>BTN_MENU}"
|
|
@@ -143,26 +143,65 @@
|
|
|
143
143
|
<OverflowToolbarLayoutData priority="NeverOverflow" />
|
|
144
144
|
</layoutData>
|
|
145
145
|
</Button>
|
|
146
|
-
<
|
|
147
|
-
id="
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
146
|
+
<MenuButton
|
|
147
|
+
id="sapUiRta_contextBasedAdaptationMenu"
|
|
148
|
+
tooltip="{parts: [{path: 'contextBasedAdaptations>/count'}, {path: 'contextBasedAdaptations>/displayedAdaptation/title'}], formatter: '.formatAdaptationsMenuText'}"
|
|
149
|
+
text="{parts: [{path: 'contextBasedAdaptations>/count'}, {path: 'contextBasedAdaptations>/displayedAdaptation/title'}], formatter: '.formatAdaptationsMenuText'}"
|
|
150
|
+
visible="{= (${controls>/contextBasedAdaptation/visible} && ${controls>/modeSwitcher} === 'adaptation')}">
|
|
151
|
+
<Menu>
|
|
152
|
+
<MenuItem
|
|
153
|
+
id="sapUiRta_saveAsAdaptation"
|
|
154
|
+
text="{i18n>SAC_DIALOG_HEADER}"
|
|
155
|
+
press=".saveAsAdaptation"
|
|
156
|
+
icon="sap-icon://copy"/>
|
|
157
|
+
<MenuItem
|
|
158
|
+
id="sapUiRta_editAdaptation"
|
|
159
|
+
visible="{= (${contextBasedAdaptations>/count} > 0 && ${contextBasedAdaptations>/displayedAdaptation/title} !== '')}"
|
|
160
|
+
text="{i18n>EAC_DIALOG_HEADER}"
|
|
161
|
+
press=".editAdaptation"
|
|
162
|
+
icon="sap-icon://edit"/>
|
|
163
|
+
<MenuItem
|
|
164
|
+
id="sapUiRta_deleteAdaptation"
|
|
165
|
+
text="{i18n>DAC_DIALOG_HEADER}"
|
|
166
|
+
press=".deleteAdaptation"
|
|
167
|
+
visible="{= (${contextBasedAdaptations>/count} > 0 && ${contextBasedAdaptations>/displayedAdaptation/title} !== '')}"
|
|
168
|
+
icon="sap-icon://delete"/>
|
|
169
|
+
<MenuItem
|
|
170
|
+
id="sapUiRta_manageAdaptations"
|
|
171
|
+
text="{i18n>MANAGE_ADAPTATIONS_DIALOG_HEADER}"
|
|
172
|
+
press=".manageAdaptations"
|
|
173
|
+
icon="sap-icon://action-settings"/>
|
|
174
|
+
<MenuItem
|
|
175
|
+
id="sapUiRta_switchAdaptations"
|
|
176
|
+
visible="{= (${contextBasedAdaptations>/count} > 0)}"
|
|
177
|
+
text="{i18n>BTN_SWITCH_ADAPTATIONS}"
|
|
178
|
+
icon="sap-icon://switch-views"
|
|
179
|
+
items="{contextBasedAdaptations>/allAdaptations}">
|
|
180
|
+
<items>
|
|
181
|
+
<MenuItem
|
|
182
|
+
id="sapUiRta_switchAdaptations_items"
|
|
183
|
+
enabled="{= (${contextBasedAdaptations>id} !== ${contextBasedAdaptations>/displayedAdaptation/id}) }"
|
|
184
|
+
icon="{= (${contextBasedAdaptations>id} === ${contextBasedAdaptations>/displayedAdaptation/id} ? 'sap-icon://accept' : 'blank')}"
|
|
185
|
+
text="{= (${contextBasedAdaptations>title} ? ${contextBasedAdaptations>title} : ${i18n>TXT_DEFAULT_APP})}"
|
|
186
|
+
press=".switchAdaptation(${contextBasedAdaptations>id})"/>
|
|
187
|
+
</items>
|
|
188
|
+
</MenuItem>
|
|
189
|
+
</Menu>
|
|
190
|
+
<layoutData>
|
|
191
|
+
<OverflowToolbarLayoutData priority="NeverOverflow" />
|
|
192
|
+
</layoutData>
|
|
193
|
+
</MenuButton>
|
|
194
|
+
<Button
|
|
195
|
+
id="sapUiRta_feedback"
|
|
196
|
+
icon="sap-icon://feedback"
|
|
197
|
+
press=".showFeedbackForm"
|
|
198
|
+
visible="{controls>/feedbackButton/visible}"
|
|
160
199
|
type="Transparent"
|
|
161
|
-
|
|
162
|
-
<
|
|
163
|
-
<OverflowToolbarLayoutData priority="
|
|
164
|
-
</
|
|
165
|
-
</
|
|
200
|
+
tooltip="{i18n>BTN_FEEDBACK}" >
|
|
201
|
+
<layoutData>
|
|
202
|
+
<OverflowToolbarLayoutData priority="NeverOverflow" />
|
|
203
|
+
</layoutData>
|
|
204
|
+
</Button>
|
|
166
205
|
<toolbar:OverflowToolbarButton
|
|
167
206
|
id="sapUiRta_save"
|
|
168
207
|
type="Transparent"
|
|
@@ -5,29 +5,41 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"./AdaptationRenderer",
|
|
9
|
+
"sap/base/Log",
|
|
10
|
+
"sap/ui/core/BusyIndicator",
|
|
8
11
|
"sap/ui/core/Fragment",
|
|
9
12
|
"sap/ui/core/Popup",
|
|
13
|
+
"sap/ui/core/Core",
|
|
14
|
+
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
10
15
|
"sap/ui/fl/write/api/Version",
|
|
11
|
-
"sap/ui/
|
|
16
|
+
"sap/ui/model/json/JSONModel",
|
|
17
|
+
"sap/ui/rta/appVariant/Feature",
|
|
18
|
+
"sap/ui/rta/toolbar/Base",
|
|
12
19
|
"sap/ui/rta/toolbar/contextBased/ManageAdaptations",
|
|
20
|
+
"sap/ui/rta/toolbar/contextBased/SaveAsAdaptation",
|
|
13
21
|
"sap/ui/rta/toolbar/translation/Translation",
|
|
14
22
|
"sap/ui/rta/toolbar/versioning/Versioning",
|
|
15
|
-
"sap/ui/rta/appVariant/Feature",
|
|
16
|
-
"sap/ui/rta/toolbar/Base",
|
|
17
23
|
"sap/ui/rta/Utils",
|
|
18
|
-
"
|
|
24
|
+
"sap/m/MessageBox"
|
|
19
25
|
], function(
|
|
26
|
+
AdaptationRenderer,
|
|
27
|
+
Log,
|
|
28
|
+
BusyIndicator,
|
|
20
29
|
Fragment,
|
|
21
30
|
Popup,
|
|
31
|
+
Core,
|
|
32
|
+
ContextBasedAdaptationsAPI,
|
|
22
33
|
Version,
|
|
23
|
-
|
|
34
|
+
JSONModel,
|
|
35
|
+
AppVariantFeature,
|
|
36
|
+
Base,
|
|
24
37
|
ManageAdaptations,
|
|
38
|
+
SaveAsAdaptation,
|
|
25
39
|
Translation,
|
|
26
40
|
Versioning,
|
|
27
|
-
AppVariantFeature,
|
|
28
|
-
Base,
|
|
29
41
|
Utils,
|
|
30
|
-
|
|
42
|
+
MessageBox
|
|
31
43
|
) {
|
|
32
44
|
"use strict";
|
|
33
45
|
|
|
@@ -39,7 +51,7 @@ sap.ui.define([
|
|
|
39
51
|
* @extends sap.ui.rta.toolbar.Base
|
|
40
52
|
*
|
|
41
53
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
54
|
+
* @version 1.114.1
|
|
43
55
|
*
|
|
44
56
|
* @constructor
|
|
45
57
|
* @private
|
|
@@ -66,6 +78,8 @@ sap.ui.define([
|
|
|
66
78
|
activate: {},
|
|
67
79
|
discardDraft: {},
|
|
68
80
|
switchVersion: {},
|
|
81
|
+
switchAdaptation: {},
|
|
82
|
+
deleteAdaptation: {},
|
|
69
83
|
openChangeCategorySelectionPopover: {}
|
|
70
84
|
}
|
|
71
85
|
}
|
|
@@ -299,13 +313,18 @@ sap.ui.define([
|
|
|
299
313
|
redo: this.eventHandler.bind(this, "Redo"),
|
|
300
314
|
openChangeCategorySelectionPopover: this.eventHandler.bind(this, "OpenChangeCategorySelectionPopover"),
|
|
301
315
|
saveAsAdaptation: onSaveAsAdaptation.bind(this),
|
|
316
|
+
editAdaptation: onEditAdaptation.bind(this),
|
|
317
|
+
deleteAdaptation: onDeleteAdaptation.bind(this),
|
|
302
318
|
manageAdaptations: onManageAdaptations.bind(this),
|
|
319
|
+
switchAdaptation: onSwitchAdaptations.bind(this),
|
|
320
|
+
formatAdaptationsMenuText: formatAdaptationsMenuText.bind(this),
|
|
303
321
|
publishVersion: this.eventHandler.bind(this, "PublishVersion"),
|
|
304
322
|
save: this.eventHandler.bind(this, "Save"),
|
|
305
323
|
exit: this.eventHandler.bind(this, "Exit"),
|
|
306
324
|
formatVersionButtonText: this.formatVersionButtonText.bind(this),
|
|
307
325
|
showVersionHistory: this.showVersionHistory.bind(this),
|
|
308
|
-
showActionsMenu: this.showActionsMenu.bind(this)
|
|
326
|
+
showActionsMenu: this.showActionsMenu.bind(this),
|
|
327
|
+
showFeedbackForm: this.showFeedbackForm.bind(this)
|
|
309
328
|
}
|
|
310
329
|
});
|
|
311
330
|
};
|
|
@@ -330,14 +349,105 @@ sap.ui.define([
|
|
|
330
349
|
AppVariantFeature.onSaveAs(true, true, this.getRtaInformation().flexSettings.layer, null);
|
|
331
350
|
}
|
|
332
351
|
|
|
352
|
+
function confirmMigration(oRtaInformation) {
|
|
353
|
+
var bDirty = oRtaInformation.commandStack.canSave();
|
|
354
|
+
|
|
355
|
+
Utils.showMessageBox("confirm", (bDirty) ? "DAC_DIALOG_MIGRATION_DIRTY_DESCRIPTION" : "DAC_DIALOG_MIGRATION_DESCRIPTION", {
|
|
356
|
+
titleKey: "DAC_DIALOG_MIGRATION_HEADER",
|
|
357
|
+
actionKeys: ["DAC_DIALOG_MIGRATION_HEADER"],
|
|
358
|
+
showCancel: true
|
|
359
|
+
})
|
|
360
|
+
.then(function(sAction) {
|
|
361
|
+
if (sAction !== MessageBox.Action.CANCEL) {
|
|
362
|
+
BusyIndicator.show();
|
|
363
|
+
|
|
364
|
+
if (bDirty) {
|
|
365
|
+
oRtaInformation.commandStack.removeAllCommands(true);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
ContextBasedAdaptationsAPI.migrate({
|
|
369
|
+
control: oRtaInformation.rootControl,
|
|
370
|
+
layer: oRtaInformation.flexSettings.layer
|
|
371
|
+
})
|
|
372
|
+
.finally(function() {
|
|
373
|
+
BusyIndicator.hide();
|
|
374
|
+
})
|
|
375
|
+
.then(Utils.showMessageBox.bind(undefined, "information", "DAC_DIALOG_MIGRATION_SUCCESSFULL_DESCRIPTION", {
|
|
376
|
+
titleKey: "DAC_DIALOG_MIGRATION_HEADER"
|
|
377
|
+
}))
|
|
378
|
+
.then(function() {
|
|
379
|
+
return new Promise(function(resolve) {
|
|
380
|
+
this.fireEvent("switchAdaptation", {adaptationId: "DEFAULT", callback: resolve});
|
|
381
|
+
}.bind(this));
|
|
382
|
+
}.bind(this))
|
|
383
|
+
.catch(function(oError) {
|
|
384
|
+
Log.error(oError.stack || oError);
|
|
385
|
+
var sMessage = "DAC_DIALOG_MIGRATION_ERROR_DESCRIPTION";
|
|
386
|
+
var oOptions = {
|
|
387
|
+
titleKey: "DAC_DIALOG_MIGRATION_HEADER",
|
|
388
|
+
details: oError.userMessage || oError
|
|
389
|
+
};
|
|
390
|
+
Utils.showMessageBox("error", sMessage, oOptions);
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
}.bind(this));
|
|
394
|
+
}
|
|
395
|
+
|
|
333
396
|
function onSaveAsAdaptation() {
|
|
334
|
-
|
|
397
|
+
var oRtaInformation = this.getRtaInformation();
|
|
398
|
+
Utils.checkDraftOverwrite(this.getModel("versions")).then(function() {
|
|
399
|
+
return ContextBasedAdaptationsAPI.canMigrate({ control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer });
|
|
400
|
+
}).then(function(bCanMigrate) {
|
|
401
|
+
if (bCanMigrate) {
|
|
402
|
+
confirmMigration.call(this, oRtaInformation);
|
|
403
|
+
} else {
|
|
404
|
+
this.getExtension("contextBasedSaveAs", SaveAsAdaptation).openAddAdaptationDialog(oRtaInformation.flexSettings.layer);
|
|
405
|
+
}
|
|
406
|
+
}.bind(this))
|
|
407
|
+
.catch(handleError);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
function onEditAdaptation() {
|
|
411
|
+
Utils.checkDraftOverwrite(this.getModel("versions"))
|
|
412
|
+
.then(function() {
|
|
413
|
+
this.getExtension("contextBasedSaveAs", SaveAsAdaptation).openAddAdaptationDialog(this.getRtaInformation().flexSettings.layer, true /*bIsEditMode*/);
|
|
414
|
+
}.bind(this))
|
|
415
|
+
.catch(handleError);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function handleError(oError) {
|
|
419
|
+
if (oError !== "cancel") {
|
|
420
|
+
Utils.showMessageBox("error", "MSG_LREP_TRANSFER_ERROR", {error: oError});
|
|
421
|
+
Log.error("sap.ui.rta: " + oError.stack || oError.message || oError);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function onDeleteAdaptation() {
|
|
426
|
+
Utils.checkDraftOverwrite(this.getModel("versions"))
|
|
427
|
+
.then(function() {
|
|
428
|
+
this.fireEvent("deleteAdaptation");
|
|
429
|
+
}.bind(this))
|
|
430
|
+
.catch(handleError);
|
|
335
431
|
}
|
|
336
432
|
|
|
337
433
|
function onManageAdaptations() {
|
|
338
434
|
this.getExtension("contextBasedManage", ManageAdaptations).openManageAdaptationDialog();
|
|
339
435
|
}
|
|
340
436
|
|
|
437
|
+
function onSwitchAdaptations(sAdaptationId) {
|
|
438
|
+
this.fireEvent("switchAdaptation", {adaptationId: sAdaptationId});
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
function formatAdaptationsMenuText(iCount, sTitle) {
|
|
442
|
+
if (iCount > 0) {
|
|
443
|
+
if (sTitle === "") {
|
|
444
|
+
return this.getTextResources().getText("TXT_DEFAULT_APP");
|
|
445
|
+
}
|
|
446
|
+
return this.getTextResources().getText("BTN_ADAPTING_FOR", sTitle);
|
|
447
|
+
}
|
|
448
|
+
return this.getTextResources().getText("BTN_ADAPTING_FOR_ALL_USERS");
|
|
449
|
+
}
|
|
450
|
+
|
|
341
451
|
function onOverviewForKeyUserPressed() {
|
|
342
452
|
return AppVariantFeature.onGetOverview(true, this.getRtaInformation().flexSettings.layer);
|
|
343
453
|
}
|
|
@@ -369,5 +479,44 @@ sap.ui.define([
|
|
|
369
479
|
return Base.prototype.hide.apply(this, arguments);
|
|
370
480
|
};
|
|
371
481
|
|
|
482
|
+
Adaptation.prototype.showFeedbackForm = function() {
|
|
483
|
+
// Get Connector Type
|
|
484
|
+
var sConnector = Core.getConfiguration().getFlexibilityServices()[0].connector;
|
|
485
|
+
|
|
486
|
+
// Set URL
|
|
487
|
+
var sURLPart1 = "https://sapinsights.eu.qualtrics.com/jfe/form/";
|
|
488
|
+
var sURLPart2 = "SV_4MANxRymEIl9K06";
|
|
489
|
+
var sURL = sURLPart1 + sURLPart2;
|
|
490
|
+
var oUrlParams = new URLSearchParams();
|
|
491
|
+
oUrlParams.set("version", sap.ui.version);
|
|
492
|
+
oUrlParams.set("feature", (sConnector === "KeyUserConnector" ? "BTP" : "ABAP"));
|
|
493
|
+
|
|
494
|
+
var oFeedbackDialogModel = new JSONModel({
|
|
495
|
+
url: sURL + "?" + oUrlParams.toString()
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
return Fragment.load({
|
|
499
|
+
name: "sap.ui.rta.toolbar.FeedbackDialog",
|
|
500
|
+
controller: this
|
|
501
|
+
}).then(function (oFeedbackDialog) {
|
|
502
|
+
this._oFeedbackDialog = oFeedbackDialog;
|
|
503
|
+
this._oFeedbackDialog.addStyleClass(Utils.getRtaStyleClassName());
|
|
504
|
+
this._oFeedbackDialog.setModel(oFeedbackDialogModel, "feedbackModel");
|
|
505
|
+
this._oFeedbackDialog.setModel(this.getModel("i18n"), "i18n");
|
|
506
|
+
this._oFeedbackDialog.attachEventOnce("afterClose", function() {
|
|
507
|
+
this._oFeedbackDialog.destroy();
|
|
508
|
+
}.bind(this));
|
|
509
|
+
this._oFeedbackDialog.open();
|
|
510
|
+
}.bind(this)).catch(function (oError) {
|
|
511
|
+
Log.error("Error loading fragment sap.ui.rta.toolbar.FeedbackDialog: ", oError);
|
|
512
|
+
});
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
Adaptation.prototype.closeFeedbackForm = function() {
|
|
516
|
+
if (this._oFeedbackDialog) {
|
|
517
|
+
this._oFeedbackDialog.close();
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
|
|
372
521
|
return Adaptation;
|
|
373
|
-
});
|
|
522
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<core:FragmentDefinition
|
|
2
|
+
xmlns:core="sap.ui.core"
|
|
3
|
+
xmlns="sap.m"
|
|
4
|
+
xmlns:util="sap.ui.fl.util">
|
|
5
|
+
<Dialog
|
|
6
|
+
id="sapUiRtaFeedbackIFrameDialog"
|
|
7
|
+
title="{i18n>TIT_FEEDBACK}"
|
|
8
|
+
contentWidth="50rem"
|
|
9
|
+
contentHeight="50rem"
|
|
10
|
+
draggable="true">
|
|
11
|
+
<content>
|
|
12
|
+
<util:IFrame
|
|
13
|
+
id="sapUiRtaFeedbackIFrameDialog_iFrame"
|
|
14
|
+
url="{= ${feedbackModel>/url}}"
|
|
15
|
+
height="46rem"/>
|
|
16
|
+
</content>
|
|
17
|
+
<buttons>
|
|
18
|
+
<Button
|
|
19
|
+
id="sapUiRtaFeedbackIFrameDialog_ButtonClose"
|
|
20
|
+
text="{i18n>BTN_CLOSE_FEEDBACK_DIALOG}"
|
|
21
|
+
press=".closeFeedbackForm"/>
|
|
22
|
+
</buttons>
|
|
23
|
+
</Dialog>
|
|
24
|
+
</core:FragmentDefinition>
|
|
@@ -13,6 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
14
14
|
"sap/m/ColumnListItem",
|
|
15
15
|
"sap/ui/rta/Utils",
|
|
16
|
+
"sap/ui/rta/toolbar/contextBased/SaveAsAdaptation",
|
|
16
17
|
"sap/ui/model/Filter",
|
|
17
18
|
"sap/ui/model/FilterOperator",
|
|
18
19
|
"sap/ui/model/json/JSONModel",
|
|
@@ -26,6 +27,7 @@ function(
|
|
|
26
27
|
ContextBasedAdaptationsAPI,
|
|
27
28
|
ColumnListItem,
|
|
28
29
|
Utils,
|
|
30
|
+
SaveAsAdaptation,
|
|
29
31
|
Filter,
|
|
30
32
|
FilterOperator,
|
|
31
33
|
JSONModel,
|
|
@@ -75,7 +77,9 @@ function(
|
|
|
75
77
|
moveDown: moveDown.bind(this),
|
|
76
78
|
onDropSelectedAdaptation: onDropSelectedAdaptation.bind(this),
|
|
77
79
|
onSaveReorderedAdaptations: onSaveReorderedAdaptations.bind(this),
|
|
78
|
-
|
|
80
|
+
isAdaptationsSelected: isAdaptationsSelected.bind(this),
|
|
81
|
+
getIndexOfSelectedAdaptation: getIndexOfSelectedAdaptation.bind(this),
|
|
82
|
+
onCancel: onCancelDialog.bind(this)
|
|
79
83
|
}
|
|
80
84
|
}).then(function(oDialog) {
|
|
81
85
|
this._oManageAdaptationDialog = oDialog;
|
|
@@ -83,7 +87,7 @@ function(
|
|
|
83
87
|
this.getToolbar().addDependent(this._oManageAdaptationDialog);
|
|
84
88
|
}.bind(this));
|
|
85
89
|
} else {
|
|
86
|
-
|
|
90
|
+
syncEnabledPropertyOfMoveButtons.call(this);
|
|
87
91
|
enableDragAndDropForAdaptationTable.call(this, true);
|
|
88
92
|
enableSaveButton.call(this, false);
|
|
89
93
|
}
|
|
@@ -94,11 +98,11 @@ function(
|
|
|
94
98
|
}.bind(this)).then(function(oAdaptations) {
|
|
95
99
|
this.oAdaptationsModel = ContextBasedAdaptationsAPI.getAdaptationsModel({control: this._oRtaInformation.rootControl, layer: this._oRtaInformation.flexSettings.layer});
|
|
96
100
|
this.oAdaptationsModel.updateAdaptations(oAdaptations.adaptations);
|
|
97
|
-
this.oReferenceAdaptationsData = JSON.parse(JSON.stringify(
|
|
101
|
+
this.oReferenceAdaptationsData = JSON.parse(JSON.stringify(this.oAdaptationsModel.getProperty("/adaptations")));
|
|
102
|
+
this._oOriginAdaptationsData = JSON.parse(JSON.stringify(this.oAdaptationsModel.getProperty("/allAdaptations")));
|
|
98
103
|
this._oControlConfigurationModel = new JSONModel({isTableItemSelected: false});
|
|
99
104
|
this._oManageAdaptationDialog.setModel(this.oAdaptationsModel, "contextBased");
|
|
100
105
|
this._oManageAdaptationDialog.setModel(this._oControlConfigurationModel, "controlConfiguration");
|
|
101
|
-
initializeRanks(this.oAdaptationsModel);
|
|
102
106
|
getAdaptationsTable.call(this).attachSelectionChange(onSelectionChange.bind(this));
|
|
103
107
|
return this._oManageAdaptationDialog.open();
|
|
104
108
|
}.bind(this)
|
|
@@ -126,26 +130,36 @@ function(
|
|
|
126
130
|
var oOptions = {
|
|
127
131
|
year: "numeric",
|
|
128
132
|
month: "short",
|
|
129
|
-
day: "numeric"
|
|
133
|
+
day: "numeric",
|
|
134
|
+
hour: "numeric",
|
|
135
|
+
minute: "numeric"
|
|
130
136
|
};
|
|
131
137
|
var sLanguage = sap.ui.getCore().getConfiguration().getLanguage();
|
|
132
|
-
return sModifiedBy + "\n" + oUi5Date.
|
|
138
|
+
return sModifiedBy + "\n" + oUi5Date.toLocaleTimeString(sLanguage, oOptions);
|
|
133
139
|
}
|
|
134
140
|
|
|
135
141
|
function onSelectionChange(oEvent) {
|
|
136
142
|
if (oEvent.getParameter("selected") === true) {
|
|
137
143
|
this._oControlConfigurationModel.setProperty("/isTableItemSelected", true);
|
|
138
|
-
|
|
139
|
-
setEnabledPropertyOfMoveButton.call(this, true);
|
|
140
|
-
}
|
|
144
|
+
syncEnabledPropertyOfMoveButtons.call(this);
|
|
141
145
|
}
|
|
142
146
|
}
|
|
143
147
|
|
|
144
|
-
function
|
|
148
|
+
function syncEnabledPropertyOfMoveButtons() {
|
|
145
149
|
var oUpButton = getControlInDialog.call(this, "moveUpButton");
|
|
146
150
|
var oDownButton = getControlInDialog.call(this, "moveDownButton");
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
if (isSearchFieldValueEmpty.call(this)) {
|
|
152
|
+
if (isAdaptationsSelected.call(this)) {
|
|
153
|
+
oUpButton.setEnabled(getIndexOfSelectedAdaptation.call(this) > 0);
|
|
154
|
+
oDownButton.setEnabled(getIndexOfSelectedAdaptation.call(this) < this.oAdaptationsModel.getProperty("/count") - 1);
|
|
155
|
+
} else {
|
|
156
|
+
oUpButton.setEnabled(false);
|
|
157
|
+
oDownButton.setEnabled(false);
|
|
158
|
+
}
|
|
159
|
+
} else {
|
|
160
|
+
oUpButton.setEnabled(false);
|
|
161
|
+
oDownButton.setEnabled(false);
|
|
162
|
+
}
|
|
149
163
|
}
|
|
150
164
|
|
|
151
165
|
// ------ search field ------
|
|
@@ -156,7 +170,7 @@ function(
|
|
|
156
170
|
var oDefaultApplicationTable = getDefaultApplicationTable.call(this);
|
|
157
171
|
var sDefaultTableText = getDefaultApplicationTitle.call(this);
|
|
158
172
|
if (sQuery && sQuery.length > 0) {
|
|
159
|
-
|
|
173
|
+
syncEnabledPropertyOfMoveButtons.call(this);
|
|
160
174
|
enableDragAndDropForAdaptationTable.call(this, false);
|
|
161
175
|
//filter Table context
|
|
162
176
|
var oFilterByTitle = new Filter("title", FilterOperator.Contains, sQuery);
|
|
@@ -180,7 +194,7 @@ function(
|
|
|
180
194
|
} else {
|
|
181
195
|
enableDragAndDropForAdaptationTable.call(this, true);
|
|
182
196
|
if (this._oControlConfigurationModel.getProperty("/isTableItemSelected")) {
|
|
183
|
-
|
|
197
|
+
syncEnabledPropertyOfMoveButtons.call(this);
|
|
184
198
|
}
|
|
185
199
|
oDefaultApplicationTable.setVisible(true);
|
|
186
200
|
}
|
|
@@ -211,14 +225,6 @@ function(
|
|
|
211
225
|
oModel.refresh(true);
|
|
212
226
|
}
|
|
213
227
|
|
|
214
|
-
function initializeRanks(oModel) {
|
|
215
|
-
var aContexts = oModel.getProperty("/adaptations") || [];
|
|
216
|
-
aContexts.forEach(function(oContext, iIndex) {
|
|
217
|
-
oContext.rank = iIndex + 1;
|
|
218
|
-
});
|
|
219
|
-
oModel.setProperty("/adaptations", aContexts);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
228
|
function moveSelectedItem(sDirection) {
|
|
223
229
|
var oTable = getAdaptationsTable.call(this);
|
|
224
230
|
var oSelectedItem = oTable.getSelectedItem(0);
|
|
@@ -241,7 +247,8 @@ function(
|
|
|
241
247
|
sortByRank(this.oAdaptationsModel);
|
|
242
248
|
// after move select the sibling
|
|
243
249
|
oTable.getItems()[iSiblingItemIndex].setSelected(true).focus();
|
|
244
|
-
enableSaveButton.call(this,
|
|
250
|
+
enableSaveButton.call(this, didAdaptationsPriorityChange.call(this));
|
|
251
|
+
syncEnabledPropertyOfMoveButtons.call(this);
|
|
245
252
|
}
|
|
246
253
|
|
|
247
254
|
function onDropSelectedAdaptation(oEvent) {
|
|
@@ -279,14 +286,15 @@ function(
|
|
|
279
286
|
// set the rank property and update the model to refresh the bindings
|
|
280
287
|
this.oAdaptationsModel.setProperty("rank", iNewRank, oDraggedItemContext);
|
|
281
288
|
sortByRank(this.oAdaptationsModel);
|
|
282
|
-
|
|
283
|
-
|
|
289
|
+
var oAllUpdatedAdaptations = Object.assign(this.oAdaptationsModel.getProperty("/allAdaptations"), this.oAdaptationsModel.getProperty("/adaptations"));
|
|
290
|
+
this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
|
|
291
|
+
enableSaveButton.call(this, didAdaptationsPriorityChange.call(this));
|
|
284
292
|
}
|
|
285
293
|
|
|
286
294
|
function didAdaptationsPriorityChange() {
|
|
287
295
|
return !_isEqual(
|
|
288
|
-
this.oAdaptationsModel.getProperty("/adaptations").map(function(
|
|
289
|
-
this.oReferenceAdaptationsData.
|
|
296
|
+
this.oAdaptationsModel.getProperty("/adaptations").map(function(oAdaptation) { return oAdaptation.id; }),
|
|
297
|
+
this.oReferenceAdaptationsData.map(function(oAdaptation) { return oAdaptation.id; })
|
|
290
298
|
);
|
|
291
299
|
}
|
|
292
300
|
|
|
@@ -324,19 +332,42 @@ function(
|
|
|
324
332
|
getAdaptationsTable.call(this).getDragDropConfig()[0].setEnabled(bIsEnabled);
|
|
325
333
|
}
|
|
326
334
|
|
|
335
|
+
function isAdaptationsSelected() {
|
|
336
|
+
var oAdaptationsTable = getAdaptationsTable.call(this);
|
|
337
|
+
return oAdaptationsTable.getSelectedContextPaths().length > 0;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
function getIndexOfSelectedAdaptation() {
|
|
341
|
+
var oAdaptationsTable = getAdaptationsTable.call(this);
|
|
342
|
+
if (oAdaptationsTable.getSelectedContextPaths().length > 0) {
|
|
343
|
+
var aSplitedPath = oAdaptationsTable.getSelectedContextPaths()[0].split("/");
|
|
344
|
+
var iIndexOfSelectedItem = Number(aSplitedPath[aSplitedPath.length - 1]);
|
|
345
|
+
return iIndexOfSelectedItem;
|
|
346
|
+
}
|
|
347
|
+
return -1;
|
|
348
|
+
}
|
|
349
|
+
|
|
327
350
|
function onSaveReorderedAdaptations() {
|
|
328
|
-
|
|
351
|
+
Utils.checkDraftOverwrite(this.getToolbar().getModel("versions")).then(function() {
|
|
329
352
|
var oRtaInformation = this.getToolbar().getRtaInformation();
|
|
330
353
|
var aAdaptationPriorities = this.oAdaptationsModel.getProperty("/adaptations").map(function(oAdaptation) { return oAdaptation.id; });
|
|
331
|
-
ContextBasedAdaptationsAPI.reorder({control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer, parameters: {priorities: aAdaptationPriorities}})
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
354
|
+
return ContextBasedAdaptationsAPI.reorder({control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer, parameters: {priorities: aAdaptationPriorities}});
|
|
355
|
+
}.bind(this)).then(function() {
|
|
356
|
+
var oAllUpdatedAdaptations = Object.assign(this.oAdaptationsModel.getProperty("/allAdaptations"), this.oAdaptationsModel.getProperty("/adaptations"));
|
|
357
|
+
this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
|
|
358
|
+
onCloseDialog.call(this);
|
|
359
|
+
}.bind(this))
|
|
360
|
+
.catch(function(oError) {
|
|
361
|
+
if (oError !== "cancel") {
|
|
362
|
+
Utils.showMessageBox("error", "MSG_LREP_TRANSFER_ERROR", { titleKey: "BTN_MANAGE_APP_CTX", error: oError});
|
|
363
|
+
Log.error("sap.ui.rta: " + oError.stack || oError.message || oError);
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
function onCancelDialog() {
|
|
369
|
+
// the adaptationsModel has to be set to its origin as no reorder has taken place
|
|
370
|
+
this.oAdaptationsModel.updateAdaptations(this._oOriginAdaptationsData);
|
|
340
371
|
onCloseDialog.call(this);
|
|
341
372
|
}
|
|
342
373
|
|