@sapui5/sap.rules.ui 1.107.0 → 1.108.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 +1 -1
- package/src/sap/rules/ui/.library +1 -1
- package/src/sap/rules/ui/AstExpressionBasic.js +27 -6
- package/src/sap/rules/ui/AstExpressionBasicRenderer.js +71 -55
- package/src/sap/rules/ui/AutoCompleteSuggestionContent.js +5 -3
- package/src/sap/rules/ui/AutoCompleteSuggestionContentRenderer.js +39 -40
- package/src/sap/rules/ui/BindingSpy.js +1 -1
- package/src/sap/rules/ui/DecisionTable.js +2157 -2154
- package/src/sap/rules/ui/DecisionTableCell.js +7 -4
- package/src/sap/rules/ui/DecisionTableCellAstExpressionBasic.js +7 -4
- package/src/sap/rules/ui/DecisionTableCellAstExpressionBasicRenderer.js +5 -3
- package/src/sap/rules/ui/DecisionTableCellExpressionAdvanced.js +238 -236
- package/src/sap/rules/ui/DecisionTableCellExpressionAdvancedRenderer.js +6 -4
- package/src/sap/rules/ui/DecisionTableCellExpressionBasic.js +7 -4
- package/src/sap/rules/ui/DecisionTableCellExpressionBasicRenderer.js +6 -4
- package/src/sap/rules/ui/DecisionTableCellRenderer.js +10 -10
- package/src/sap/rules/ui/DecisionTableConfiguration.js +1 -1
- package/src/sap/rules/ui/DecisionTableRenderer.js +163 -161
- package/src/sap/rules/ui/DecisionTableSettings.js +6 -4
- package/src/sap/rules/ui/DecisionTableSettingsOld.js +963 -961
- package/src/sap/rules/ui/DecisionTableSettingsOldRenderer.js +9 -10
- package/src/sap/rules/ui/DecisionTableSettingsRenderer.js +9 -10
- package/src/sap/rules/ui/ExpressionAdvanced.js +1726 -1724
- package/src/sap/rules/ui/ExpressionAdvancedRenderer.js +8 -8
- package/src/sap/rules/ui/ExpressionBase.js +1 -1
- package/src/sap/rules/ui/ExpressionBasic.js +7 -4
- package/src/sap/rules/ui/ExpressionBasicRenderer.js +8 -7
- package/src/sap/rules/ui/InstructionRenderer.js +73 -33
- package/src/sap/rules/ui/RuleBase.js +1 -1
- package/src/sap/rules/ui/RuleBuilder.js +433 -430
- package/src/sap/rules/ui/RuleBuilderRenderer.js +8 -9
- package/src/sap/rules/ui/TextRule.js +7 -4
- package/src/sap/rules/ui/TextRuleConfiguration.js +1 -1
- package/src/sap/rules/ui/TextRuleRenderer.js +45 -44
- package/src/sap/rules/ui/TextRuleSettings.js +6 -4
- package/src/sap/rules/ui/TextRuleSettingsRenderer.js +9 -9
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAdvancedFunctionPanel.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAdvancedFunctionPanelRenderer.js +10 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAggregateFunctionPanel.js +100 -98
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAggregateFunctionPanelRenderer.js +9 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionArrayOperatorPanel.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionArrayOperatorPanelRenderer.js +10 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionComparisionOperatorPanel.js +109 -107
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionComparisionOperatorPanelRenderer.js +39 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionDateAndTimePanel.js +5 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionDateAndTimePanelRenderer.js +10 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanel.js +840 -838
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanelRenderer.js +40 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFunctionalOperatorPanel.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFunctionalOperatorPanelRenderer.js +10 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLogicalOperatorPanel.js +112 -110
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLogicalOperatorPanelRenderer.js +39 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLoopFunctionPanel.js +100 -98
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLoopFunctionPanelRenderer.js +9 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMathematicalOperatorPanel.js +122 -119
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMathematicalOperatorPanelRenderer.js +39 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanel.js +5 -2
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanelRenderer.js +10 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionOperationsPanel.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionOperationsPanelRenderer.js +10 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionRangeOperatorPanel.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionRangeOperatorPanelRenderer.js +10 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionSelectFunctionPanel.js +108 -106
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionSelectFunctionPanelRenderer.js +40 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanel.js +254 -252
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanelRenderer.js +40 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionVocabularyPanel.js +631 -629
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionVocabularyPanelRenderer.js +40 -40
- package/src/sap/rules/ui/library.js +31 -10
- package/src/sap/rules/ui/type/ExpressionAbs.js +1 -1
package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanel.js
CHANGED
|
@@ -1,253 +1,255 @@
|
|
|
1
|
-
sap.ui.define([
|
|
2
|
-
"sap/ui/thirdparty/jquery",
|
|
3
|
-
"../../library",
|
|
4
|
-
"sap/ui/core/Control",
|
|
5
|
-
"sap/m/List",
|
|
6
|
-
"sap/ui/model/json/JSONModel",
|
|
7
|
-
"sap/m/ListMode",
|
|
8
|
-
"sap/ui/core/CustomData",
|
|
9
|
-
"sap/ui/model/Sorter",
|
|
10
|
-
"sap/rules/ui/parser/infrastructure/util/utilsBase"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.
|
|
48
|
-
this.
|
|
49
|
-
this.
|
|
50
|
-
this.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
this.
|
|
58
|
-
this.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
var
|
|
126
|
-
var
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
that.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
var
|
|
152
|
-
var
|
|
153
|
-
|
|
154
|
-
this.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
that.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
var
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
oList.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
var
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
oList.
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
var
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
timeAndDurationlist.
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
1
|
+
sap.ui.define([
|
|
2
|
+
"sap/ui/thirdparty/jquery",
|
|
3
|
+
"../../library",
|
|
4
|
+
"sap/ui/core/Control",
|
|
5
|
+
"sap/m/List",
|
|
6
|
+
"sap/ui/model/json/JSONModel",
|
|
7
|
+
"sap/m/ListMode",
|
|
8
|
+
"sap/ui/core/CustomData",
|
|
9
|
+
"sap/ui/model/Sorter",
|
|
10
|
+
"sap/rules/ui/parser/infrastructure/util/utilsBase",
|
|
11
|
+
"./AutoSuggestionTimeAndDurationFunctionPanelRenderer"
|
|
12
|
+
], function (jQuery, library, Control, List, JSONModel, ListMode, CustomData, Sorter, infraUtils, AutoSuggestionTimeAndDurationFunctionPanelRenderer) {
|
|
13
|
+
"use strict";
|
|
14
|
+
|
|
15
|
+
var autoSuggestionTimeAndDurationFunctionPanel = Control.extend(
|
|
16
|
+
"sap.rules.ui.ast.autoCompleteContent.AutoSuggestionTimeAndDurationFunctionPanel", {
|
|
17
|
+
metadata: {
|
|
18
|
+
library: "sap.rules.ui",
|
|
19
|
+
properties: {
|
|
20
|
+
reference: {
|
|
21
|
+
type: "object",
|
|
22
|
+
defaultValue: null,
|
|
23
|
+
},
|
|
24
|
+
dialogOpenedCallbackReference: {
|
|
25
|
+
type: "object",
|
|
26
|
+
defaultValue: null,
|
|
27
|
+
},
|
|
28
|
+
data: {
|
|
29
|
+
type: "object",
|
|
30
|
+
defaultValue: null
|
|
31
|
+
},
|
|
32
|
+
expand: {
|
|
33
|
+
type: "boolean",
|
|
34
|
+
defaultValue: false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
aggregations: {
|
|
38
|
+
PanelLayout: {
|
|
39
|
+
type: "sap.m.Panel",
|
|
40
|
+
multiple: false
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
events: {}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
init: function () {
|
|
47
|
+
this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
|
|
48
|
+
this.infraUtils = new sap.rules.ui.parser.infrastructure.util.utilsBase.utilsBaseLib();
|
|
49
|
+
this.needCreateLayout = true;
|
|
50
|
+
this.AttributeSegmentSelected = true;
|
|
51
|
+
this.dataObjectName = "";
|
|
52
|
+
},
|
|
53
|
+
onBeforeRendering: function () {
|
|
54
|
+
this._reference = this.getReference();
|
|
55
|
+
this._dialogOpenedCallbackReference = this.getDialogOpenedCallbackReference();
|
|
56
|
+
if (this.needCreateLayout) {
|
|
57
|
+
var layout = this._createLayout();
|
|
58
|
+
this.setAggregation("PanelLayout", layout, true);
|
|
59
|
+
this.needCreateLayout = false;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
initializeVariables: function () {
|
|
64
|
+
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
_createLayout: function () {
|
|
68
|
+
var that = this;
|
|
69
|
+
this.vocabularyData = this.getData();
|
|
70
|
+
// create a Model with this data
|
|
71
|
+
var model = new sap.ui.model.json.JSONModel();
|
|
72
|
+
|
|
73
|
+
// create a list
|
|
74
|
+
this.timeAndDurationFunctionlist = new sap.m.List({
|
|
75
|
+
growingScrollToLoad: true,
|
|
76
|
+
enableBusyIndicator: true,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
/*Setting growing shows the growing trigger button with text as 2/14 which we do not need
|
|
80
|
+
Hence, setting to top 5 and the rest will be shown in More link */
|
|
81
|
+
var topFiveVocabularyData = [];
|
|
82
|
+
for (var termCount = 0; termCount < 5 && termCount < this.vocabularyData.length; termCount++) {
|
|
83
|
+
topFiveVocabularyData.push(this.vocabularyData[termCount]);
|
|
84
|
+
}
|
|
85
|
+
model.setData(topFiveVocabularyData);
|
|
86
|
+
|
|
87
|
+
// bind the List items to the data collection
|
|
88
|
+
this.timeAndDurationFunctionlist.bindItems({
|
|
89
|
+
path: "/",
|
|
90
|
+
sorter: new sap.ui.model.Sorter("name"),
|
|
91
|
+
rememberSelections: false,
|
|
92
|
+
mode: ListMode.SingleSelectMaster,
|
|
93
|
+
template: new sap.m.DisplayListItem({
|
|
94
|
+
label: "{name}",
|
|
95
|
+
value: "{label}",
|
|
96
|
+
type: "Active",
|
|
97
|
+
press: function (oEvent) {
|
|
98
|
+
that._reference(oEvent);
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// set the model to the List, so it knows which data to use
|
|
104
|
+
this.timeAndDurationFunctionlist.setModel(model);
|
|
105
|
+
var moreTimeAndDurationLink = this.getMoreTimeAndDurationLink();
|
|
106
|
+
var that = this;
|
|
107
|
+
|
|
108
|
+
// add list to the panel
|
|
109
|
+
var timeAndDurationFunctionslistPanel = new sap.m.Panel({
|
|
110
|
+
headerText: this.oBundle.getText("timeAndDurationFunctionsPanelTitle"),
|
|
111
|
+
expandable: true,
|
|
112
|
+
expanded: this.getExpand(),
|
|
113
|
+
content: this.timeAndDurationFunctionlist,
|
|
114
|
+
width: "auto"
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
if (this.vocabularyData.length >= 5) {
|
|
118
|
+
timeAndDurationFunctionslistPanel.addContent(moreTimeAndDurationLink);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return timeAndDurationFunctionslistPanel;
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
getMoreTimeAndDurationLink: function () {
|
|
125
|
+
var that = this;
|
|
126
|
+
var suggestionsData = this.getData();
|
|
127
|
+
var moreTimeAndDurationLink = new sap.m.Link({
|
|
128
|
+
text: this.oBundle.getText("more_link"),
|
|
129
|
+
tooltip: this.oBundle.getText("more_link_tooltip"),
|
|
130
|
+
enabled: true,
|
|
131
|
+
press: function (oEvent) {
|
|
132
|
+
that._setModal(true);
|
|
133
|
+
that._dialogOpenedCallbackReference(true);
|
|
134
|
+
if (that.vocabularyData) {
|
|
135
|
+
that.getTimeAndDurationDialog();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
return moreTimeAndDurationLink;
|
|
140
|
+
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
_setModal: function (value) {
|
|
144
|
+
var pop = sap.ui.getCore().byId("popover");
|
|
145
|
+
if (pop) {
|
|
146
|
+
pop.setModal(value);
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
getTimeAndDurationDialog: function () {
|
|
151
|
+
var that = this;
|
|
152
|
+
var searchFieldText = this.oBundle.getText("searchTextTimeAndDuration");
|
|
153
|
+
var searchField = this.getSearchField(searchFieldText);
|
|
154
|
+
this.detailedTimeAndDurationList = this.initializeTimeAndDurationList(this.vocabularyData);
|
|
155
|
+
this.bindFilteredTermsToList(this.detailedTimeAndDurationList, "", false);
|
|
156
|
+
var verticalLayoutForTimeAndDurationFunction = new sap.ui.layout.VerticalLayout({
|
|
157
|
+
content: [searchField, that.detailedTimeAndDurationList]
|
|
158
|
+
}).addStyleClass("sapAstVocabularyPanel");
|
|
159
|
+
|
|
160
|
+
this.timeAndDurationDialog = new sap.m.Dialog({
|
|
161
|
+
title: this.oBundle.getText("selectTimeAndDurationTitle"),
|
|
162
|
+
contentWidth: "500px",
|
|
163
|
+
contentHeight: "500px",
|
|
164
|
+
showHeader: true,
|
|
165
|
+
content: [verticalLayoutForTimeAndDurationFunction],
|
|
166
|
+
afterClose: function () {
|
|
167
|
+
that._dialogOpenedCallbackReference(false);
|
|
168
|
+
},
|
|
169
|
+
buttons: [
|
|
170
|
+
new sap.m.Button({
|
|
171
|
+
text: this.oBundle.getText("cancelBtn"),
|
|
172
|
+
tooltip: this.oBundle.getText("cancelBtn"),
|
|
173
|
+
press: function (event) {
|
|
174
|
+
that._setModal(false);
|
|
175
|
+
that.timeAndDurationDialog.close();
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
]
|
|
179
|
+
});
|
|
180
|
+
that.timeAndDurationDialog.open();
|
|
181
|
+
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
bindFilteredTermsToList: function (oList, searchText, requireSearch) {
|
|
185
|
+
var model = new sap.ui.model.json.JSONModel(this.vocabularyData);
|
|
186
|
+
|
|
187
|
+
var that = this;
|
|
188
|
+
var datapath = "/";
|
|
189
|
+
if (!oList) {
|
|
190
|
+
oList = new sap.m.List({});
|
|
191
|
+
}
|
|
192
|
+
oList.setModel(model);
|
|
193
|
+
oList.bindItems({
|
|
194
|
+
path: datapath,
|
|
195
|
+
template: new sap.m.DisplayListItem({
|
|
196
|
+
label: "{name}",
|
|
197
|
+
value: "{label}",
|
|
198
|
+
type: "Active",
|
|
199
|
+
press: function (oEvent) {
|
|
200
|
+
that._setModal(false);
|
|
201
|
+
if (that.timeAndDurationDialog.isOpen()) {
|
|
202
|
+
that.timeAndDurationDialog.close();
|
|
203
|
+
}
|
|
204
|
+
that._reference(oEvent);
|
|
205
|
+
}
|
|
206
|
+
}),
|
|
207
|
+
rememberSelections: false,
|
|
208
|
+
mode: ListMode.SingleSelectMaster
|
|
209
|
+
});
|
|
210
|
+
if (requireSearch) {
|
|
211
|
+
var filterArray = [];
|
|
212
|
+
var filterProperty = "name";
|
|
213
|
+
filterArray.push(new sap.ui.model.Filter(filterProperty, sap.ui.model.FilterOperator.Contains, searchText));
|
|
214
|
+
oList.getBinding("items").filter(filterArray);
|
|
215
|
+
oList.getModel().refresh(true);
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
|
|
219
|
+
initializeTimeAndDurationList: function (vocabularyData) {
|
|
220
|
+
var model = new sap.ui.model.json.JSONModel(vocabularyData);
|
|
221
|
+
var datapath = "/";
|
|
222
|
+
var timeAndDurationlist = new sap.m.List({
|
|
223
|
+
headerText: this.oBundle.getText("timeAndDuration")
|
|
224
|
+
});
|
|
225
|
+
timeAndDurationlist.setModel(model);
|
|
226
|
+
timeAndDurationlist.bindItems({
|
|
227
|
+
path: datapath,
|
|
228
|
+
template: new sap.m.DisplayListItem({
|
|
229
|
+
label: "{name}",
|
|
230
|
+
value: "{label}",
|
|
231
|
+
type: "Active",
|
|
232
|
+
})
|
|
233
|
+
|
|
234
|
+
});
|
|
235
|
+
return timeAndDurationlist;
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
getSearchField: function (placeHolderText) {
|
|
239
|
+
var that = this;
|
|
240
|
+
this.searchField = new sap.m.SearchField({
|
|
241
|
+
showSearchButton: false,
|
|
242
|
+
width: "462px",
|
|
243
|
+
placeholder: placeHolderText, //searchType,
|
|
244
|
+
liveChange: function (oEvent) {
|
|
245
|
+
that.bindFilteredTermsToList(that.detailedTimeAndDurationList, oEvent.getParameter("newValue"), true);
|
|
246
|
+
}
|
|
247
|
+
})
|
|
248
|
+
return this.searchField;
|
|
249
|
+
},
|
|
250
|
+
renderer: AutoSuggestionTimeAndDurationFunctionPanelRenderer
|
|
251
|
+
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
return autoSuggestionTimeAndDurationFunctionPanel;
|
|
253
255
|
}, /* bExport= */ true);
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
/*!
|
|
1
|
+
/*!
|
|
2
2
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
3
|
|
|
4
4
|
(c) Copyright 2009-2016 SAP SE. All rights reserved
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
sap.ui.define([
|
|
9
|
-
|
|
10
|
-
function (
|
|
11
|
-
"use strict";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* autoSuggestionTimeAndDurationFunctionPanelRenderer renderer.
|
|
15
|
-
* @namespace
|
|
16
|
-
*/
|
|
17
|
-
var autoSuggestionTimeAndDurationFunctionPanelRenderer = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* the
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
oRm.renderControl(autoSuggestionTimeAndDurationFunctionPanelRenderer);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
return autoSuggestionTimeAndDurationFunctionPanelRenderer;
|
|
43
|
-
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
sap.ui.define([],
|
|
9
|
+
|
|
10
|
+
function () {
|
|
11
|
+
"use strict";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* autoSuggestionTimeAndDurationFunctionPanelRenderer renderer.
|
|
15
|
+
* @namespace
|
|
16
|
+
*/
|
|
17
|
+
var autoSuggestionTimeAndDurationFunctionPanelRenderer = {
|
|
18
|
+
apiVersion: 2
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Renders the HTML for the given control, using the provided
|
|
23
|
+
* {@link sap.ui.core.RenderManager}.
|
|
24
|
+
*
|
|
25
|
+
* @param {sap.ui.core.RenderManager} oRm
|
|
26
|
+
* the RenderManager that can be used for writing to
|
|
27
|
+
* the Render-Output-Buffer
|
|
28
|
+
* @param {sap.ui.core.Control} oControl
|
|
29
|
+
* the control to be rendered
|
|
30
|
+
*/
|
|
31
|
+
autoSuggestionTimeAndDurationFunctionPanelRenderer.render = function (oRm, oControl) {
|
|
32
|
+
|
|
33
|
+
oRm.openStart("div", oControl);
|
|
34
|
+
oRm.class("sapAstAdvancedFunctionPanel");
|
|
35
|
+
oRm.openEnd();
|
|
36
|
+
var autoSuggestionTimeAndDurationFunctionPanelRenderer = oControl.getAggregation("PanelLayout");
|
|
37
|
+
oRm.renderControl(autoSuggestionTimeAndDurationFunctionPanelRenderer);
|
|
38
|
+
oRm.close("div");
|
|
39
|
+
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return autoSuggestionTimeAndDurationFunctionPanelRenderer;
|
|
43
|
+
|
|
44
44
|
}, /* bExport= */ true);
|