@openui5/sap.ui.table 1.123.0 → 1.124.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/.eslintrc.json +9 -1
- package/package.json +3 -3
- package/src/sap/ui/table/.library +1 -1
- package/src/sap/ui/table/AnalyticalColumn.js +40 -40
- package/src/sap/ui/table/AnalyticalColumnMenu.js +11 -11
- package/src/sap/ui/table/AnalyticalTable.js +107 -107
- package/src/sap/ui/table/Column.js +83 -83
- package/src/sap/ui/table/ColumnMenu.js +54 -54
- package/src/sap/ui/table/CreationRow.js +29 -29
- package/src/sap/ui/table/CreationRowRenderer.js +21 -21
- package/src/sap/ui/table/Row.js +55 -56
- package/src/sap/ui/table/RowAction.js +27 -27
- package/src/sap/ui/table/RowActionItem.js +7 -7
- package/src/sap/ui/table/RowActionRenderer.js +3 -3
- package/src/sap/ui/table/RowSettings.js +28 -37
- package/src/sap/ui/table/Table.js +263 -266
- package/src/sap/ui/table/TablePersoController.js +46 -46
- package/src/sap/ui/table/TableRenderer.js +112 -113
- package/src/sap/ui/table/TreeTable.js +16 -16
- package/src/sap/ui/table/designtime/Table.designtime.js +2 -2
- package/src/sap/ui/table/extensions/Accessibility.js +185 -181
- package/src/sap/ui/table/extensions/AccessibilityRender.js +15 -15
- package/src/sap/ui/table/extensions/DragAndDrop.js +47 -47
- package/src/sap/ui/table/extensions/ExtensionBase.js +9 -9
- package/src/sap/ui/table/extensions/Keyboard.js +40 -40
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +257 -264
- package/src/sap/ui/table/extensions/Pointer.js +108 -109
- package/src/sap/ui/table/extensions/Scrolling.js +289 -285
- package/src/sap/ui/table/extensions/ScrollingIOS.js +50 -50
- package/src/sap/ui/table/extensions/Synchronization.js +32 -32
- package/src/sap/ui/table/library.js +12 -12
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +9 -9
- package/src/sap/ui/table/menus/LegacyColumnMenuAdapter.js +35 -37
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +23 -23
- package/src/sap/ui/table/messagebundle_sh.properties +9 -9
- package/src/sap/ui/table/plugins/BindingSelection.js +26 -25
- package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +77 -32
- package/src/sap/ui/table/plugins/ODataV4Selection.js +81 -35
- package/src/sap/ui/table/plugins/PluginBase.js +12 -12
- package/src/sap/ui/table/plugins/SelectionModelSelection.js +13 -12
- package/src/sap/ui/table/plugins/SelectionPlugin.js +3 -3
- package/src/sap/ui/table/plugins/V4Aggregation.js +38 -38
- package/src/sap/ui/table/rowmodes/Auto.js +59 -61
- package/src/sap/ui/table/rowmodes/Fixed.js +18 -18
- package/src/sap/ui/table/rowmodes/Interactive.js +42 -44
- package/src/sap/ui/table/rowmodes/RowMode.js +64 -63
- package/src/sap/ui/table/rowmodes/Type.js +1 -1
- package/src/sap/ui/table/rowmodes/Variable.js +4 -4
- package/src/sap/ui/table/rules/Accessibility.support.js +15 -16
- package/src/sap/ui/table/rules/Binding.support.js +11 -11
- package/src/sap/ui/table/rules/ColumnTemplate.support.js +10 -10
- package/src/sap/ui/table/rules/Plugins.support.js +7 -7
- package/src/sap/ui/table/rules/Rows.support.js +29 -29
- package/src/sap/ui/table/rules/TableHelper.support.js +10 -10
- package/src/sap/ui/table/themes/base/library.source.less +2 -0
- package/src/sap/ui/table/utils/TableUtils.js +130 -128
- package/src/sap/ui/table/utils/_BindingUtils.js +7 -7
- package/src/sap/ui/table/utils/_ColumnUtils.js +98 -97
- package/src/sap/ui/table/utils/_GroupingUtils.js +56 -56
- package/src/sap/ui/table/utils/_HookUtils.js +26 -26
- package/src/sap/ui/table/utils/_MenuUtils.js +19 -19
|
@@ -23,14 +23,14 @@ sap.ui.define([
|
|
|
23
23
|
) {
|
|
24
24
|
"use strict";
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
const INVALIDATE_MENU = ["sortProperty", "filterProperty", "showSortMenuEntry", "showFilterMenuEntry"];
|
|
27
|
+
const SET_FILTER_VALUE = ["filterValue"];
|
|
28
|
+
const INVALIDATE_ALL_MENUS = ["enableCustomFilter", "enableGrouping", "enableColumnFreeze", "showColumnVisibilityMenu"];
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* @deprecated As of Version 1.117
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
const LegacyColumnMenuAdapter = ColumnHeaderMenuAdapter.extend("sap.ui.table.menus.LegacyColumnMenuAdapter", {
|
|
34
34
|
constructor: function() {
|
|
35
35
|
ColumnHeaderMenuAdapter.apply(this, arguments);
|
|
36
36
|
|
|
@@ -49,16 +49,16 @@ sap.ui.define([
|
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
LegacyColumnMenuAdapter.prototype.injectMenuItems = function(oMenu, oColumn) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
const oTable = oColumn._getTable();
|
|
53
|
+
const oCell = oColumn.getDomRef();
|
|
54
|
+
const bCellHasMenuButton = oCell.querySelector(".sapUiTableColDropDown") !== null;
|
|
55
55
|
|
|
56
56
|
if (!Device.system.desktop && !bCellHasMenuButton) {
|
|
57
57
|
return this._applyColumnHeaderCellMenu(oColumn);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
this._removeColumnHeaderCellMenu(oTable);
|
|
61
|
-
|
|
61
|
+
const bExecuteDefault = oTable.fireColumnSelect({
|
|
62
62
|
column: oColumn
|
|
63
63
|
});
|
|
64
64
|
|
|
@@ -73,28 +73,28 @@ sap.ui.define([
|
|
|
73
73
|
* @private
|
|
74
74
|
*/
|
|
75
75
|
LegacyColumnMenuAdapter.prototype._invalidateMenu = function(oColumn) {
|
|
76
|
-
|
|
76
|
+
const oMenu = oColumn.getMenu();
|
|
77
77
|
if (TableUtils.isA(oMenu, "sap.ui.table.ColumnMenu")) {
|
|
78
78
|
oMenu._invalidate();
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
LegacyColumnMenuAdapter.prototype._invalidateAllMenus = function(oTable) {
|
|
83
|
-
|
|
84
|
-
for (
|
|
83
|
+
const aCols = oTable.getColumns();
|
|
84
|
+
for (let i = 0, l = aCols.length; i < l; i++) {
|
|
85
85
|
this._invalidateMenu(aCols[i]);
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
LegacyColumnMenuAdapter.prototype._setFilterValue = function(oColumn, sValue) {
|
|
90
|
-
|
|
90
|
+
const oMenu = oColumn.getMenu();
|
|
91
91
|
if (TableUtils.isA(oMenu, "sap.ui.table.ColumnMenu")) {
|
|
92
92
|
oMenu._setFilterValue(sValue);
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
LegacyColumnMenuAdapter.prototype._setFilterState = function(oColumn, sState) {
|
|
97
|
-
|
|
97
|
+
const oMenu = oColumn.getMenu();
|
|
98
98
|
if (TableUtils.isA(oMenu, "sap.ui.table.ColumnMenu")) {
|
|
99
99
|
oMenu._setFilterState(sState);
|
|
100
100
|
}
|
|
@@ -114,11 +114,11 @@ sap.ui.define([
|
|
|
114
114
|
* @private
|
|
115
115
|
*/
|
|
116
116
|
LegacyColumnMenuAdapter.prototype._applyColumnHeaderCellMenu = function(oColumn) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
const oTable = oColumn._getTable();
|
|
118
|
+
const oCell = oColumn.getDomRef();
|
|
119
|
+
const sColspan = oCell.getAttribute("colspan");
|
|
120
|
+
const oCellInner = oCell.querySelector(".sapUiTableCellInner");
|
|
121
|
+
const bCellMenuAlreadyExists = oCell.querySelector(".sapUiTableCellTouchMenu") !== null;
|
|
122
122
|
|
|
123
123
|
if (sColspan && sColspan !== "1" // headers with span do not have connection to a column, do not open the context menu
|
|
124
124
|
|| bCellMenuAlreadyExists
|
|
@@ -126,22 +126,20 @@ sap.ui.define([
|
|
|
126
126
|
return false;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
const oColumnTouchMenu = document.createElement("div");
|
|
130
130
|
|
|
131
131
|
this._removeColumnHeaderCellMenu(oTable); // First remove any existing column header cell menu of another column.
|
|
132
132
|
oCellInner.style.display = "none";
|
|
133
133
|
|
|
134
134
|
if (oColumn._menuHasItems()) {
|
|
135
|
-
|
|
136
|
-
oColumnContextMenuButton = document.createElement("div");
|
|
135
|
+
const oColumnContextMenuButton = document.createElement("div");
|
|
137
136
|
oColumnContextMenuButton.classList.add("sapUiTableColDropDown");
|
|
138
137
|
oColumnContextMenuButton.textContent = "";
|
|
139
138
|
oColumnTouchMenu.appendChild(oColumnContextMenuButton);
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
if (oColumn.getResizable()) {
|
|
143
|
-
|
|
144
|
-
oColumnResizerButton = document.createElement("div");
|
|
142
|
+
const oColumnResizerButton = document.createElement("div");
|
|
145
143
|
oColumnResizerButton.classList.add("sapUiTableColResizer");
|
|
146
144
|
oColumnResizerButton.textContent = "";
|
|
147
145
|
oColumnTouchMenu.appendChild(oColumnResizerButton);
|
|
@@ -150,7 +148,7 @@ sap.ui.define([
|
|
|
150
148
|
oColumnTouchMenu.classList.add("sapUiTableCellTouchMenu");
|
|
151
149
|
oCell.appendChild(oColumnTouchMenu);
|
|
152
150
|
|
|
153
|
-
|
|
151
|
+
const onFocusOut = function() {
|
|
154
152
|
this._removeColumnHeaderCellMenu(oTable);
|
|
155
153
|
oCell.removeEventListener("focusout", onFocusOut);
|
|
156
154
|
}.bind(this);
|
|
@@ -168,7 +166,7 @@ sap.ui.define([
|
|
|
168
166
|
* @private
|
|
169
167
|
*/
|
|
170
168
|
LegacyColumnMenuAdapter.prototype._removeColumnHeaderCellMenu = function(oTable) {
|
|
171
|
-
|
|
169
|
+
const $ColumnCellMenu = oTable && oTable.$().find(".sapUiTableCHT .sapUiTableCellTouchMenu");
|
|
172
170
|
if ($ColumnCellMenu.length) {
|
|
173
171
|
$ColumnCellMenu.parent().find(".sapUiTableCellInner").show();
|
|
174
172
|
$ColumnCellMenu.remove();
|
|
@@ -184,19 +182,19 @@ sap.ui.define([
|
|
|
184
182
|
* @private
|
|
185
183
|
*/
|
|
186
184
|
LegacyColumnMenuAdapter.prototype._openColumnContextMenu = function(oColumn) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
185
|
+
const oTable = oColumn._getTable();
|
|
186
|
+
const oDomRef = oColumn._cellPressed;
|
|
187
|
+
const aColumns = oTable.getColumns();
|
|
190
188
|
|
|
191
189
|
// Close all menus.
|
|
192
|
-
for (
|
|
190
|
+
for (let i = 0; i < aColumns.length; i++) {
|
|
193
191
|
// If column menus of other columns are open, close them.
|
|
194
192
|
if (aColumns[i] !== oColumn) {
|
|
195
193
|
this._closeColumnContextMenu(aColumns[i]);
|
|
196
194
|
}
|
|
197
195
|
}
|
|
198
196
|
|
|
199
|
-
|
|
197
|
+
const sColspan = oDomRef.getAttribute("colspan");
|
|
200
198
|
if (sColspan && sColspan !== "1") {
|
|
201
199
|
return false; // headers with span do not have connection to a column, do not open the context menu
|
|
202
200
|
}
|
|
@@ -212,18 +210,18 @@ sap.ui.define([
|
|
|
212
210
|
* @private
|
|
213
211
|
*/
|
|
214
212
|
LegacyColumnMenuAdapter.prototype._openMenu = function(oColumn, oDomRef) {
|
|
215
|
-
|
|
213
|
+
const oMenu = this._getMenu(oColumn);
|
|
216
214
|
|
|
217
215
|
if (!oColumn._menuHasItems()) {
|
|
218
216
|
return false;
|
|
219
217
|
}
|
|
220
218
|
|
|
221
|
-
|
|
219
|
+
const bExecuteDefault = oColumn.fireColumnMenuOpen({
|
|
222
220
|
menu: oMenu
|
|
223
221
|
});
|
|
224
222
|
|
|
225
223
|
if (bExecuteDefault) {
|
|
226
|
-
|
|
224
|
+
const eDock = Popup.Dock;
|
|
227
225
|
oMenu.open(null, oDomRef, eDock.BeginTop, eDock.BeginBottom, oDomRef);
|
|
228
226
|
return true;
|
|
229
227
|
} else {
|
|
@@ -238,19 +236,19 @@ sap.ui.define([
|
|
|
238
236
|
* @private
|
|
239
237
|
*/
|
|
240
238
|
LegacyColumnMenuAdapter.prototype._closeColumnContextMenu = function(oColumn) {
|
|
241
|
-
|
|
239
|
+
const oMenu = oColumn.getMenu();
|
|
242
240
|
if (oMenu) {
|
|
243
241
|
oMenu.close();
|
|
244
242
|
}
|
|
245
243
|
};
|
|
246
244
|
|
|
247
245
|
LegacyColumnMenuAdapter.prototype._getMenu = function(oColumn) {
|
|
248
|
-
|
|
246
|
+
let oMenu = oColumn.getMenu();
|
|
249
247
|
if (!oMenu) {
|
|
250
248
|
oMenu = this._createMenu(oColumn);
|
|
251
249
|
oColumn.setAggregation("menu", oMenu, true);
|
|
252
250
|
|
|
253
|
-
|
|
251
|
+
const arr = INVALIDATE_MENU.concat(SET_FILTER_VALUE).concat(INVALIDATE_ALL_MENUS);
|
|
254
252
|
this._oLegacyMenuObserver.observe(oColumn, {
|
|
255
253
|
properties: arr
|
|
256
254
|
});
|
|
@@ -265,7 +263,7 @@ sap.ui.define([
|
|
|
265
263
|
* @returns {sap.ui.table.ColumnMenu} The created column menu.
|
|
266
264
|
*/
|
|
267
265
|
LegacyColumnMenuAdapter.prototype._createMenu = function(oColumn) {
|
|
268
|
-
|
|
266
|
+
const ColumnMenuClass = oColumn.isA("sap.ui.table.AnalyticalColumn") ? AnalyticalColumnMenu : ColumnMenu;
|
|
269
267
|
return new ColumnMenuClass(oColumn.getId() + "-menu", {ariaLabelledBy: oColumn});
|
|
270
268
|
};
|
|
271
269
|
|
|
@@ -59,11 +59,11 @@ sap.ui.define([
|
|
|
59
59
|
*
|
|
60
60
|
* @extends sap.ui.table.menus.ColumnHeaderMenuAdapter
|
|
61
61
|
* @author SAP SE
|
|
62
|
-
* @version 1.
|
|
62
|
+
* @version 1.124.0
|
|
63
63
|
* @private
|
|
64
64
|
* @alias sap.ui.table.menus.MobileColumnHeaderMenuAdapter
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
const MobileColumnHeaderMenuAdapter = ColumnHeaderMenuAdapter.extend("sap.ui.table.menus.MobileColumnHeaderMenuAdapter", /** @lends sap.ui.table.menus.MobileColumnHeaderMenuAdapter.prototype */ {});
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Injects entries to the column menu needed to utilize built-in column features.
|
|
@@ -127,7 +127,7 @@ sap.ui.define([
|
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
MobileColumnHeaderMenuAdapter.prototype._prepareQuickActions = function(oColumn) {
|
|
130
|
-
|
|
130
|
+
const oTable = oColumn._getTable();
|
|
131
131
|
|
|
132
132
|
this._prepareQuickSort(oColumn);
|
|
133
133
|
|
|
@@ -154,7 +154,7 @@ sap.ui.define([
|
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
MobileColumnHeaderMenuAdapter.prototype._prepareItems = function(oColumn) {
|
|
157
|
-
|
|
157
|
+
const oTable = oColumn._getTable();
|
|
158
158
|
|
|
159
159
|
if (oTable.getEnableCustomFilter()) {
|
|
160
160
|
this._prepareCustomFilterItem(oColumn);
|
|
@@ -205,14 +205,14 @@ sap.ui.define([
|
|
|
205
205
|
return new QuickSort({
|
|
206
206
|
items: new QuickSortItem(),
|
|
207
207
|
change: [function(oEvent) {
|
|
208
|
-
|
|
208
|
+
const sSortOrder = oEvent.getParameter("item").getSortOrder();
|
|
209
209
|
this._oColumn._sort(sSortOrder, false);
|
|
210
210
|
}, this]
|
|
211
211
|
});
|
|
212
212
|
};
|
|
213
213
|
|
|
214
214
|
MobileColumnHeaderMenuAdapter.prototype._updateQuickSort = function(oColumn) {
|
|
215
|
-
|
|
215
|
+
const oItem = this._oQuickSort.getItems()[0];
|
|
216
216
|
|
|
217
217
|
oItem.setLabel(TableUtils.Column.getHeaderText(oColumn));
|
|
218
218
|
oItem.setSortOrder(oColumn.getSortOrder());
|
|
@@ -236,7 +236,7 @@ sap.ui.define([
|
|
|
236
236
|
content: new Input({
|
|
237
237
|
submit: [function(oEvent) {
|
|
238
238
|
this._oColumn.setFilterValue(oEvent.getSource().getValue());
|
|
239
|
-
|
|
239
|
+
const sState = this._oColumn._getFilterState();
|
|
240
240
|
|
|
241
241
|
if (sState === CoreLibrary.ValueState.None) {
|
|
242
242
|
this._oColumn.filter(oEvent.getSource().getValue());
|
|
@@ -251,8 +251,8 @@ sap.ui.define([
|
|
|
251
251
|
};
|
|
252
252
|
|
|
253
253
|
MobileColumnHeaderMenuAdapter.prototype._updateQuickFilter = function(oColumn) {
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
const oSapMResourceBundle = Library.getResourceBundleFor("sap.m");
|
|
255
|
+
const oFilterField = this._oQuickFilter.getContent()[0];
|
|
256
256
|
|
|
257
257
|
this._oQuickFilter.setLabel(oSapMResourceBundle.getText("table.COLUMNMENU_QUICK_FILTER", [TableUtils.Column.getHeaderText(oColumn)]));
|
|
258
258
|
oFilterField.setValue(oColumn.getFilterValue());
|
|
@@ -275,13 +275,13 @@ sap.ui.define([
|
|
|
275
275
|
return new QuickGroup({
|
|
276
276
|
items: new QuickGroupItem(),
|
|
277
277
|
change: [function(oEvent) {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
278
|
+
const bGrouped = oEvent.getParameter("item").getGrouped();
|
|
279
|
+
const oColumn = this._oColumn;
|
|
280
|
+
const oTable = oColumn._getTable();
|
|
281
281
|
|
|
282
282
|
this._oMenu.attachEventOnce("afterClose", function() {
|
|
283
283
|
if (bGrouped && (!oColumn.getShowIfGrouped || !oColumn.getShowIfGrouped())) {
|
|
284
|
-
|
|
284
|
+
let oDomRef;
|
|
285
285
|
|
|
286
286
|
if (TableUtils.isNoDataVisible(oTable)) {
|
|
287
287
|
oDomRef = oTable.getDomRef("noDataCnt");
|
|
@@ -301,7 +301,7 @@ sap.ui.define([
|
|
|
301
301
|
};
|
|
302
302
|
|
|
303
303
|
MobileColumnHeaderMenuAdapter.prototype._updateQuickGroup = function(oColumn) {
|
|
304
|
-
|
|
304
|
+
const oItem = this._oQuickGroup.getItems()[0];
|
|
305
305
|
|
|
306
306
|
oItem.setLabel(TableUtils.Column.getHeaderText(oColumn));
|
|
307
307
|
oItem.setGrouped(oColumn.getGrouped());
|
|
@@ -329,7 +329,7 @@ sap.ui.define([
|
|
|
329
329
|
};
|
|
330
330
|
|
|
331
331
|
MobileColumnHeaderMenuAdapter.prototype._updateQuickTotal = function(oColumn) {
|
|
332
|
-
|
|
332
|
+
const oItem = this._oQuickTotal.getItems()[0];
|
|
333
333
|
|
|
334
334
|
oItem.setLabel(TableUtils.Column.getHeaderText(oColumn));
|
|
335
335
|
oItem.setTotaled(oColumn.getSummed());
|
|
@@ -351,13 +351,13 @@ sap.ui.define([
|
|
|
351
351
|
return new QuickAction({
|
|
352
352
|
content: new Button({
|
|
353
353
|
press: [function(oEvent) {
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
const oTable = this._oColumn._getTable();
|
|
355
|
+
const bExecuteDefault = oTable.fireColumnFreeze({
|
|
356
356
|
column: this._oColumn
|
|
357
357
|
});
|
|
358
358
|
|
|
359
359
|
if (bExecuteDefault) {
|
|
360
|
-
|
|
360
|
+
const bIsLastFixedColumn = oEvent.getSource().getText() === TableUtils.getResourceText("TBL_UNFREEZE");
|
|
361
361
|
|
|
362
362
|
if (bIsLastFixedColumn) {
|
|
363
363
|
oTable.setFixedColumnCount(0);
|
|
@@ -373,8 +373,8 @@ sap.ui.define([
|
|
|
373
373
|
};
|
|
374
374
|
|
|
375
375
|
MobileColumnHeaderMenuAdapter.prototype._updateQuickFreeze = function(oColumn) {
|
|
376
|
-
|
|
377
|
-
|
|
376
|
+
const bIsLastFixedColumn = oColumn.getIndex() + TableUtils.Column.getHeaderSpan(oColumn) === oColumn._getTable().getComputedFixedColumnCount();
|
|
377
|
+
const sResourceTextKey = bIsLastFixedColumn ? "TBL_UNFREEZE" : "TBL_FREEZE";
|
|
378
378
|
|
|
379
379
|
this._oQuickFreeze.getContent()[0].setText(TableUtils.getResourceText(sResourceTextKey));
|
|
380
380
|
};
|
|
@@ -391,7 +391,7 @@ sap.ui.define([
|
|
|
391
391
|
};
|
|
392
392
|
|
|
393
393
|
MobileColumnHeaderMenuAdapter.prototype._createQuickResize = function(oColumn) {
|
|
394
|
-
|
|
394
|
+
const oSapMResourceBundle = Library.getResourceBundleFor("sap.m");
|
|
395
395
|
|
|
396
396
|
return new QuickAction({
|
|
397
397
|
content: new Button({
|
|
@@ -405,14 +405,14 @@ sap.ui.define([
|
|
|
405
405
|
};
|
|
406
406
|
|
|
407
407
|
MobileColumnHeaderMenuAdapter.prototype._startColumnResize = function(oColumn) {
|
|
408
|
-
|
|
408
|
+
const oTable = oColumn._getTable();
|
|
409
409
|
oTable.$().toggleClass("sapUiTableResizing", true);
|
|
410
410
|
oTable._$colResize = oTable.$("rsz");
|
|
411
411
|
oTable._$colResize.toggleClass("sapUiTableColRszActive", true);
|
|
412
412
|
};
|
|
413
413
|
|
|
414
414
|
MobileColumnHeaderMenuAdapter.prototype._removeHeaderCellColumnResizer = function(oTable) {
|
|
415
|
-
|
|
415
|
+
const $ColumnCellMenu = oTable && oTable.$().find(".sapUiTableCHT .sapUiTableCellTouchMenu");
|
|
416
416
|
if ($ColumnCellMenu.length) {
|
|
417
417
|
$ColumnCellMenu.parent().find(".sapUiTableCellInner").show();
|
|
418
418
|
$ColumnCellMenu.remove();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
TBL_FILTER=Filter
|
|
3
3
|
TBL_FILTER_ITEM=Filtriranje...
|
|
4
|
-
TBL_SORT_ASC=Pore\u0111aj po rastu\u0107em
|
|
5
|
-
TBL_SORT_DESC=Pore\u0111aj po opadaju\u0107em
|
|
4
|
+
TBL_SORT_ASC=Pore\u0111aj po rastu\u0107em redosledu
|
|
5
|
+
TBL_SORT_DESC=Pore\u0111aj po opadaju\u0107em redosledu
|
|
6
6
|
TBL_GROUP=Grupi\u0161i
|
|
7
7
|
TBL_UNGROUP=Poni\u0161ti grupisanje
|
|
8
8
|
TBL_UNGROUP_ALL=Poni\u0161ti grupisanje svega
|
|
9
9
|
TBL_COLUMNS=Kolone
|
|
10
10
|
TBL_FREEZE=Zamrzni
|
|
11
11
|
TBL_UNFREEZE=Odmrzni
|
|
12
|
-
TBL_MOVE_UP=
|
|
13
|
-
TBL_MOVE_DOWN=
|
|
12
|
+
TBL_MOVE_UP=Pomeri nagore
|
|
13
|
+
TBL_MOVE_DOWN=Pomeri nadole
|
|
14
14
|
TBL_EXPAND_LEVEL=Pro\u0161iri nivo
|
|
15
15
|
TBL_COLLAPSE_LEVEL=Sa\u017Emi nivo
|
|
16
16
|
TBL_EXPAND_ALL=Pro\u0161iri sve
|
|
@@ -67,9 +67,9 @@ TBL_COL_DESC_MENU=Meni dostupan
|
|
|
67
67
|
|
|
68
68
|
TBL_COL_DESC_FILTERED=Filtrirano
|
|
69
69
|
|
|
70
|
-
TBL_COL_DESC_SORTED_ASC=Pore\u0111ano po rastu\u0107em
|
|
70
|
+
TBL_COL_DESC_SORTED_ASC=Pore\u0111ano po rastu\u0107em redosledu
|
|
71
71
|
|
|
72
|
-
TBL_COL_DESC_SORTED_DES=Pore\u0111ano po opadaju\u0107em
|
|
72
|
+
TBL_COL_DESC_SORTED_DES=Pore\u0111ano po opadaju\u0107em redosledu
|
|
73
73
|
|
|
74
74
|
TBL_COL_DESC_SPAN=Obuhvata {0} kolona
|
|
75
75
|
|
|
@@ -87,7 +87,7 @@ TBL_ROW_SELECTION_COLUMN_LABEL=Zaglavlje reda
|
|
|
87
87
|
|
|
88
88
|
TBL_ROW_ACTION_COLUMN_LABEL=Radnje reda
|
|
89
89
|
|
|
90
|
-
TBL_ROW_ACTION_NO_ACTION=Radnje
|
|
90
|
+
TBL_ROW_ACTION_NO_ACTION=Radnje nisu dostupne
|
|
91
91
|
|
|
92
92
|
TBL_ROW_ACTION_SINGLE_ACTION=1 radnja dostupna
|
|
93
93
|
|
|
@@ -105,9 +105,9 @@ TBL_ROW_STATE_ERROR=Gre\u0161ka
|
|
|
105
105
|
|
|
106
106
|
TBL_ROW_STATE_WARNING=Upozorenje
|
|
107
107
|
|
|
108
|
-
TBL_ROW_STATE_SUCCESS=
|
|
108
|
+
TBL_ROW_STATE_SUCCESS=Uspeh
|
|
109
109
|
|
|
110
|
-
TBL_ROW_STATE_NAVIGATED=
|
|
110
|
+
TBL_ROW_STATE_NAVIGATED=Usmereno
|
|
111
111
|
|
|
112
112
|
TBL_ROW_EXPAND_KEY=Da biste pro\u0161irili red, pritisnite razmak
|
|
113
113
|
|
|
@@ -14,19 +14,19 @@ sap.ui.define([
|
|
|
14
14
|
) {
|
|
15
15
|
"use strict";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
const SelectionMode = library.SelectionMode;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Constructs an instance of sap.ui.table.plugins.BindingSelection
|
|
21
21
|
*
|
|
22
22
|
* @class Implements the selection methods for TreeTable and AnalyticalTable
|
|
23
23
|
* @extends sap.ui.table.plugins.SelectionPlugin
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.124.0
|
|
25
25
|
* @constructor
|
|
26
26
|
* @private
|
|
27
27
|
* @alias sap.ui.table.plugins.BindingSelection
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
const BindingSelection = SelectionPlugin.extend("sap.ui.table.plugins.BindingSelection", {
|
|
30
30
|
metadata: {
|
|
31
31
|
library: "sap.ui.table",
|
|
32
32
|
properties: {
|
|
@@ -67,7 +67,7 @@ sap.ui.define([
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
if (mConfig && mConfig.range) {
|
|
70
|
-
|
|
70
|
+
const iLastSelectedIndex = this.getSelectedIndex();
|
|
71
71
|
|
|
72
72
|
if (iLastSelectedIndex >= 0) {
|
|
73
73
|
this.addSelectionInterval(iLastSelectedIndex, oRow.getIndex());
|
|
@@ -97,7 +97,8 @@ sap.ui.define([
|
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
function toggleSelectAll(oPlugin) {
|
|
100
|
-
|
|
100
|
+
const oTable = oPlugin.getTable();
|
|
101
|
+
let bSelectAll;
|
|
101
102
|
|
|
102
103
|
// in order to fire the rowSelectionChanged event, the SourceRowIndex mus be set to -1
|
|
103
104
|
// to indicate that the selection was changed by user interaction
|
|
@@ -151,7 +152,7 @@ sap.ui.define([
|
|
|
151
152
|
return;
|
|
152
153
|
}
|
|
153
154
|
|
|
154
|
-
|
|
155
|
+
const oBinding = this.getTableBinding();
|
|
155
156
|
|
|
156
157
|
if (oBinding && oBinding.addSelectionInterval) {
|
|
157
158
|
if (this.getSelectionMode() === SelectionMode.Single) {
|
|
@@ -168,7 +169,7 @@ sap.ui.define([
|
|
|
168
169
|
* @inheritDoc
|
|
169
170
|
*/
|
|
170
171
|
BindingSelection.prototype.clearSelection = function() {
|
|
171
|
-
|
|
172
|
+
const oBinding = this.getTableBinding();
|
|
172
173
|
|
|
173
174
|
if (oBinding && oBinding.clearSelection) {
|
|
174
175
|
oBinding.clearSelection();
|
|
@@ -180,7 +181,7 @@ sap.ui.define([
|
|
|
180
181
|
* @inheritDoc
|
|
181
182
|
*/
|
|
182
183
|
BindingSelection.prototype.getSelectedIndex = function() {
|
|
183
|
-
|
|
184
|
+
const oBinding = this.getTableBinding();
|
|
184
185
|
|
|
185
186
|
if (oBinding && oBinding.getSelectedIndex) {
|
|
186
187
|
return oBinding.getSelectedIndex();
|
|
@@ -194,10 +195,10 @@ sap.ui.define([
|
|
|
194
195
|
* @inheritDoc
|
|
195
196
|
*/
|
|
196
197
|
BindingSelection.prototype.getSelectedIndices = function() {
|
|
197
|
-
|
|
198
|
+
const oBinding = this.getTableBinding();
|
|
198
199
|
|
|
199
200
|
if (this.getSelectionMode() === SelectionMode.Single) {
|
|
200
|
-
|
|
201
|
+
const iSelectedIndex = this.getSelectedIndex();
|
|
201
202
|
|
|
202
203
|
if (iSelectedIndex === -1) {
|
|
203
204
|
return [];
|
|
@@ -218,12 +219,12 @@ sap.ui.define([
|
|
|
218
219
|
* @inheritDoc
|
|
219
220
|
*/
|
|
220
221
|
BindingSelection.prototype.getSelectableCount = function() {
|
|
221
|
-
|
|
222
|
+
const oBinding = this.getTableBinding();
|
|
222
223
|
|
|
223
224
|
if (!oBinding) {
|
|
224
225
|
return 0;
|
|
225
226
|
} else if (oBinding.isA("sap.ui.model.analytics.AnalyticalBinding")) {
|
|
226
|
-
|
|
227
|
+
const oRootNode = oBinding.getGrandTotalContextInfo();
|
|
227
228
|
return oRootNode ? oRootNode.totalNumberOfLeafs : 0;
|
|
228
229
|
} else {
|
|
229
230
|
return oBinding.getLength();
|
|
@@ -235,7 +236,7 @@ sap.ui.define([
|
|
|
235
236
|
* @inheritDoc
|
|
236
237
|
*/
|
|
237
238
|
BindingSelection.prototype.getSelectedCount = function() {
|
|
238
|
-
|
|
239
|
+
const oBinding = this.getTableBinding();
|
|
239
240
|
|
|
240
241
|
if (oBinding && oBinding.getSelectedNodesCount) {
|
|
241
242
|
return oBinding.getSelectedNodesCount();
|
|
@@ -249,7 +250,7 @@ sap.ui.define([
|
|
|
249
250
|
* @inheritDoc
|
|
250
251
|
*/
|
|
251
252
|
BindingSelection.prototype.isIndexSelectable = function(iIndex) {
|
|
252
|
-
|
|
253
|
+
const oBinding = this.getTableBinding();
|
|
253
254
|
|
|
254
255
|
if (oBinding && oBinding.isIndexSelectable) {
|
|
255
256
|
return oBinding.isIndexSelectable(iIndex);
|
|
@@ -264,7 +265,7 @@ sap.ui.define([
|
|
|
264
265
|
* @inheritDoc
|
|
265
266
|
*/
|
|
266
267
|
BindingSelection.prototype.isIndexSelected = function(iIndex) {
|
|
267
|
-
|
|
268
|
+
const oBinding = this.getTableBinding();
|
|
268
269
|
|
|
269
270
|
if (this.getSelectionMode() === SelectionMode.Single) {
|
|
270
271
|
if (iIndex < 0) {
|
|
@@ -286,7 +287,7 @@ sap.ui.define([
|
|
|
286
287
|
* @inheritDoc
|
|
287
288
|
*/
|
|
288
289
|
BindingSelection.prototype.removeSelectionInterval = function(iIndexFrom, iIndexTo) {
|
|
289
|
-
|
|
290
|
+
const oBinding = this.getTableBinding();
|
|
290
291
|
|
|
291
292
|
if (oBinding && oBinding.removeSelectionInterval) {
|
|
292
293
|
oBinding.removeSelectionInterval(iIndexFrom, iIndexTo);
|
|
@@ -302,7 +303,7 @@ sap.ui.define([
|
|
|
302
303
|
return;
|
|
303
304
|
}
|
|
304
305
|
|
|
305
|
-
|
|
306
|
+
const oBinding = this.getTableBinding();
|
|
306
307
|
|
|
307
308
|
if (oBinding && oBinding.selectAll) {
|
|
308
309
|
oBinding.selectAll();
|
|
@@ -322,7 +323,7 @@ sap.ui.define([
|
|
|
322
323
|
// Index -1 means to clear the selection. The binding doesn't know that -1 means no selection.
|
|
323
324
|
this.clearSelection();
|
|
324
325
|
} else {
|
|
325
|
-
|
|
326
|
+
const oBinding = this.getTableBinding();
|
|
326
327
|
|
|
327
328
|
if (oBinding && oBinding.setSelectedIndex) {
|
|
328
329
|
oBinding.setSelectedIndex(iIndex);
|
|
@@ -339,7 +340,7 @@ sap.ui.define([
|
|
|
339
340
|
return;
|
|
340
341
|
}
|
|
341
342
|
|
|
342
|
-
|
|
343
|
+
const oBinding = this.getTableBinding();
|
|
343
344
|
|
|
344
345
|
if (oBinding && oBinding.setSelectionInterval) {
|
|
345
346
|
if (this.getSelectionMode() === SelectionMode.Single) {
|
|
@@ -357,7 +358,7 @@ sap.ui.define([
|
|
|
357
358
|
* @public
|
|
358
359
|
*/
|
|
359
360
|
BindingSelection.prototype.setSelectionMode = function(sSelectionMode) {
|
|
360
|
-
|
|
361
|
+
const sOldSelectionMode = this.getSelectionMode();
|
|
361
362
|
|
|
362
363
|
this.setProperty("selectionMode", sSelectionMode);
|
|
363
364
|
|
|
@@ -375,12 +376,12 @@ sap.ui.define([
|
|
|
375
376
|
* @private
|
|
376
377
|
*/
|
|
377
378
|
BindingSelection.prototype._getHighestSelectableIndex = function() {
|
|
378
|
-
|
|
379
|
+
const oBinding = this.getTableBinding();
|
|
379
380
|
|
|
380
381
|
if (!oBinding) {
|
|
381
382
|
return -1;
|
|
382
383
|
} else if (oBinding.isA("sap.ui.model.analytics.AnalyticalBinding")) {
|
|
383
|
-
|
|
384
|
+
const bHasGrandTotal = oBinding.providesGrandTotal() && oBinding.hasTotaledMeasures();
|
|
384
385
|
return oBinding.getLength() - (bHasGrandTotal ? 2 : 1);
|
|
385
386
|
} else {
|
|
386
387
|
return oBinding.getLength() - 1;
|
|
@@ -419,7 +420,7 @@ sap.ui.define([
|
|
|
419
420
|
* @private
|
|
420
421
|
*/
|
|
421
422
|
BindingSelection.prototype._onBindingChange = function(oEvent) {
|
|
422
|
-
|
|
423
|
+
const sReason = typeof (oEvent) === "object" ? oEvent.getParameter("reason") : oEvent;
|
|
423
424
|
|
|
424
425
|
if (sReason === "sort" || sReason === "filter") {
|
|
425
426
|
this.clearSelection();
|
|
@@ -427,8 +428,8 @@ sap.ui.define([
|
|
|
427
428
|
};
|
|
428
429
|
|
|
429
430
|
BindingSelection.prototype._onSelectionChange = function(oEvent) {
|
|
430
|
-
|
|
431
|
-
|
|
431
|
+
const aRowIndices = oEvent.getParameter("rowIndices");
|
|
432
|
+
const bSelectAll = oEvent.getParameter("selectAll");
|
|
432
433
|
|
|
433
434
|
this.fireSelectionChange({
|
|
434
435
|
rowIndices: aRowIndices,
|