@sapui5/sap.zen.crosstab 1.84.33 → 1.84.50
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/{main/uilib/sap → sap}/zen/crosstab/.library +14 -13
- package/src/sap/zen/crosstab/BaseArea.js +933 -0
- package/src/sap/zen/crosstab/CellStyleHandler.js +109 -0
- package/src/sap/zen/crosstab/ColResizer.js +261 -0
- package/src/sap/zen/crosstab/ColumnHeaderArea.js +61 -0
- package/src/sap/zen/crosstab/Crosstab.js +1351 -0
- package/src/sap/zen/crosstab/CrosstabCellApi.js +141 -0
- package/src/sap/zen/crosstab/CrosstabContextMenu.js +96 -0
- package/src/sap/zen/crosstab/CrosstabHeaderInfo.js +699 -0
- package/src/sap/zen/crosstab/CrosstabRenderer.js +258 -0
- package/src/sap/zen/crosstab/CrosstabTestProxy.js +64 -0
- package/src/sap/zen/crosstab/DataArea.js +76 -0
- package/src/sap/zen/crosstab/DataCell.js +187 -0
- package/src/sap/zen/crosstab/DataCellRenderer.js +70 -0
- package/src/sap/zen/crosstab/DimensionHeaderArea.js +34 -0
- package/src/sap/zen/crosstab/EventHandler.js +664 -0
- package/src/sap/zen/crosstab/HeaderCell.js +357 -0
- package/src/sap/zen/crosstab/HeaderCellRenderer.js +333 -0
- package/src/sap/zen/crosstab/HeaderResizer.js +142 -0
- package/src/sap/zen/crosstab/IDataCell.js +34 -0
- package/src/sap/zen/crosstab/IHeaderCell.js +30 -0
- package/src/sap/zen/crosstab/PropertyBag.js +220 -0
- package/src/sap/zen/crosstab/RowHeaderArea.js +78 -0
- package/src/sap/zen/crosstab/SelectionHandler.js +892 -0
- package/src/sap/zen/crosstab/TextConstants.js +22 -0
- package/src/sap/zen/crosstab/TouchHandler.js +413 -0
- package/src/sap/zen/crosstab/datahandler/JsonDataHandler.js +777 -0
- package/src/sap/zen/crosstab/dragdrop/DragDropAreaRenderer.js +446 -0
- package/src/sap/zen/crosstab/dragdrop/DragDropHandler.js +674 -0
- package/src/sap/zen/crosstab/dragdrop/DragDropHoverManager.js +474 -0
- package/src/sap/zen/crosstab/dragdrop/DragDropUtils.js +579 -0
- package/src/sap/zen/crosstab/dragdrop/MemberDragDropHandler.js +1156 -0
- package/src/sap/zen/crosstab/keyboard/CrosstabKeyboardNavHandler.js +585 -0
- package/src/sap/zen/crosstab/library.js +49 -0
- package/src/sap/zen/crosstab/paging/CellMerger.js +266 -0
- package/src/sap/zen/crosstab/paging/Page.js +331 -0
- package/src/sap/zen/crosstab/paging/PageManager.js +396 -0
- package/src/sap/zen/crosstab/paging/PagingConstants.js +19 -0
- package/src/sap/zen/crosstab/paging/RequestHandler.js +103 -0
- package/src/sap/zen/crosstab/paging/RequestStack.js +112 -0
- package/src/sap/zen/crosstab/rendering/CrossRequestManager.js +468 -0
- package/src/sap/zen/crosstab/rendering/DataModel.js +260 -0
- package/src/sap/zen/crosstab/rendering/DomElementProvider.js +24 -0
- package/src/sap/zen/crosstab/rendering/HeaderScrollManager.js +93 -0
- package/src/sap/zen/crosstab/rendering/PixelScrollManager.js +189 -0
- package/src/sap/zen/crosstab/rendering/RenderEngine.js +2694 -0
- package/src/sap/zen/crosstab/rendering/RenderingConstants.js +60 -0
- package/src/sap/zen/crosstab/rendering/ScrollManager.js +614 -0
- package/src/sap/zen/crosstab/rendering/ScrollbarRenderer.js +560 -0
- package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/Chart.less +0 -4
- package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/InfoFeeding.less +120 -120
- package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_hcb/InfoFeeding.less +85 -85
- package/src/sap/zen/crosstab/utils/Measuring.js +236 -0
- package/src/sap/zen/crosstab/utils/Utils.js +485 -0
- package/ui5.yaml +4 -2
- package/src/main/uilib/sap/zen/crosstab/BaseArea.js +0 -1013
- package/src/main/uilib/sap/zen/crosstab/CellStyleHandler.js +0 -111
- package/src/main/uilib/sap/zen/crosstab/ColResizer.js +0 -264
- package/src/main/uilib/sap/zen/crosstab/ColumnHeaderArea.js +0 -52
- package/src/main/uilib/sap/zen/crosstab/Crosstab.js +0 -1662
- package/src/main/uilib/sap/zen/crosstab/CrosstabCellApi.js +0 -142
- package/src/main/uilib/sap/zen/crosstab/CrosstabContextMenu.js +0 -96
- package/src/main/uilib/sap/zen/crosstab/CrosstabHeaderInfo.js +0 -698
- package/src/main/uilib/sap/zen/crosstab/CrosstabRenderer.js +0 -274
- package/src/main/uilib/sap/zen/crosstab/CrosstabTestProxy.js +0 -59
- package/src/main/uilib/sap/zen/crosstab/DataArea.js +0 -74
- package/src/main/uilib/sap/zen/crosstab/DataCell.js +0 -196
- package/src/main/uilib/sap/zen/crosstab/DataCellRenderer.js +0 -71
- package/src/main/uilib/sap/zen/crosstab/DimensionHeaderArea.js +0 -25
- package/src/main/uilib/sap/zen/crosstab/EventHandler.js +0 -651
- package/src/main/uilib/sap/zen/crosstab/HeaderCell.js +0 -329
- package/src/main/uilib/sap/zen/crosstab/HeaderCellRenderer.js +0 -374
- package/src/main/uilib/sap/zen/crosstab/HeaderResizer.js +0 -131
- package/src/main/uilib/sap/zen/crosstab/IDataCell.js +0 -21
- package/src/main/uilib/sap/zen/crosstab/IHeaderCell.js +0 -21
- package/src/main/uilib/sap/zen/crosstab/PropertyBag.js +0 -209
- package/src/main/uilib/sap/zen/crosstab/RowHeaderArea.js +0 -71
- package/src/main/uilib/sap/zen/crosstab/SelectionHandler.js +0 -911
- package/src/main/uilib/sap/zen/crosstab/TextConstants.js +0 -9
- package/src/main/uilib/sap/zen/crosstab/TouchHandler.js +0 -438
- package/src/main/uilib/sap/zen/crosstab/datahandler/JsonDataHandler.js +0 -760
- package/src/main/uilib/sap/zen/crosstab/dragdrop/DragDropAreaRenderer.js +0 -436
- package/src/main/uilib/sap/zen/crosstab/dragdrop/DragDropHandler.js +0 -682
- package/src/main/uilib/sap/zen/crosstab/dragdrop/DragDropHoverManager.js +0 -467
- package/src/main/uilib/sap/zen/crosstab/dragdrop/DragDropUtils.js +0 -580
- package/src/main/uilib/sap/zen/crosstab/dragdrop/MemberDragDropHandler.js +0 -1154
- package/src/main/uilib/sap/zen/crosstab/keyboard/CrosstabKeyboardNavHandler.js +0 -635
- package/src/main/uilib/sap/zen/crosstab/library.js +0 -38
- package/src/main/uilib/sap/zen/crosstab/nonphx/logic.js +0 -11
- package/src/main/uilib/sap/zen/crosstab/paging/CellMerger.js +0 -284
- package/src/main/uilib/sap/zen/crosstab/paging/Page.js +0 -357
- package/src/main/uilib/sap/zen/crosstab/paging/PageManager.js +0 -437
- package/src/main/uilib/sap/zen/crosstab/paging/PagingConstants.js +0 -7
- package/src/main/uilib/sap/zen/crosstab/paging/RequestHandler.js +0 -97
- package/src/main/uilib/sap/zen/crosstab/paging/RequestStack.js +0 -108
- package/src/main/uilib/sap/zen/crosstab/rendering/CrossRequestManager.js +0 -462
- package/src/main/uilib/sap/zen/crosstab/rendering/DataModel.js +0 -250
- package/src/main/uilib/sap/zen/crosstab/rendering/DomElementProvider.js +0 -13
- package/src/main/uilib/sap/zen/crosstab/rendering/HeaderScrollManager.js +0 -97
- package/src/main/uilib/sap/zen/crosstab/rendering/PixelScrollManager.js +0 -180
- package/src/main/uilib/sap/zen/crosstab/rendering/RenderEngine.js +0 -2757
- package/src/main/uilib/sap/zen/crosstab/rendering/RenderingConstants.js +0 -56
- package/src/main/uilib/sap/zen/crosstab/rendering/ScrollManager.js +0 -638
- package/src/main/uilib/sap/zen/crosstab/rendering/ScrollbarRenderer.js +0 -542
- package/src/main/uilib/sap/zen/crosstab/utils/Measuring.js +0 -225
- package/src/main/uilib/sap/zen/crosstab/utils/Utils.js +0 -480
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/ChartTypeSwitch.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/Crosstab.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/FilterBar.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/FilterPanel.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/Footerbar.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/InfoChart.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/NavigationPanel.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/chartconfig.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/CornerTornEffect.png +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/HTornEffect.png +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/HTornEffectData.png +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/HTornEffectHeader.png +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/VTornEffect.png +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/loading.gif +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/loading_comp.gif +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/zen.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_belize/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_belize_hcb/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_belize_hcw/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_belize_plus/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_bluecrystal/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_fiori_3/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_fiori_3_dark/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_fiori_3_hcb/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_fiori_3_hcw/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_hcb/Chart.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_hcb/ChartTypeSwitch.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_hcb/library.source.less +0 -0
|
@@ -0,0 +1,933 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SAPUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE. All rights reserved.
|
|
4
|
+
*/
|
|
5
|
+
/*global sap*/
|
|
6
|
+
sap.ui.define(
|
|
7
|
+
[
|
|
8
|
+
"jquery.sap.global",
|
|
9
|
+
"sap/zen/crosstab/rendering/DataModel",
|
|
10
|
+
"sap/zen/crosstab/rendering/RenderingConstants",
|
|
11
|
+
"sap/zen/crosstab/utils/Utils"
|
|
12
|
+
],function(jQuery, DataModel, RenderingConstants, Utils){
|
|
13
|
+
"use strict";
|
|
14
|
+
jQuery.sap.declare("sap.zen.crosstab.BaseArea");
|
|
15
|
+
sap.zen.crosstab.BaseArea = function (oCrosstab) {
|
|
16
|
+
"use strict";
|
|
17
|
+
this.sAreaType = "";
|
|
18
|
+
this.sId = "";
|
|
19
|
+
this.oCrosstab = oCrosstab;
|
|
20
|
+
this.iRenderStartRow = 0;
|
|
21
|
+
this.iRenderRowCnt = 0;
|
|
22
|
+
this.iRenderStartCol = 0;
|
|
23
|
+
this.iRenderColCnt = 0;
|
|
24
|
+
this.bHasContent = false;
|
|
25
|
+
this.fRenderCellCallback = null;
|
|
26
|
+
this.oDataModel = new DataModel(this);
|
|
27
|
+
this.aColGranularity = [];
|
|
28
|
+
this.aColWidths = [];
|
|
29
|
+
this.aCalculatedColWidths = [];
|
|
30
|
+
this.aTemporaryColWidths = [];
|
|
31
|
+
this.aRowGranularity = [];
|
|
32
|
+
this.aRowHeights = [];
|
|
33
|
+
this.aCalculatedRowHeights = [];
|
|
34
|
+
this.aTemporaryRowHeights = [];
|
|
35
|
+
this.oColsWithSymbolException = {};
|
|
36
|
+
this.oColUserWidth = {};
|
|
37
|
+
this.aLevelCells = [];
|
|
38
|
+
this.iLoadingPageCnt = 0;
|
|
39
|
+
this.bColGranularityCalculatedAndMeasured = false;
|
|
40
|
+
this.oUserResizedCols = {};
|
|
41
|
+
this.oCellsWithLineBreakTexts = null;
|
|
42
|
+
this.iMaxNumberOfLineBreaks = 0;
|
|
43
|
+
// data save for header width handling
|
|
44
|
+
this.iSaveRenderStartRow = 0;
|
|
45
|
+
this.iSaveRenderRowCnt = 0;
|
|
46
|
+
this.iSaveRenderStartCol = 0;
|
|
47
|
+
this.iSaveRenderColCnt = 0;
|
|
48
|
+
this.aSaveColGranularity = [];
|
|
49
|
+
this.aSaveColWidths = [];
|
|
50
|
+
this.aSaveCalculatedColWidths = [];
|
|
51
|
+
this.aSaveTemporaryColWidths = [];
|
|
52
|
+
this.aSaveRowGranularity = [];
|
|
53
|
+
this.aSaveRowHeights = [];
|
|
54
|
+
this.aSaveCalculatedRowHeights = [];
|
|
55
|
+
this.aSaveTemporaryRowHeights = [];
|
|
56
|
+
this.oSaveColsWithSymbolException = {};
|
|
57
|
+
this.oSaveColUserWidth = {};
|
|
58
|
+
this.aSaveLevelCells = [];
|
|
59
|
+
this.iSaveLoadingPageCnt = 0;
|
|
60
|
+
this.bSaveColGranularityCalculatedAndMeasured = false;
|
|
61
|
+
this.oSaveUserResizedCols = {};
|
|
62
|
+
this.oSaveCellsWithLineBreakTexts = null;
|
|
63
|
+
this.iSaveMaxNumberOfLineBreaks = 0;
|
|
64
|
+
};
|
|
65
|
+
sap.zen.crosstab.BaseArea.prototype.saveData = function() {
|
|
66
|
+
this.iSaveRenderStartRow = this.iRenderStartRow;
|
|
67
|
+
this.iSaveRenderRowCnt = this.iRenderRowCnt;
|
|
68
|
+
this.iSaveRenderStartCol = this.iRenderStartCol;
|
|
69
|
+
this.iSaveRenderColCnt = this.iRenderColCnt;
|
|
70
|
+
this.aSaveColGranularity = this.aColGranularity.slice();
|
|
71
|
+
this.aSaveColWidths = this.aColWidths.slice();
|
|
72
|
+
this.aSaveCalculatedColWidths = this.aCalculatedColWidths.slice();
|
|
73
|
+
this.aSaveTemporaryColWidths = this.aTemporaryColWidths.slice();
|
|
74
|
+
this.aSaveRowGranularity = this.aRowGranularity.slice();
|
|
75
|
+
this.aSaveRowHeights = this.aRowHeights.slice();
|
|
76
|
+
this.aSaveCalculatedRowHeights = this.aCalculatedRowHeights.slice();
|
|
77
|
+
this.aSaveTemporaryRowHeights = this.aTemporaryRowHeights.slice();
|
|
78
|
+
this.oSaveColsWithSymbolException = jQuery.extend({}, this.oColsWithSymbolException);
|
|
79
|
+
this.oSaveColUserWidth = jQuery.extend({}, this.oColUserWidth);
|
|
80
|
+
this.aSaveLevelCells = this.aLevelCells.slice();
|
|
81
|
+
this.iSaveLoadingPageCnt = this.iLoadingPageCnt;
|
|
82
|
+
this.bSaveColGranularityCalculatedAndMeasured = this.bColGranularityCalculatedAndMeasured;
|
|
83
|
+
this.oSaveUserResizedCols = jQuery.extend({}, this.oUserResizedCols);
|
|
84
|
+
this.oSaveCellsWithLineBreakTexts = jQuery.extend({}, this.oCellsWithLineBreakTexts);
|
|
85
|
+
this.iSaveMaxNumberOfLineBreaks = this.iMaxNumberOfLineBreaks;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
sap.zen.crosstab.BaseArea.prototype.restoreData = function() {
|
|
89
|
+
this.iRenderStartRow = this.iSaveRenderStartRow;
|
|
90
|
+
this.iRenderRowCnt = this.iSaveRenderRowCnt;
|
|
91
|
+
this.iRenderStartCol = this.iSaveRenderStartCol;
|
|
92
|
+
this.iRenderColCnt = this.iSaveRenderColCnt;
|
|
93
|
+
this.aColGranularity = this.aSaveColGranularity;
|
|
94
|
+
this.aColWidths = this.aSaveColWidths;
|
|
95
|
+
this.aCalculatedColWidths = this.aSaveCalculatedColWidths;
|
|
96
|
+
this.aTemporaryColWidths = this.aSaveTemporaryColWidths;
|
|
97
|
+
this.aRowGranularity = this.aSaveRowGranularity;
|
|
98
|
+
this.aRowHeights = this.aSaveRowHeights;
|
|
99
|
+
this.aCalculatedRowHeights = this.aSaveCalculatedRowHeights;
|
|
100
|
+
this.aTemporaryRowHeights = this.aSaveTemporaryRowHeights;
|
|
101
|
+
this.oColsWithSymbolException = this.oSaveColsWithSymbolException;
|
|
102
|
+
this.oColUserWidth = this.oSaveColUserWidth;
|
|
103
|
+
this.aLevelCells = this.aSaveLevelCells;
|
|
104
|
+
this.iLoadingPageCnt = this.iSaveLoadingPageCnt;
|
|
105
|
+
this.bColGranularityCalculatedAndMeasured = this.bSaveColGranularityCalculatedAndMeasured;
|
|
106
|
+
this.oUserResizedCols = this.oSaveUserResizedCols;
|
|
107
|
+
this.oCellsWithLineBreakTexts = this.oSaveCellsWithLineBreakTexts;
|
|
108
|
+
this.iMaxNumberOfLineBreaks = this.iSaveMaxNumberOfLineBreaks;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
sap.zen.crosstab.BaseArea.prototype.insertCell = function (oCell, iRow, iCol) {
|
|
112
|
+
if (oCell) {
|
|
113
|
+
var iNumberOfLineBreaks = oCell.getNumberOfLineBreaks();
|
|
114
|
+
if (iNumberOfLineBreaks > this.iMaxNumberOfLineBreaks) {
|
|
115
|
+
this.iMaxNumberOfLineBreaks = iNumberOfLineBreaks;
|
|
116
|
+
}
|
|
117
|
+
if (iNumberOfLineBreaks > 0) {
|
|
118
|
+
if (!this.oCellsWithLineBreakTexts) {
|
|
119
|
+
this.oCellsWithLineBreakTexts = {};
|
|
120
|
+
}
|
|
121
|
+
this.oCellsWithLineBreakTexts[oCell.getId()] = oCell;
|
|
122
|
+
}
|
|
123
|
+
this.bHasContent = true;
|
|
124
|
+
var oModelCoordinates = this.oCrosstab.getUtils().getModelCoordinates(iRow, iCol, this.sAreaType);
|
|
125
|
+
|
|
126
|
+
if (oModelCoordinates.iCol === 0) {
|
|
127
|
+
oCell.addStyle(RenderingConstants.STYLE_FIRST_IN_ROW);
|
|
128
|
+
}
|
|
129
|
+
if (oModelCoordinates.iRow === 0) {
|
|
130
|
+
oCell.addStyle(RenderingConstants.STYLE_FIRST_IN_COL);
|
|
131
|
+
}
|
|
132
|
+
if ((oModelCoordinates.iCol + oCell.getColSpan()) === this.oCrosstab.getTotalCols()) {
|
|
133
|
+
oCell.addStyle(RenderingConstants.STYLE_LAST_IN_ROW);
|
|
134
|
+
}
|
|
135
|
+
if ((oModelCoordinates.iRow + oCell.getRowSpan()) === this.oCrosstab.getTotalRows()) {
|
|
136
|
+
oCell.addStyle(RenderingConstants.STYLE_LAST_IN_COL);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
this.oDataModel.insertCell(oCell, iRow, iCol);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
sap.zen.crosstab.BaseArea.prototype.addHighlightingForCell = function (iRow, iCol) {
|
|
143
|
+
var oCell = this.oDataModel.getCellWithSpan(iRow, iCol);
|
|
144
|
+
if (oCell) {
|
|
145
|
+
// In future render cycles, the cell needs to keep the highlighted state
|
|
146
|
+
oCell.addStyle(RenderingConstants.STYLE_HIGHLIGHTED);
|
|
147
|
+
|
|
148
|
+
// To get the cell to highlight immediately the style is set in the DOM. This is cheaper than rerendering.
|
|
149
|
+
var oDomCell = jQuery(document.getElementById(oCell.getId()));
|
|
150
|
+
if (this.isDataArea()) {
|
|
151
|
+
oDomCell.addClass("sapzencrosstab-DataCellHighlighted");
|
|
152
|
+
} else {
|
|
153
|
+
oDomCell.addClass("sapzencrosstab-HeaderCellHighlighted");
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
sap.zen.crosstab.BaseArea.prototype.removeHighlightingForCell = function (iRow, iCol) {
|
|
159
|
+
var oCell = this.oDataModel.getCellWithSpan(iRow, iCol);
|
|
160
|
+
if (oCell) {
|
|
161
|
+
oCell.removeStyle(RenderingConstants.STYLE_HIGHLIGHTED);
|
|
162
|
+
var oDomCell = jQuery(document.getElementById(oCell.getId()));
|
|
163
|
+
if (this.isDataArea()) {
|
|
164
|
+
oDomCell.removeClass("sapzencrosstab-DataCellHighlighted");
|
|
165
|
+
} else {
|
|
166
|
+
oDomCell.removeClass("sapzencrosstab-HeaderCellHighlighted");
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
sap.zen.crosstab.BaseArea.prototype.resetColGranularity = function () {
|
|
172
|
+
this.aColGranularity = [];
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
sap.zen.crosstab.BaseArea.prototype.resetRowGranularity = function () {
|
|
176
|
+
this.aRowGranularity = [];
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
sap.zen.crosstab.BaseArea.prototype.calculateColGranularity = function () {
|
|
180
|
+
if (this.bColGranularityCalculatedAndMeasured === false) {
|
|
181
|
+
var iRow = 0;
|
|
182
|
+
var iEndRow = this.iRenderStartRow + this.iRenderRowCnt;
|
|
183
|
+
var iCol = 0;
|
|
184
|
+
var iEndCol = this.iRenderStartCol + this.iRenderColCnt;
|
|
185
|
+
|
|
186
|
+
this.aColGranularity = [];
|
|
187
|
+
for (iCol = this.iRenderStartCol; iCol < iEndCol; iCol++) {
|
|
188
|
+
for (iRow = this.iRenderStartRow; iRow < iEndRow; iRow++) {
|
|
189
|
+
if (this.collectColGranularity(iRow, iCol, this)) {
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
sap.zen.crosstab.BaseArea.prototype.calculateRowGranularity = function () {
|
|
198
|
+
var iRow = 0;
|
|
199
|
+
var iEndRow = this.iRenderStartRow + this.iRenderRowCnt;
|
|
200
|
+
var iCol = 0;
|
|
201
|
+
var iEndCol = this.iRenderStartCol + this.iRenderColCnt;
|
|
202
|
+
|
|
203
|
+
this.aRowGranularity = [];
|
|
204
|
+
for (iRow = this.iRenderStartRow; iRow < iEndRow; iRow++) {
|
|
205
|
+
for (iCol = this.iRenderStartCol; iCol < iEndCol; iCol++) {
|
|
206
|
+
if (this.collectRowGranularity(iRow, iCol, this)) {
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
sap.zen.crosstab.BaseArea.prototype.getCellForGranularity = function (iRow, iCol, that) {
|
|
214
|
+
var oCell = null;
|
|
215
|
+
|
|
216
|
+
if (iCol === that.iRenderStartCol && iRow === that.iRenderStartRow) {
|
|
217
|
+
oCell = that.oDataModel.getCellWithSpan(iRow, iCol);
|
|
218
|
+
} else if (iCol === that.iRenderStartCol) {
|
|
219
|
+
oCell = that.oDataModel.getCellWithColSpan(iRow, iCol);
|
|
220
|
+
} else if (iRow === that.iRenderStartRow) {
|
|
221
|
+
oCell = that.oDataModel.getCellWithRowSpan(iRow, iCol);
|
|
222
|
+
} else {
|
|
223
|
+
oCell = that.oDataModel.getCellDirect(iRow, iCol);
|
|
224
|
+
}
|
|
225
|
+
return oCell;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
sap.zen.crosstab.BaseArea.prototype.collectColGranularity = function (iRow, iCol, that) {
|
|
229
|
+
var oCell = that.getCellForGranularity(iRow, iCol, that);
|
|
230
|
+
var iColSpan = -1;
|
|
231
|
+
if (oCell) {
|
|
232
|
+
iColSpan = oCell.getEffectiveColSpan();
|
|
233
|
+
|
|
234
|
+
var oCellInfo = that.aColGranularity[iCol];
|
|
235
|
+
if (oCellInfo) {
|
|
236
|
+
if (iColSpan < oCellInfo.iColSpan) {
|
|
237
|
+
oCellInfo.sId = oCell.getId();
|
|
238
|
+
oCellInfo.iRow = iRow;
|
|
239
|
+
oCellInfo.iCol = iCol;
|
|
240
|
+
oCellInfo.iColSpan = iColSpan;
|
|
241
|
+
oCellInfo.iWidth = 0;
|
|
242
|
+
}
|
|
243
|
+
} else {
|
|
244
|
+
oCellInfo = {};
|
|
245
|
+
oCellInfo.sId = oCell.getId();
|
|
246
|
+
oCellInfo.iRow = iRow;
|
|
247
|
+
oCellInfo.iCol = iCol;
|
|
248
|
+
oCellInfo.iColSpan = iColSpan;
|
|
249
|
+
oCellInfo.iWidth = 0;
|
|
250
|
+
that.aColGranularity[iCol] = oCellInfo;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
return iColSpan === 1;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
sap.zen.crosstab.BaseArea.prototype.collectRowGranularity = function (iRow, iCol, that) {
|
|
258
|
+
var oCell = that.getCellForGranularity(iRow, iCol, that);
|
|
259
|
+
var iRowSpan = -1;
|
|
260
|
+
var iNumberOfLineBreaks = 0;
|
|
261
|
+
if (oCell) {
|
|
262
|
+
iRowSpan = oCell.getEffectiveRowSpan();
|
|
263
|
+
iNumberOfLineBreaks = Utils.getNumberOfLineBreaks(oCell.getText());
|
|
264
|
+
|
|
265
|
+
var oCellInfo = that.aRowGranularity[iRow];
|
|
266
|
+
if (oCellInfo) {
|
|
267
|
+
if (iRowSpan < oCellInfo.iRowSpan || iNumberOfLineBreaks > oCellInfo.iNumberOfLineBreaks) {
|
|
268
|
+
oCellInfo.sId = oCell.getId();
|
|
269
|
+
oCellInfo.iRow = iRow;
|
|
270
|
+
oCellInfo.iCol = iCol;
|
|
271
|
+
oCellInfo.iRowSpan = iRowSpan;
|
|
272
|
+
oCellInfo.iHeight = 0;
|
|
273
|
+
oCellInfo.isLevelCell = this.isColHeaderArea() && oCell.getLevel && oCell.getLevel() > -1;
|
|
274
|
+
oCellInfo.isEntryEnabled = false; // oCell.isEntryEnabled();
|
|
275
|
+
oCellInfo.iNumberOfLineBreaks = iNumberOfLineBreaks;
|
|
276
|
+
}
|
|
277
|
+
} else {
|
|
278
|
+
oCellInfo = {};
|
|
279
|
+
oCellInfo.sId = oCell.getId();
|
|
280
|
+
oCellInfo.iRow = iRow;
|
|
281
|
+
oCellInfo.iCol = iCol;
|
|
282
|
+
oCellInfo.iRowSpan = iRowSpan;
|
|
283
|
+
oCellInfo.iHeight = 0;
|
|
284
|
+
oCellInfo.isLevelCell = this.isColHeaderArea() && oCell.getLevel && oCell.getLevel() > -1;
|
|
285
|
+
oCellInfo.isEntryEnabled = false; // oCell.isEntryEnabled();
|
|
286
|
+
oCellInfo.iNumberOfLineBreaks = iNumberOfLineBreaks;
|
|
287
|
+
that.aRowGranularity[iRow] = oCellInfo;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
return (iRowSpan === 1) && (iNumberOfLineBreaks === this.iMaxNumberOfLineBreaks);
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
sap.zen.crosstab.BaseArea.prototype.measureColGranularityCells = function () {
|
|
295
|
+
var iCol = 0;
|
|
296
|
+
var oCellInfo = null;
|
|
297
|
+
var oDomCell = null;
|
|
298
|
+
var iCellWidth = 0;
|
|
299
|
+
var iWidth = 0;
|
|
300
|
+
var iModulo = 0;
|
|
301
|
+
var i = 0;
|
|
302
|
+
var bIsMsIE;
|
|
303
|
+
|
|
304
|
+
if (this.bColGranularityCalculatedAndMeasured === false) {
|
|
305
|
+
this.aColWidths = [];
|
|
306
|
+
|
|
307
|
+
bIsMsIE = this.oCrosstab.getUtils().isMsIE();
|
|
308
|
+
for (iCol = this.iRenderStartCol; iCol < this.aColGranularity.length; iCol++) {
|
|
309
|
+
oCellInfo = this.aColGranularity[iCol];
|
|
310
|
+
if (oCellInfo) {
|
|
311
|
+
oDomCell = jQuery.sap.byId(oCellInfo.sId);
|
|
312
|
+
if (oDomCell) {
|
|
313
|
+
iCellWidth = oDomCell.outerWidth();
|
|
314
|
+
if(bIsMsIE && !oDomCell.data("IeFixApplied")){
|
|
315
|
+
iCellWidth = iCellWidth + 1;
|
|
316
|
+
oDomCell.data("IeFixApplied", true);
|
|
317
|
+
}
|
|
318
|
+
iWidth = Math.floor(iCellWidth / oCellInfo.iColSpan);
|
|
319
|
+
iModulo = iCellWidth % oCellInfo.iColSpan;
|
|
320
|
+
|
|
321
|
+
for (i = 0; i < oCellInfo.iColSpan; i++) {
|
|
322
|
+
if (this.aCalculatedColWidths[iCol + i] && !this.aTemporaryColWidths[iCol + i]) {
|
|
323
|
+
this.aColWidths[iCol + i] = this.aCalculatedColWidths[iCol + i];
|
|
324
|
+
} else {
|
|
325
|
+
if (i === oCellInfo.iColSpan - 1) {
|
|
326
|
+
iWidth += iModulo;
|
|
327
|
+
}
|
|
328
|
+
if (this.aColWidths[iCol + i]) {
|
|
329
|
+
if (this.aColWidths[iCol + i] < iWidth) {
|
|
330
|
+
this.aColWidths[iCol + i] = iWidth;
|
|
331
|
+
}
|
|
332
|
+
} else {
|
|
333
|
+
this.aColWidths[iCol + i] = iWidth;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// When there are Exceptions with symbols present, the cell width needs to be increased because the symbol is a
|
|
342
|
+
// background image and not measured
|
|
343
|
+
if (Utils.hasEntries(this.oColsWithSymbolException)) {
|
|
344
|
+
var correctedWidth = null;
|
|
345
|
+
var width;
|
|
346
|
+
for ( var colIndex in this.oColsWithSymbolException) {
|
|
347
|
+
if (
|
|
348
|
+
Object.prototype.hasOwnProperty.call(
|
|
349
|
+
this.oColsWithSymbolException, colIndex)
|
|
350
|
+
) {
|
|
351
|
+
correctedWidth = this.oColsWithSymbolException[colIndex];
|
|
352
|
+
if (correctedWidth === undefined || correctedWidth === null || isNaN(correctedWidth) === true) {
|
|
353
|
+
width = this.aColWidths[colIndex];
|
|
354
|
+
correctedWidth = width + this.oCrosstab.getExceptionSymbolWidth();
|
|
355
|
+
this.oColsWithSymbolException[colIndex] = correctedWidth;
|
|
356
|
+
}
|
|
357
|
+
this.aColWidths[colIndex] = this.oColsWithSymbolException[colIndex];
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// user defined column widths take precedence
|
|
363
|
+
if (this.oColUserWidth && Utils.hasEntries(this.oColUserWidth)) {
|
|
364
|
+
var iUserColWidth;
|
|
365
|
+
for (i = 0; i < this.aColWidths.length; i++) {
|
|
366
|
+
iUserColWidth = this.determineUserColWidth(i);
|
|
367
|
+
if (iUserColWidth > -1) {
|
|
368
|
+
this.aColWidths[i] = iUserColWidth;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
return this.aColWidths;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
sap.zen.crosstab.BaseArea.prototype.measureRowGranularityCells = function () {
|
|
377
|
+
var iRow = 0;
|
|
378
|
+
var oCellInfo = null;
|
|
379
|
+
var oDomCell = null;
|
|
380
|
+
var iCellHeight = 0;
|
|
381
|
+
var iHeight = 0;
|
|
382
|
+
var iModulo = 0;
|
|
383
|
+
var i = 0;
|
|
384
|
+
|
|
385
|
+
this.aLevelCells = [];
|
|
386
|
+
this.aRowHeights = [];
|
|
387
|
+
|
|
388
|
+
for (iRow = this.iRenderStartRow; iRow < this.aRowGranularity.length; iRow++) {
|
|
389
|
+
oCellInfo = this.aRowGranularity[iRow];
|
|
390
|
+
if (oCellInfo) {
|
|
391
|
+
oDomCell = jQuery.sap.byId(oCellInfo.sId);
|
|
392
|
+
if (oDomCell) {
|
|
393
|
+
iCellHeight = oDomCell.outerHeight();
|
|
394
|
+
iHeight = Math.floor(iCellHeight / oCellInfo.iRowSpan);
|
|
395
|
+
iModulo = iCellHeight % oCellInfo.iRowSpan;
|
|
396
|
+
|
|
397
|
+
if (oCellInfo.isLevelCell) {
|
|
398
|
+
for (i = 0; i < oCellInfo.iRowSpan; i++) {
|
|
399
|
+
if (i === oCellInfo.iRowSpan - 1) {
|
|
400
|
+
iHeight += iModulo;
|
|
401
|
+
}
|
|
402
|
+
if (this.aRowHeights[iRow + i]) {
|
|
403
|
+
if (this.aRowHeights[iRow + i] < iHeight) {
|
|
404
|
+
this.aRowHeights[iRow + i] = iHeight;
|
|
405
|
+
}
|
|
406
|
+
} else {
|
|
407
|
+
this.aRowHeights[iRow + i] = iHeight;
|
|
408
|
+
}
|
|
409
|
+
if (this.aCalculatedRowHeights[iRow + i] && !this.aTemporaryRowHeights[iRow + i]) {
|
|
410
|
+
if (this.aRowHeights[iRow + i] < this.aCalculatedRowHeights[iRow + i]) {
|
|
411
|
+
this.aRowHeights[iRow + i] = this.aCalculatedRowHeights[iRow + i];
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
this.aLevelCells[iRow + i] = true;
|
|
415
|
+
}
|
|
416
|
+
} else {
|
|
417
|
+
for (i = 0; i < oCellInfo.iRowSpan; i++) {
|
|
418
|
+
if (this.aCalculatedRowHeights[iRow + i] && !this.aTemporaryRowHeights[iRow + i] && this.iMaxNumberOfLineBreaks === 0) {
|
|
419
|
+
this.aRowHeights[iRow + i] = this.aCalculatedRowHeights[iRow + i];
|
|
420
|
+
} else {
|
|
421
|
+
if (i === oCellInfo.iRowSpan - 1) {
|
|
422
|
+
iHeight += iModulo;
|
|
423
|
+
}
|
|
424
|
+
if (this.aRowHeights[iRow + i]) {
|
|
425
|
+
if (this.aRowHeights[iRow + i] < iHeight) {
|
|
426
|
+
this.aRowHeights[iRow + i] = iHeight;
|
|
427
|
+
}
|
|
428
|
+
} else {
|
|
429
|
+
this.aRowHeights[iRow + i] = iHeight;
|
|
430
|
+
}
|
|
431
|
+
if (this.aCalculatedRowHeights[iRow + i] && !this.aTemporaryRowHeights[iRow + i]) {
|
|
432
|
+
this.aRowHeights[iRow + i] = Math.max(this.aRowHeights[iRow + i], this.aCalculatedRowHeights[iRow + i]);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
this.aLevelCells[iRow + i] = false;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return this.aRowHeights;
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
sap.zen.crosstab.BaseArea.prototype.getLevelCells = function () {
|
|
445
|
+
return this.aLevelCells;
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
sap.zen.crosstab.BaseArea.prototype.hasLoadingPages = function () {
|
|
449
|
+
return this.iLoadingPageCnt > 0;
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
sap.zen.crosstab.BaseArea.prototype.getCalculatedColWidths = function () {
|
|
453
|
+
return this.aCalculatedColWidths;
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
sap.zen.crosstab.BaseArea.prototype.getCalculatedRowHeights = function () {
|
|
457
|
+
return this.aCalculatedRowHeights;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
sap.zen.crosstab.BaseArea.prototype.addPageToTempArray = function (aArray, iIndex, sPageKey) {
|
|
461
|
+
if (!aArray[iIndex]) {
|
|
462
|
+
aArray[iIndex] = [];
|
|
463
|
+
}
|
|
464
|
+
aArray[iIndex].push(sPageKey);
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
sap.zen.crosstab.BaseArea.prototype.removePageFromTempArray = function (aArray, iIndex, sPageKey) {
|
|
468
|
+
var aPageArray = aArray[iIndex];
|
|
469
|
+
if (aPageArray) {
|
|
470
|
+
for (var i = 0; i < aPageArray.length; i++) {
|
|
471
|
+
if (aPageArray[i] === sPageKey) {
|
|
472
|
+
aPageArray.splice(i, 1);
|
|
473
|
+
break;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
if (aPageArray.length === 0) {
|
|
477
|
+
aArray[iIndex] = null;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
sap.zen.crosstab.BaseArea.prototype.changeColWidthTemporaryFlag = function (iCol, sPageKey, bIsTemporary) {
|
|
483
|
+
// if there is already a measurement we don't need to flag as temporary because it must be valid
|
|
484
|
+
if (!this.aCalculatedColWidths[iCol] && bIsTemporary) {
|
|
485
|
+
this.addPageToTempArray(this.aTemporaryColWidths, iCol, sPageKey);
|
|
486
|
+
} else if (!bIsTemporary && this.aTemporaryColWidths[iCol]) {
|
|
487
|
+
this.removePageFromTempArray(this.aTemporaryColWidths, iCol, sPageKey);
|
|
488
|
+
if (!this.aTemporaryColWidths[iCol]) {
|
|
489
|
+
this.aCalculatedColWidths[iCol] = null;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
sap.zen.crosstab.BaseArea.prototype.changeRowHeightTemporaryFlag = function (iRow, sPageKey, bIsTemporary) {
|
|
495
|
+
if (!this.aCalculatedRowHeights[iRow] && bIsTemporary) {
|
|
496
|
+
this.addPageToTempArray(this.aTemporaryRowHeights, iRow, sPageKey);
|
|
497
|
+
} else if (!bIsTemporary && this.aTemporaryRowHeights[iRow]) {
|
|
498
|
+
this.removePageFromTempArray(this.aTemporaryRowHeights, iRow, sPageKey);
|
|
499
|
+
if (!this.aTemporaryRowHeights[iRow]) {
|
|
500
|
+
this.aCalculatedRowHeights[iRow] = null;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
sap.zen.crosstab.BaseArea.prototype.applyColWidthsToGranularityCells = function (aColWidths, bForceColWidth) {
|
|
506
|
+
var iCol = 0;
|
|
507
|
+
var oCellInfo = null;
|
|
508
|
+
var i = 0;
|
|
509
|
+
var iWidth = 0;
|
|
510
|
+
var iCalculatedWidth = 0;
|
|
511
|
+
|
|
512
|
+
for (iCol = this.iRenderStartCol; iCol < this.aColGranularity.length; iCol++) {
|
|
513
|
+
oCellInfo = this.aColGranularity[iCol];
|
|
514
|
+
if (oCellInfo) {
|
|
515
|
+
iWidth = 0;
|
|
516
|
+
for (i = 0; i < oCellInfo.iColSpan; i++) {
|
|
517
|
+
iCalculatedWidth = aColWidths[iCol + i];
|
|
518
|
+
iWidth += iCalculatedWidth;
|
|
519
|
+
if (!this.aCalculatedColWidths[iCol + i] || bForceColWidth === true) {
|
|
520
|
+
this.aCalculatedColWidths[iCol + i] = iCalculatedWidth;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
oCellInfo.iWidth = iWidth;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
sap.zen.crosstab.BaseArea.prototype.applyRowHeightsToGranularityCells = function (aRowHeights, aLevelCells) {
|
|
529
|
+
var iRow = 0;
|
|
530
|
+
var oCellInfo = null;
|
|
531
|
+
var i = 0;
|
|
532
|
+
var iHeight = 0;
|
|
533
|
+
var iCalculatedHeight = 0;
|
|
534
|
+
var bIsNewHeightGreater = false;
|
|
535
|
+
var bTriggerReRendering = false;
|
|
536
|
+
|
|
537
|
+
for (iRow = this.iRenderStartRow; iRow < this.aRowGranularity.length; iRow++) {
|
|
538
|
+
oCellInfo = this.aRowGranularity[iRow];
|
|
539
|
+
if (oCellInfo) {
|
|
540
|
+
iHeight = 0;
|
|
541
|
+
for (i = 0; i < oCellInfo.iRowSpan; i++) {
|
|
542
|
+
iCalculatedHeight = aRowHeights[iRow + i];
|
|
543
|
+
iHeight += iCalculatedHeight;
|
|
544
|
+
bIsNewHeightGreater = (this.aCalculatedRowHeights[iRow + i] && iCalculatedHeight > this.aCalculatedRowHeights[iRow + i]);
|
|
545
|
+
if (!this.aCalculatedRowHeights[iRow + i] || (aLevelCells && aLevelCells[iRow + i]) || bIsNewHeightGreater === true) {
|
|
546
|
+
if (bIsNewHeightGreater === true) {
|
|
547
|
+
bTriggerReRendering = true;
|
|
548
|
+
}
|
|
549
|
+
this.aCalculatedRowHeights[iRow + i] = iCalculatedHeight;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
oCellInfo.iHeight = iHeight;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
return bTriggerReRendering;
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
sap.zen.crosstab.BaseArea.prototype.getColGranularity = function () {
|
|
559
|
+
return this.aColGranularity;
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
sap.zen.crosstab.BaseArea.prototype.getRowGranularity = function () {
|
|
563
|
+
return this.aRowGranularity;
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
sap.zen.crosstab.BaseArea.prototype.getCellDirect = function (iRow, iCol) {
|
|
567
|
+
return this.oDataModel.getCellDirect(iRow, iCol);
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
sap.zen.crosstab.BaseArea.prototype.getCell = function (iRow, iCol) {
|
|
571
|
+
return this.oDataModel.getCell(iRow, iCol);
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
sap.zen.crosstab.BaseArea.prototype.renderBaseArea = function (oRenderManager) {
|
|
575
|
+
this.oCrosstab.getRenderEngine().renderArea(this, oRenderManager);
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
sap.zen.crosstab.BaseArea.prototype.setRowCnt = function (iRowCnt) {
|
|
579
|
+
this.oDataModel.setRowCnt(iRowCnt);
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
sap.zen.crosstab.BaseArea.prototype.getRowCnt = function () {
|
|
583
|
+
return this.oDataModel.getRowCnt();
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
sap.zen.crosstab.BaseArea.prototype.setColCnt = function (iColCnt) {
|
|
587
|
+
this.oDataModel.setColCnt(iColCnt);
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
sap.zen.crosstab.BaseArea.prototype.getColCnt = function () {
|
|
591
|
+
return this.oDataModel.getColCnt();
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
sap.zen.crosstab.BaseArea.prototype.clear = function (bKeepUserColWidths, bKeepCalculatedColWidths) {
|
|
595
|
+
this.oDataModel.clear();
|
|
596
|
+
this.iRenderStartRow = 0;
|
|
597
|
+
this.iRenderRowCnt = 0;
|
|
598
|
+
this.iRenderStartCol = 0;
|
|
599
|
+
this.iRenderColCnt = 0;
|
|
600
|
+
this.bHasContent = false;
|
|
601
|
+
this.fRenderCellCallback = null;
|
|
602
|
+
this.aColGranularity = [];
|
|
603
|
+
this.aColWidths = [];
|
|
604
|
+
|
|
605
|
+
this.aTemporaryColWidths = [];
|
|
606
|
+
|
|
607
|
+
this.aRowGranularity = [];
|
|
608
|
+
this.aRowHeights = [];
|
|
609
|
+
|
|
610
|
+
this.aCalculatedRowHeights = [];
|
|
611
|
+
this.aTemporaryRowHeights = [];
|
|
612
|
+
|
|
613
|
+
this.iLoadingPageCnt = 0;
|
|
614
|
+
|
|
615
|
+
this.aLevelCells = [];
|
|
616
|
+
|
|
617
|
+
this.oColUserWidth = {};
|
|
618
|
+
|
|
619
|
+
this.oColsWithSymbolException = {};
|
|
620
|
+
|
|
621
|
+
if (!bKeepUserColWidths) {
|
|
622
|
+
this.oUserResizedCols = {};
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
if (!bKeepCalculatedColWidths) {
|
|
626
|
+
this.aCalculatedColWidths = [];
|
|
627
|
+
}
|
|
628
|
+
this.oCellsWithLineBreakTexts = null;
|
|
629
|
+
this.iMaxNumberOfLineBreaks = 0;
|
|
630
|
+
};
|
|
631
|
+
sap.zen.crosstab.BaseArea.prototype.getDataModel = function () {
|
|
632
|
+
return this.oDataModel;
|
|
633
|
+
};
|
|
634
|
+
sap.zen.crosstab.BaseArea.prototype.setDataModel = function (oDataModel) {
|
|
635
|
+
this.oDataModel = oDataModel;
|
|
636
|
+
};
|
|
637
|
+
sap.zen.crosstab.BaseArea.prototype.getId = function () {
|
|
638
|
+
return this.sId;
|
|
639
|
+
};
|
|
640
|
+
sap.zen.crosstab.BaseArea.prototype.setId = function (sId) {
|
|
641
|
+
this.sId = sId;
|
|
642
|
+
};
|
|
643
|
+
sap.zen.crosstab.BaseArea.prototype.getAreaType = function () {
|
|
644
|
+
return this.sAreaType;
|
|
645
|
+
};
|
|
646
|
+
sap.zen.crosstab.BaseArea.prototype.getAxisName = function () {
|
|
647
|
+
if(this.sAreaType === RenderingConstants.TYPE_ROW_HEADER_AREA){
|
|
648
|
+
return RenderingConstants.ROW_AXIS;
|
|
649
|
+
} else if(this.sAreaType === RenderingConstants.TYPE_COLUMN_HEADER_AREA){
|
|
650
|
+
return RenderingConstants.COL_AXIS;
|
|
651
|
+
} else if(this.sAreaType === RenderingConstants.TYPE_DATA_AREA){
|
|
652
|
+
return RenderingConstants.DATA_AXIS;
|
|
653
|
+
} else {
|
|
654
|
+
return "";
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
sap.zen.crosstab.BaseArea.prototype.getCrosstab = function () {
|
|
658
|
+
return this.oCrosstab;
|
|
659
|
+
};
|
|
660
|
+
sap.zen.crosstab.BaseArea.prototype.getPageManager = function () {
|
|
661
|
+
return this.oCrosstab.getPageManager();
|
|
662
|
+
};
|
|
663
|
+
sap.zen.crosstab.BaseArea.prototype.getCellWithColSpan = function (iRow, iCol, bDoNotLoadPage) {
|
|
664
|
+
return this.oDataModel.getCellWithColSpan(iRow, iCol, bDoNotLoadPage);
|
|
665
|
+
};
|
|
666
|
+
sap.zen.crosstab.BaseArea.prototype.getCellWithRowSpan = function (iRow, iCol, bDoNotLoadPage) {
|
|
667
|
+
return this.oDataModel.getCellWithRowSpan(iRow, iCol, bDoNotLoadPage);
|
|
668
|
+
};
|
|
669
|
+
sap.zen.crosstab.BaseArea.prototype.setRenderSize = function (
|
|
670
|
+
iRenderStartRow, iRenderRowCnt, iRenderStartCol, iRenderColCnt
|
|
671
|
+
) {
|
|
672
|
+
var iMaxRowCnt = this.oDataModel.getRowCnt();
|
|
673
|
+
var iMaxColCnt = this.oDataModel.getColCnt();
|
|
674
|
+
var iCalculatedMax = 0;
|
|
675
|
+
this.iRenderStartRow = iRenderStartRow;
|
|
676
|
+
this.iRenderRowCnt = iRenderRowCnt;
|
|
677
|
+
iCalculatedMax = this.iRenderStartRow + this.iRenderRowCnt;
|
|
678
|
+
if (iCalculatedMax > iMaxRowCnt) {
|
|
679
|
+
this.iRenderRowCnt = iMaxRowCnt - this.iRenderStartRow;
|
|
680
|
+
}
|
|
681
|
+
this.iRenderStartCol = iRenderStartCol;
|
|
682
|
+
this.iRenderColCnt = iRenderColCnt;
|
|
683
|
+
iCalculatedMax = this.iRenderStartCol + this.iRenderColCnt;
|
|
684
|
+
if (iCalculatedMax > iMaxColCnt) {
|
|
685
|
+
this.iRenderColCnt = iMaxColCnt - this.iRenderStartCol;
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
sap.zen.crosstab.BaseArea.prototype.setRenderStartRow = function (iRow) {
|
|
689
|
+
this.iRenderStartRow = iRow;
|
|
690
|
+
};
|
|
691
|
+
sap.zen.crosstab.BaseArea.prototype.setRenderRowCnt = function (iRowCnt) {
|
|
692
|
+
this.iRenderRowCnt = iRowCnt;
|
|
693
|
+
};
|
|
694
|
+
sap.zen.crosstab.BaseArea.prototype.setRenderStartCol = function (iCol) {
|
|
695
|
+
this.iRenderStartCol = iCol;
|
|
696
|
+
};
|
|
697
|
+
sap.zen.crosstab.BaseArea.prototype.setRenderColCnt = function (iColCnt) {
|
|
698
|
+
this.iRenderColCnt = iColCnt;
|
|
699
|
+
};
|
|
700
|
+
sap.zen.crosstab.BaseArea.prototype.getRenderStartRow = function () {
|
|
701
|
+
return this.iRenderStartRow;
|
|
702
|
+
};
|
|
703
|
+
sap.zen.crosstab.BaseArea.prototype.getRenderRowCnt = function () {
|
|
704
|
+
return this.iRenderRowCnt;
|
|
705
|
+
};
|
|
706
|
+
sap.zen.crosstab.BaseArea.prototype.getRenderStartCol = function () {
|
|
707
|
+
return this.iRenderStartCol;
|
|
708
|
+
};
|
|
709
|
+
sap.zen.crosstab.BaseArea.prototype.getRenderColCnt = function () {
|
|
710
|
+
return this.iRenderColCnt;
|
|
711
|
+
};
|
|
712
|
+
sap.zen.crosstab.BaseArea.prototype.getRenderedCellsByCol = function (iCol) {
|
|
713
|
+
return this.oDataModel.getCellsByCol(iCol, this.iRenderStartRow, this.iRenderRowCnt);
|
|
714
|
+
};
|
|
715
|
+
sap.zen.crosstab.BaseArea.prototype.getRenderedCellsByRow = function (iRow) {
|
|
716
|
+
return this.oDataModel.getCellsByRow(iRow, this.iRenderStartCol, this.iRenderColCnt);
|
|
717
|
+
};
|
|
718
|
+
sap.zen.crosstab.BaseArea.prototype.resetColWidth = function (iCol) {
|
|
719
|
+
this.aCalculatedColWidths[iCol] = 0;
|
|
720
|
+
};
|
|
721
|
+
sap.zen.crosstab.BaseArea.prototype.setColWidth = function(iCol, iWidth) {
|
|
722
|
+
this.aCalculatedColWidths[iCol] = iWidth;
|
|
723
|
+
};
|
|
724
|
+
sap.zen.crosstab.BaseArea.prototype.getColWidth = function (iCol) {
|
|
725
|
+
return this.aCalculatedColWidths[iCol];
|
|
726
|
+
};
|
|
727
|
+
sap.zen.crosstab.BaseArea.prototype.getColWidths = function () {
|
|
728
|
+
return this.aCalculatedColWidths;
|
|
729
|
+
};
|
|
730
|
+
sap.zen.crosstab.BaseArea.prototype.setColWidths = function (aColWidths) {
|
|
731
|
+
this.aCalculatedColWidths = aColWidths;
|
|
732
|
+
};
|
|
733
|
+
sap.zen.crosstab.BaseArea.prototype.determineUserColWidth = function (iCol) {
|
|
734
|
+
var iColWidth = -1;
|
|
735
|
+
if (!this.oUserResizedCols[iCol]) {
|
|
736
|
+
var oWidthInfo = this.oColUserWidth[iCol];
|
|
737
|
+
var oStarInfo = this.oColUserWidth["*"];
|
|
738
|
+
if (oWidthInfo && !oWidthInfo.ignore) {
|
|
739
|
+
iColWidth = oWidthInfo.width;
|
|
740
|
+
} else {
|
|
741
|
+
if (oStarInfo) {
|
|
742
|
+
if (oWidthInfo) {
|
|
743
|
+
if (!oWidthInfo.ignore) {
|
|
744
|
+
iColWidth = oStarInfo.width;
|
|
745
|
+
}
|
|
746
|
+
} else {
|
|
747
|
+
iColWidth = oStarInfo.width;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
return iColWidth;
|
|
753
|
+
};
|
|
754
|
+
sap.zen.crosstab.BaseArea.prototype.getFinalColWidth = function (iCol) {
|
|
755
|
+
var iColWidth = 0;
|
|
756
|
+
if (!this.hasLoadingPages()) {
|
|
757
|
+
iColWidth = this.getColWidth(iCol);
|
|
758
|
+
}
|
|
759
|
+
var iUserColWidth = this.determineUserColWidth(iCol);
|
|
760
|
+
if (iUserColWidth > -1) {
|
|
761
|
+
iColWidth = iUserColWidth;
|
|
762
|
+
}
|
|
763
|
+
return iColWidth;
|
|
764
|
+
};
|
|
765
|
+
sap.zen.crosstab.BaseArea.prototype.getRowHeight = function (iRow) {
|
|
766
|
+
return this.aCalculatedRowHeights[iRow];
|
|
767
|
+
};
|
|
768
|
+
sap.zen.crosstab.BaseArea.prototype.getFinalRowHeight = function (iRow) {
|
|
769
|
+
var iRowHeight = 0;
|
|
770
|
+
if (!this.hasLoadingPages()) {
|
|
771
|
+
iRowHeight = this.getRowHeight(iRow);
|
|
772
|
+
}
|
|
773
|
+
return iRowHeight;
|
|
774
|
+
};
|
|
775
|
+
sap.zen.crosstab.BaseArea.prototype.hasContent = function () {
|
|
776
|
+
return this.bHasContent;
|
|
777
|
+
};
|
|
778
|
+
sap.zen.crosstab.BaseArea.prototype.registerRenderCellCallback = function (fCallback) {
|
|
779
|
+
this.fRenderCellCallback = fCallback;
|
|
780
|
+
};
|
|
781
|
+
sap.zen.crosstab.BaseArea.prototype.removeRenderCellCallback = function () {
|
|
782
|
+
this.fRenderCellCallback = null;
|
|
783
|
+
};
|
|
784
|
+
sap.zen.crosstab.BaseArea.prototype.getRenderCellCallback = function () {
|
|
785
|
+
return this.fRenderCellCallback;
|
|
786
|
+
};
|
|
787
|
+
sap.zen.crosstab.BaseArea.prototype.isDimHeaderArea = function () {
|
|
788
|
+
return this.sAreaType === RenderingConstants.TYPE_DIMENSION_HEADER_AREA;
|
|
789
|
+
};
|
|
790
|
+
sap.zen.crosstab.BaseArea.prototype.isRowHeaderArea = function () {
|
|
791
|
+
return this.sAreaType === RenderingConstants.TYPE_ROW_HEADER_AREA;
|
|
792
|
+
};
|
|
793
|
+
sap.zen.crosstab.BaseArea.prototype.isColHeaderArea = function () {
|
|
794
|
+
return this.sAreaType === RenderingConstants.TYPE_COLUMN_HEADER_AREA;
|
|
795
|
+
};
|
|
796
|
+
sap.zen.crosstab.BaseArea.prototype.isDataArea = function () {
|
|
797
|
+
return this.sAreaType === RenderingConstants.TYPE_DATA_AREA;
|
|
798
|
+
};
|
|
799
|
+
// static helper
|
|
800
|
+
sap.zen.crosstab.BaseArea.getArea = function (oCrosstab, sAreaType) {
|
|
801
|
+
if (sAreaType === RenderingConstants.TYPE_DIMENSION_HEADER_AREA) {
|
|
802
|
+
return oCrosstab.getDimensionHeaderArea();
|
|
803
|
+
} else if (sAreaType === RenderingConstants.TYPE_ROW_HEADER_AREA) {
|
|
804
|
+
return oCrosstab.getRowHeaderArea();
|
|
805
|
+
} else if (sAreaType === RenderingConstants.TYPE_COLUMN_HEADER_AREA) {
|
|
806
|
+
return oCrosstab.getColumnHeaderArea();
|
|
807
|
+
} else if (sAreaType === RenderingConstants.TYPE_DATA_AREA) {
|
|
808
|
+
return oCrosstab.getDataArea();
|
|
809
|
+
} else {
|
|
810
|
+
return null;
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
sap.zen.crosstab.BaseArea.prototype.increaseLoadingPageCnt = function () {
|
|
814
|
+
this.iLoadingPageCnt++;
|
|
815
|
+
};
|
|
816
|
+
sap.zen.crosstab.BaseArea.prototype.decreaseLoadingPageCnt = function () {
|
|
817
|
+
if (this.iLoadingPageCnt > 0) {
|
|
818
|
+
this.iLoadingPageCnt--;
|
|
819
|
+
}
|
|
820
|
+
};
|
|
821
|
+
// Area rendering helpers
|
|
822
|
+
sap.zen.crosstab.BaseArea.prototype.getLoadingPageCnt = function () {
|
|
823
|
+
return this.iLoadingPageCnt;
|
|
824
|
+
};
|
|
825
|
+
sap.zen.crosstab.BaseArea.prototype.openContainerCell = function (oRm, sClass) {
|
|
826
|
+
oRm.write("<td");
|
|
827
|
+
oRm.addStyle("border-spacing", "0px");
|
|
828
|
+
oRm.addStyle("padding", "0px");
|
|
829
|
+
oRm.addStyle("border-width", "0px");
|
|
830
|
+
oRm.addStyle("margin", "0px");
|
|
831
|
+
oRm.writeStyles();
|
|
832
|
+
if (sClass) {
|
|
833
|
+
oRm.writeAttributeEscaped("class", sClass);
|
|
834
|
+
}
|
|
835
|
+
oRm.write(">");
|
|
836
|
+
};
|
|
837
|
+
sap.zen.crosstab.BaseArea.prototype.closeContainerCell = function (oRm) {
|
|
838
|
+
oRm.write("</td>");
|
|
839
|
+
};
|
|
840
|
+
sap.zen.crosstab.BaseArea.prototype.openContainerTable = function (oRm) {
|
|
841
|
+
oRm.write("<table");
|
|
842
|
+
oRm.writeAttributeEscaped("id", this.sId + "_container");
|
|
843
|
+
oRm.addStyle("border-collapse", "collapse");
|
|
844
|
+
oRm.addStyle("border-spacing", "0px");
|
|
845
|
+
oRm.addStyle("padding", "0px");
|
|
846
|
+
oRm.addStyle("border-width", "0px");
|
|
847
|
+
oRm.addStyle("margin", "0px");
|
|
848
|
+
oRm.writeStyles();
|
|
849
|
+
oRm.write(">");
|
|
850
|
+
};
|
|
851
|
+
sap.zen.crosstab.BaseArea.prototype.closeContainerTable = function (oRm) {
|
|
852
|
+
oRm.write("</table>");
|
|
853
|
+
};
|
|
854
|
+
sap.zen.crosstab.BaseArea.prototype.renderContainerStructure = function (oRm, sStyle, bVCutOff, bHCutOff) {
|
|
855
|
+
this.openContainerTable(oRm);
|
|
856
|
+
// first row
|
|
857
|
+
oRm.write("<tr>");
|
|
858
|
+
this.openContainerCell(oRm);
|
|
859
|
+
oRm.write("<table");
|
|
860
|
+
oRm.writeAttributeEscaped("id", this.sId);
|
|
861
|
+
oRm.writeAttributeEscaped("class", sStyle);
|
|
862
|
+
oRm.write(">");
|
|
863
|
+
oRm.write("</table>");
|
|
864
|
+
this.closeContainerCell(oRm);
|
|
865
|
+
if (bHCutOff) {
|
|
866
|
+
this.openContainerCell(oRm, "sapzencrosstab-HorizontalCutOff-" + this.getAreaType());
|
|
867
|
+
oRm.write("<div");
|
|
868
|
+
oRm.writeAttributeEscaped("class", "sapzencrosstab-HorizontalCutOffSpacer");
|
|
869
|
+
oRm.write(">");
|
|
870
|
+
oRm.write("</div>");
|
|
871
|
+
this.closeContainerCell(oRm);
|
|
872
|
+
}
|
|
873
|
+
oRm.write("</tr>");
|
|
874
|
+
if (bVCutOff) {
|
|
875
|
+
// second row
|
|
876
|
+
oRm.write("<tr>");
|
|
877
|
+
this.openContainerCell(oRm, "sapzencrosstab-VerticalCutOff-" + this.getAreaType());
|
|
878
|
+
oRm.write("<div");
|
|
879
|
+
oRm.writeAttribute("class", "sapzencrosstab-VerticalCutOffSpacer");
|
|
880
|
+
oRm.write(">");
|
|
881
|
+
oRm.write("</div>");
|
|
882
|
+
this.closeContainerCell(oRm);
|
|
883
|
+
if (bHCutOff) {
|
|
884
|
+
this.openContainerCell(oRm, "sapzencrosstab-CutOffCorner");
|
|
885
|
+
this.closeContainerCell(oRm);
|
|
886
|
+
}
|
|
887
|
+
oRm.write("</tr>");
|
|
888
|
+
}
|
|
889
|
+
this.closeContainerTable(oRm);
|
|
890
|
+
};
|
|
891
|
+
sap.zen.crosstab.BaseArea.prototype.columnHasSymbolException = function (iCol) {
|
|
892
|
+
this.oColsWithSymbolException[iCol] = null;
|
|
893
|
+
};
|
|
894
|
+
sap.zen.crosstab.BaseArea.prototype.setColUserWidth = function (iCol, iWidthInPx, bIgnore) {
|
|
895
|
+
this.oColUserWidth[iCol] = {
|
|
896
|
+
"width": iWidthInPx,
|
|
897
|
+
"ignore": bIgnore
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
sap.zen.crosstab.BaseArea.prototype.clearColUserWidth = function (iCol) {
|
|
901
|
+
delete this.oColUserWidth[iCol];
|
|
902
|
+
};
|
|
903
|
+
sap.zen.crosstab.BaseArea.prototype.hasUserColWidths = function () {
|
|
904
|
+
var bHasUserColWidths = this.oColUserWidth && Utils.hasEntries(this.oColUserWidth);
|
|
905
|
+
return bHasUserColWidths;
|
|
906
|
+
};
|
|
907
|
+
sap.zen.crosstab.BaseArea.prototype.isFixedColWidthSet = function (iCol) {
|
|
908
|
+
if (!this.hasUserColWidths() && !Utils.hasEntries(this.oUserResizedCols)) {
|
|
909
|
+
return false;
|
|
910
|
+
}
|
|
911
|
+
if (this.oColUserWidth[iCol] !== undefined) {
|
|
912
|
+
return true;
|
|
913
|
+
}
|
|
914
|
+
if (this.oUserResizedCols[iCol] !== undefined) {
|
|
915
|
+
return true;
|
|
916
|
+
}
|
|
917
|
+
return false;
|
|
918
|
+
};
|
|
919
|
+
sap.zen.crosstab.BaseArea.prototype.setColGranularityCalculatedAndMeasured = function (bColCalculationAndMeasuringDone) {
|
|
920
|
+
this.bColGranularityCalculatedAndMeasured = bColCalculationAndMeasuringDone;
|
|
921
|
+
};
|
|
922
|
+
sap.zen.crosstab.BaseArea.prototype.setUserResizedCol = function (iCol) {
|
|
923
|
+
this.oUserResizedCols[iCol] = true;
|
|
924
|
+
};
|
|
925
|
+
sap.zen.crosstab.BaseArea.prototype.clearUserResizedCol = function (iCol) {
|
|
926
|
+
delete this.oUserResizedCols[iCol];
|
|
927
|
+
};
|
|
928
|
+
sap.zen.crosstab.BaseArea.prototype.getCellsWithLineBreakTexts = function () {
|
|
929
|
+
return this.oCellsWithLineBreakTexts;
|
|
930
|
+
};
|
|
931
|
+
return sap.zen.crosstab.BaseArea;
|
|
932
|
+
}
|
|
933
|
+
);
|