@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,1351 @@
|
|
|
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/ui/core/Control",
|
|
10
|
+
"sap/zen/crosstab/paging/PageManager",
|
|
11
|
+
"sap/zen/crosstab/DataArea",
|
|
12
|
+
"sap/zen/crosstab/ColumnHeaderArea",
|
|
13
|
+
"sap/zen/crosstab/RowHeaderArea",
|
|
14
|
+
"sap/zen/crosstab/DimensionHeaderArea",
|
|
15
|
+
"sap/zen/crosstab/EventHandler",
|
|
16
|
+
"sap/zen/crosstab/SelectionHandler",
|
|
17
|
+
"sap/zen/crosstab/rendering/RenderEngine",
|
|
18
|
+
"sap/zen/crosstab/utils/Utils",
|
|
19
|
+
"sap/zen/crosstab/PropertyBag",
|
|
20
|
+
"sap/zen/crosstab/CrosstabCellApi",
|
|
21
|
+
"sap/zen/crosstab/CrosstabTestProxy",
|
|
22
|
+
"sap/zen/crosstab/CellStyleHandler",
|
|
23
|
+
"sap/zen/crosstab/CrosstabContextMenu",
|
|
24
|
+
"sap/zen/crosstab/CrosstabHeaderInfo",
|
|
25
|
+
"sap/zen/crosstab/dragdrop/DragDropHandler",
|
|
26
|
+
"sap/zen/crosstab/rendering/RenderingConstants"
|
|
27
|
+
|
|
28
|
+
],
|
|
29
|
+
function(
|
|
30
|
+
jQuery, Control,PageManager, DataArea,ColumnHeaderArea,
|
|
31
|
+
RowHeaderArea, DimensionHeaderArea, EventHandler,
|
|
32
|
+
SelectionHandler, RenderEngine, Utils, PropertyBag,
|
|
33
|
+
CrosstablCellApi, CrosstabTestProxy, CellStylHandler, CrosstabContextMenu,
|
|
34
|
+
CrosstabHeaderInfo, DragDropHandler, RenderingConstants
|
|
35
|
+
){
|
|
36
|
+
"use strict";
|
|
37
|
+
// Provides control sap.zen.crosstab.Crosstab.
|
|
38
|
+
jQuery.sap.declare("sap.zen.crosstab.Crosstab");
|
|
39
|
+
/**
|
|
40
|
+
* Constructor for a new Crosstab.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
43
|
+
* @param {object} [mSettings] initial settings for the new control
|
|
44
|
+
*
|
|
45
|
+
* @class
|
|
46
|
+
* Add your documentation for the new Crosstab
|
|
47
|
+
* @extends sap.ui.core.Control
|
|
48
|
+
*
|
|
49
|
+
* @constructor
|
|
50
|
+
* @public
|
|
51
|
+
* @name sap.zen.crosstab.Crosstab
|
|
52
|
+
*/
|
|
53
|
+
Control.extend("sap.zen.crosstab.Crosstab", /** @lends sap.zen.crosstab.Crosstab.prototype */ { metadata : {
|
|
54
|
+
library : "sap.zen.crosstab",
|
|
55
|
+
properties : {
|
|
56
|
+
/**
|
|
57
|
+
* Width of the Crosstab.
|
|
58
|
+
*/
|
|
59
|
+
width : {type : "sap.ui.core.CSSSize", group : "Misc", defaultValue : null},
|
|
60
|
+
/**
|
|
61
|
+
* Height of the Crosstab.
|
|
62
|
+
*/
|
|
63
|
+
height : {type : "sap.ui.core.CSSSize", group : "Misc", defaultValue : null}
|
|
64
|
+
}
|
|
65
|
+
}});
|
|
66
|
+
///**
|
|
67
|
+
// * This file defines behavior for the Crosstab control,
|
|
68
|
+
// */
|
|
69
|
+
sap.zen.crosstab.Crosstab.prototype.init = function () {
|
|
70
|
+
"use strict";
|
|
71
|
+
this.scrolled = false;
|
|
72
|
+
this.ensureIndexOf();
|
|
73
|
+
var sCrosstabId = this.getId();
|
|
74
|
+
var sDataAreaId = sCrosstabId + "_dataArea";
|
|
75
|
+
this.dataArea = new DataArea(this);
|
|
76
|
+
this.dataArea.setId(sDataAreaId);
|
|
77
|
+
var sColumnHeaderAreaId = sCrosstabId + "_colHeaderArea";
|
|
78
|
+
this.columnHeaderArea = new ColumnHeaderArea(this);
|
|
79
|
+
this.columnHeaderArea.setId(sColumnHeaderAreaId);
|
|
80
|
+
var sRowHeaderAreaId = sCrosstabId + "_rowHeaderArea";
|
|
81
|
+
this.rowHeaderArea = new RowHeaderArea(this);
|
|
82
|
+
this.rowHeaderArea.setId(sRowHeaderAreaId);
|
|
83
|
+
var sDimensionHeaderAreaId = sCrosstabId + "_dimHeaderArea";
|
|
84
|
+
this.dimensionHeaderArea = new DimensionHeaderArea(this);
|
|
85
|
+
this.dimensionHeaderArea.setId(sDimensionHeaderAreaId);
|
|
86
|
+
this.oPropertyBag = new PropertyBag(this);
|
|
87
|
+
this.oRenderEngine = new RenderEngine(this);
|
|
88
|
+
this.oSelectionHandler = null;
|
|
89
|
+
this.oEventHandler = new EventHandler(this);
|
|
90
|
+
this.oUtils = new Utils(this);
|
|
91
|
+
this.iCalculatedWidth = -1;
|
|
92
|
+
this.iCalculatedHeight = -1;
|
|
93
|
+
this.fPageRequestHandler = null;
|
|
94
|
+
this.bOnAfterRendering = true;
|
|
95
|
+
this.bIsVResize = false;
|
|
96
|
+
this.bIsHResize = false;
|
|
97
|
+
this.iHierarchyIndentWidth = 0;
|
|
98
|
+
this.iHierarchyIndentHeight = 0;
|
|
99
|
+
this.iExceptionSymbolWidth = 0;
|
|
100
|
+
// new default is COMPACT render mode
|
|
101
|
+
this.iRenderMode = RenderingConstants.RENDERMODE_COMPACT;
|
|
102
|
+
this.bRenderScrollbars = true;
|
|
103
|
+
this.bHCutOff = false;
|
|
104
|
+
this.bVCutOff = false;
|
|
105
|
+
this.sOnSelectCommand = null;
|
|
106
|
+
this.sTransferDataCommand = null;
|
|
107
|
+
this.sCallValueHelpCommand = null;
|
|
108
|
+
this.iTotalRowCnt = 0;
|
|
109
|
+
this.iTotalColCnt = 0;
|
|
110
|
+
this.oHScrollbar = null;
|
|
111
|
+
this.oVScrollbar = null;
|
|
112
|
+
this.oHorizontalHeaderScrollbar = null;
|
|
113
|
+
this.iTimeoutCounter = 0;
|
|
114
|
+
this.iTimeoutCounter2 = 0;
|
|
115
|
+
this.oColHeaderHierarchyLevels = {};
|
|
116
|
+
this.oRowHeaderHierarchyLevels = {};
|
|
117
|
+
this.oTestProxy = new CrosstabTestProxy(this, this.oEventHandler, this.oRenderEngine);
|
|
118
|
+
this.bAdjustFrameDivs = true;
|
|
119
|
+
this.iSavedWidthForPrepareDom = 0;
|
|
120
|
+
this.iSavedHeightForPrepareDom = 0;
|
|
121
|
+
this.oCellApi = null;
|
|
122
|
+
this.iNewLinesCnt = 0;
|
|
123
|
+
this.sNewLinesPos = "";
|
|
124
|
+
this.bPlanningCheckMode = false;
|
|
125
|
+
this.sScrollNotifyCommand = null;
|
|
126
|
+
this.oContextMenu = null;
|
|
127
|
+
this.iValueHelpStatus = 0;
|
|
128
|
+
this.bHeaderHScrolling = false;
|
|
129
|
+
this.bPreparedDom = false;
|
|
130
|
+
this.bWasRendered = false;
|
|
131
|
+
this.sUserHeaderWidthCommand = null;
|
|
132
|
+
this.bIsUserHeaderResizeAllowed = false;
|
|
133
|
+
this.bIsHeaderScrollingConfigured = false;
|
|
134
|
+
this.bContainerIsRendered = false;
|
|
135
|
+
this.bContainerRenderRequest = false;
|
|
136
|
+
this.oContainer = null;
|
|
137
|
+
this.oHeaderInfo = null;
|
|
138
|
+
this.sSelectionMode = "";
|
|
139
|
+
this.sSelectionSpace = "";
|
|
140
|
+
this.bEnableHoverEffect = true;
|
|
141
|
+
this.oRenderTimer = null;
|
|
142
|
+
this.oRenderTimer2 = null;
|
|
143
|
+
this.bQueueHeaderWidthRequest = true;
|
|
144
|
+
this.bScrollInvalidate = false;
|
|
145
|
+
this.bCalledByScrolling = false;
|
|
146
|
+
this.bRevertDragDrop = false;
|
|
147
|
+
this.bDragAction = false;
|
|
148
|
+
this.oDragDropHandler = null;
|
|
149
|
+
this.oDragDropCommands = null;
|
|
150
|
+
this.bIsBlocked = false;
|
|
151
|
+
this.bHasData = false;
|
|
152
|
+
this.sUpdateColWidthCommand = null;
|
|
153
|
+
/*this.sOnTitleChangeCommand = null;
|
|
154
|
+
this.iRowCorrectionDelta = 0;
|
|
155
|
+
this.bDestroyFocus = false;
|
|
156
|
+
this.sUpdateUserFormattingCommand = null;
|
|
157
|
+
this.oFormat = null;*/
|
|
158
|
+
};
|
|
159
|
+
sap.zen.crosstab.Crosstab.prototype.ensureIndexOf = function () {
|
|
160
|
+
// official code from developer.mozilla.org
|
|
161
|
+
// needed for IE8 support and other browsers that don't support the ECMA-262, 5th edition "indexOf" function
|
|
162
|
+
if (!Array.prototype.indexOf) {
|
|
163
|
+
Array.prototype.indexOf = function (searchElement) {
|
|
164
|
+
"use strict";
|
|
165
|
+
if (this == null) {
|
|
166
|
+
throw new TypeError();
|
|
167
|
+
}
|
|
168
|
+
var t = Object(this);
|
|
169
|
+
var len = t.length >>> 0;
|
|
170
|
+
if (len === 0) {
|
|
171
|
+
return -1;
|
|
172
|
+
}
|
|
173
|
+
var n = 0;
|
|
174
|
+
if (arguments.length > 1) {
|
|
175
|
+
n = Number(arguments[1]);
|
|
176
|
+
if (n != n) {
|
|
177
|
+
n = 0;
|
|
178
|
+
} else if (n != 0 && n != Infinity && n != -Infinity) {
|
|
179
|
+
n = (n > 0 || -1) * Math.floor(Math.abs(n));
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (n >= len) {
|
|
183
|
+
return -1;
|
|
184
|
+
}
|
|
185
|
+
var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
|
|
186
|
+
for (; k < len; k++) {
|
|
187
|
+
if (k in t && t[k] === searchElement) {
|
|
188
|
+
return k;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return -1;
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
sap.zen.crosstab.Crosstab.prototype.getTableDiv = function () {
|
|
196
|
+
var oTableDiv = null;
|
|
197
|
+
if (this.iRenderMode === RenderingConstants.RENDERMODE_COMPACT) {
|
|
198
|
+
oTableDiv = jQuery(document.getElementById(this.getId() + "_altRenderModeTableDiv"));
|
|
199
|
+
} else {
|
|
200
|
+
oTableDiv = jQuery(document.getElementById(this.getId()));
|
|
201
|
+
}
|
|
202
|
+
return oTableDiv;
|
|
203
|
+
};
|
|
204
|
+
sap.zen.crosstab.Crosstab.prototype.ensurePageManager = function () {
|
|
205
|
+
if (!this.oPageManager) {
|
|
206
|
+
this.oPageManager = new PageManager(this);
|
|
207
|
+
}
|
|
208
|
+
return this.oPageManager;
|
|
209
|
+
};
|
|
210
|
+
sap.zen.crosstab.Crosstab.prototype.getIntWidth = function () {
|
|
211
|
+
var iWidth = -1;
|
|
212
|
+
var sWidth = this.getWidth();
|
|
213
|
+
if (sWidth && sWidth !== "auto") {
|
|
214
|
+
iWidth = parseInt(sWidth, 10);
|
|
215
|
+
} else {
|
|
216
|
+
iWidth = this.iCalculatedWidth;
|
|
217
|
+
}
|
|
218
|
+
return iWidth;
|
|
219
|
+
};
|
|
220
|
+
sap.zen.crosstab.Crosstab.prototype.getContentWidth = function () {
|
|
221
|
+
var iWidth = this.getIntWidth();
|
|
222
|
+
var oTableDivValues = this.getRenderEngine().getTableDivValues();
|
|
223
|
+
iWidth = iWidth - oTableDivValues.borders.iLeftBorderWidth - oTableDivValues.borders.iRightBorderWidth;
|
|
224
|
+
return iWidth;
|
|
225
|
+
};
|
|
226
|
+
sap.zen.crosstab.Crosstab.prototype.getContentHeight = function () {
|
|
227
|
+
var iHeight = this.getIntHeight();
|
|
228
|
+
var oTableDivValues = this.getRenderEngine().getTableDivValues();
|
|
229
|
+
var iToolbarHeight = this.oPropertyBag.getToolbarHeight();
|
|
230
|
+
iHeight = iHeight - oTableDivValues.borders.iTopBorderWidth - oTableDivValues.borders.iBottomBorderWidth
|
|
231
|
+
- iToolbarHeight;
|
|
232
|
+
return iHeight;
|
|
233
|
+
};
|
|
234
|
+
sap.zen.crosstab.Crosstab.prototype.getIntHeight = function () {
|
|
235
|
+
var iHeight = -1;
|
|
236
|
+
var sHeight = this.getHeight();
|
|
237
|
+
if (sHeight && sHeight !== "auto") {
|
|
238
|
+
iHeight = parseInt(sHeight, 10);
|
|
239
|
+
} else {
|
|
240
|
+
iHeight = this.iCalculatedHeight;
|
|
241
|
+
}
|
|
242
|
+
return iHeight;
|
|
243
|
+
};
|
|
244
|
+
sap.zen.crosstab.Crosstab.prototype.resize = function () {
|
|
245
|
+
var oDomCrosstab = jQuery.sap.byId(this.getId());
|
|
246
|
+
var iNewWidth = parseInt(oDomCrosstab.outerWidth(), 10);
|
|
247
|
+
var iNewHeight = parseInt(oDomCrosstab.outerHeight(), 10);
|
|
248
|
+
this.isHResize = iNewWidth !== this.getIntWidth();
|
|
249
|
+
this.isVResize = iNewHeight !== this.getIntHeight();
|
|
250
|
+
if (this.isHResize || this.isVResize) {
|
|
251
|
+
this.ensurePageManager().resizeEvent();
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
sap.zen.crosstab.Crosstab.prototype.determineRenderMode = function (oCrosstabControlProperties) {
|
|
255
|
+
var iNewRenderMode = -1;
|
|
256
|
+
if (oCrosstabControlProperties) {
|
|
257
|
+
if (oCrosstabControlProperties.alwaysfill) {
|
|
258
|
+
iNewRenderMode = RenderingConstants.RENDERMODE_FILL;
|
|
259
|
+
} else {
|
|
260
|
+
iNewRenderMode = RenderingConstants.RENDERMODE_COMPACT;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (iNewRenderMode === -1) {
|
|
264
|
+
iNewRenderMode = RenderingConstants.RENDERMODE_COMPACT;
|
|
265
|
+
}
|
|
266
|
+
if (iNewRenderMode !== this.iRenderMode) {
|
|
267
|
+
this.oRenderEngine.reset();
|
|
268
|
+
this.iRenderMode = iNewRenderMode;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
sap.zen.crosstab.Crosstab.prototype.determineScrollMode = function (oCrosstabControlProperties) {
|
|
272
|
+
var bNewPixelScrolling = oCrosstabControlProperties.pixelscrolling;
|
|
273
|
+
if (bNewPixelScrolling !== this.oPropertyBag.isPixelScrolling()) {
|
|
274
|
+
this.oRenderEngine.reset();
|
|
275
|
+
this.oPropertyBag.setPixelScrolling(bNewPixelScrolling);
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
sap.zen.crosstab.Crosstab.prototype.applyControlProperties = function (oCrosstabControlProperties) {
|
|
279
|
+
this.bPlanningCheckMode = oCrosstabControlProperties.pvcheck !== null
|
|
280
|
+
&& oCrosstabControlProperties.pvcheck !== undefined;
|
|
281
|
+
var bIsConsistent = this.ensurePageManager().checkResponseConsistency(oCrosstabControlProperties);
|
|
282
|
+
if (!bIsConsistent) {
|
|
283
|
+
this.reset(oCrosstabControlProperties);
|
|
284
|
+
}
|
|
285
|
+
if (!this.bPlanningCheckMode) {
|
|
286
|
+
if (oCrosstabControlProperties.removeselection === true) {
|
|
287
|
+
if (this.oSelectionHandler) {
|
|
288
|
+
this.oSelectionHandler.removeAllSelections();
|
|
289
|
+
// see below for planning check
|
|
290
|
+
this.bOnAfterRendering = true;
|
|
291
|
+
}
|
|
292
|
+
} else {
|
|
293
|
+
this.determineRenderMode(oCrosstabControlProperties);
|
|
294
|
+
this.determineScrollMode(oCrosstabControlProperties);
|
|
295
|
+
this.ensurePageManager().receiveData(oCrosstabControlProperties);
|
|
296
|
+
}
|
|
297
|
+
} else {
|
|
298
|
+
this.handlePlanningCheckData(oCrosstabControlProperties);
|
|
299
|
+
// changing column width calls invalidate on the control which must lead to a re-rendering, hence
|
|
300
|
+
// this must be set.
|
|
301
|
+
// Same as at the end of Crosstab doRendering() since this was the rendering here for planning values.
|
|
302
|
+
this.bOnAfterRendering = true;
|
|
303
|
+
}
|
|
304
|
+
this.bPlanningCheckMode = false;
|
|
305
|
+
};
|
|
306
|
+
sap.zen.crosstab.Crosstab.prototype.calculateOffset = function (oCell) {
|
|
307
|
+
var iOffset = 0;
|
|
308
|
+
var oArea = oCell.getArea();
|
|
309
|
+
if (oArea.isRowHeaderArea()) {
|
|
310
|
+
for (var i = 0; i < oCell.getCol(); i++) {
|
|
311
|
+
var oTempCell = oArea.getCell(oCell.getRow(), i);
|
|
312
|
+
if (!oTempCell) {
|
|
313
|
+
iOffset++;
|
|
314
|
+
} else if (!oTempCell.isEntryEnabled()) {
|
|
315
|
+
iOffset++;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return iOffset;
|
|
320
|
+
};
|
|
321
|
+
sap.zen.crosstab.Crosstab.prototype.calculateRowHeaderColOffsetsForRow = function(iTableRow) {
|
|
322
|
+
var oColMapping = {};
|
|
323
|
+
var iTableCol = 0;
|
|
324
|
+
var oCell = null;
|
|
325
|
+
var iEntryEnabledCol = 0;
|
|
326
|
+
var iMaxColCnt = this.rowHeaderArea.getColCnt();
|
|
327
|
+
for (iTableCol = 0; iTableCol < iMaxColCnt; iTableCol++) {
|
|
328
|
+
oCell = this.getTableCell(iTableRow, iTableCol);
|
|
329
|
+
if (oCell !== null && oCell.isEntryEnabled()) {
|
|
330
|
+
oColMapping[iEntryEnabledCol] = iTableCol;
|
|
331
|
+
iEntryEnabledCol++;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return oColMapping;
|
|
335
|
+
};
|
|
336
|
+
sap.zen.crosstab.Crosstab.prototype.handlePlanningCheckData = function (oCrosstabControlProperties) {
|
|
337
|
+
var i = 0;
|
|
338
|
+
var oCheckCells = oCrosstabControlProperties.pvcheck;
|
|
339
|
+
var iCellCnt = oCheckCells.length;
|
|
340
|
+
var oColMappingPerTabRow = {};
|
|
341
|
+
var oColMapping = null;
|
|
342
|
+
var iTableCol = 0;
|
|
343
|
+
for (i = 0; i < iCellCnt; i++) {
|
|
344
|
+
var oCheckCell = oCheckCells[i];
|
|
345
|
+
// contract: we get column positions in newlines as successively and need to map
|
|
346
|
+
// them to actual table columns due to text/key display etc.
|
|
347
|
+
oColMapping = oColMappingPerTabRow[oCheckCell.tabrow];
|
|
348
|
+
if (!oColMapping) {
|
|
349
|
+
oColMapping = this.calculateRowHeaderColOffsetsForRow(oCheckCell.tabrow);
|
|
350
|
+
oColMappingPerTabRow[oCheckCell.tabrow] = oColMapping;
|
|
351
|
+
}
|
|
352
|
+
iTableCol = oColMapping[oCheckCell.tabcol] || oCheckCell.tabcol;
|
|
353
|
+
var oCell = this.getTableCell(oCheckCell.tabrow, iTableCol);
|
|
354
|
+
if (oCell) {
|
|
355
|
+
oCell.setText(oCheckCell.text);
|
|
356
|
+
if (oCheckCell.valid === false) {
|
|
357
|
+
oCell.addStyle(RenderingConstants.STYLE_INVALID_VALUE);
|
|
358
|
+
} else {
|
|
359
|
+
oCell.removeStyle(RenderingConstants.STYLE_INVALID_VALUE);
|
|
360
|
+
}
|
|
361
|
+
if (oCheckCell.newvalue === true) {
|
|
362
|
+
oCell.addStyle(RenderingConstants.STYLE_NEW_VALUE);
|
|
363
|
+
}
|
|
364
|
+
this.oRenderEngine.updateRenderingOfInputCellAfterCheck(oCell);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
sap.zen.crosstab.Crosstab.prototype.determineKeepUserColWidths = function (oCrosstabControlProperties) {
|
|
369
|
+
if (oCrosstabControlProperties.dataproviderchanged) {
|
|
370
|
+
return false;
|
|
371
|
+
}
|
|
372
|
+
if (oCrosstabControlProperties.resultsetchanged && oCrosstabControlProperties.rootcause === undefined) {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
return false; // the backend has the current state so it should never be overwritten by Frontend
|
|
376
|
+
};
|
|
377
|
+
sap.zen.crosstab.Crosstab.prototype.determineKeepCalculatedColWidths = function (oCrosstabControlProperties) {
|
|
378
|
+
if (oCrosstabControlProperties.rootcause === "sorting") {
|
|
379
|
+
return true;
|
|
380
|
+
}
|
|
381
|
+
var iVpos = (oCrosstabControlProperties.v_pos || 1) - 1;
|
|
382
|
+
var iSentDataRows = oCrosstabControlProperties.sentdatarows || 0;
|
|
383
|
+
var iClientVpos = oCrosstabControlProperties.clientvpos || 0;
|
|
384
|
+
var iTotalDataRows = oCrosstabControlProperties.totaldatarows || 0;
|
|
385
|
+
var iHpos = (oCrosstabControlProperties.h_pos || 1) - 1;
|
|
386
|
+
var iSentDataCols = oCrosstabControlProperties.sentdatacols || 0;
|
|
387
|
+
var iClientHpos = oCrosstabControlProperties.clienthpos || 0;
|
|
388
|
+
var iTotalDataCols = oCrosstabControlProperties.totaldatacols || 0;
|
|
389
|
+
var bIsPaging = oCrosstabControlProperties.ispaging || false;
|
|
390
|
+
var bKeepColWidthsForHScrolling = false;
|
|
391
|
+
var bKeepColWidthsForVScrolling = false;
|
|
392
|
+
if (this.bWasRendered === true && !bIsPaging) {
|
|
393
|
+
if ((iClientVpos > 0) && (iClientVpos <= iTotalDataRows) && (iClientVpos > (iVpos + iSentDataRows))) {
|
|
394
|
+
bKeepColWidthsForVScrolling = true;
|
|
395
|
+
}
|
|
396
|
+
if ((iClientHpos > 0) && (iClientHpos <= iTotalDataCols) && (iClientHpos > (iHpos + iSentDataCols))) {
|
|
397
|
+
bKeepColWidthsForHScrolling = true;
|
|
398
|
+
}
|
|
399
|
+
if (bKeepColWidthsForVScrolling === true || bKeepColWidthsForHScrolling === true) {
|
|
400
|
+
return true;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
return false;
|
|
404
|
+
};
|
|
405
|
+
sap.zen.crosstab.Crosstab.prototype.reset = function (oCrosstabControlProperties) {
|
|
406
|
+
var bKeepUserColWidths = this.determineKeepUserColWidths(oCrosstabControlProperties);
|
|
407
|
+
var bKeepCalculatedColWidths = this.determineKeepCalculatedColWidths(oCrosstabControlProperties);
|
|
408
|
+
this.getDimensionHeaderArea().clear(bKeepUserColWidths, bKeepCalculatedColWidths);
|
|
409
|
+
this.getColumnHeaderArea().clear(bKeepUserColWidths, bKeepCalculatedColWidths);
|
|
410
|
+
this.getRowHeaderArea().clear(bKeepUserColWidths, bKeepCalculatedColWidths);
|
|
411
|
+
this.getDataArea().clear(bKeepUserColWidths, bKeepCalculatedColWidths);
|
|
412
|
+
this.oRenderEngine.reset(bKeepCalculatedColWidths);
|
|
413
|
+
this.oPageManager.reset();
|
|
414
|
+
};
|
|
415
|
+
sap.zen.crosstab.Crosstab.prototype.updateControlProperties = function (oCrosstabControlProperties) {
|
|
416
|
+
if (oCrosstabControlProperties && oCrosstabControlProperties.changed) {
|
|
417
|
+
this.reset(oCrosstabControlProperties);
|
|
418
|
+
}
|
|
419
|
+
this.applyControlProperties(oCrosstabControlProperties);
|
|
420
|
+
};
|
|
421
|
+
sap.zen.crosstab.Crosstab.prototype.expectOnAfterRenderingCall = function () {
|
|
422
|
+
this.bOnAfterRendering = false;
|
|
423
|
+
};
|
|
424
|
+
sap.zen.crosstab.Crosstab.prototype.setContainerIsRendered = function() {
|
|
425
|
+
this.bContainerIsRendered = true;
|
|
426
|
+
};
|
|
427
|
+
sap.zen.crosstab.Crosstab.prototype.setContainerRenderRequest = function() {
|
|
428
|
+
this.bContainerRenderRequest = true;
|
|
429
|
+
};
|
|
430
|
+
sap.zen.crosstab.Crosstab.prototype.cleanupContainer = function() {
|
|
431
|
+
if (this.oContainer) {
|
|
432
|
+
if (this.oContainer.oNotificationRegistry) {
|
|
433
|
+
delete this.oContainer.oNotificationRegistry[this.getId()];
|
|
434
|
+
}
|
|
435
|
+
if (Utils.getSizeOf(this.oContainer.oNotificationRegistry) === 0) {
|
|
436
|
+
// full cleanup
|
|
437
|
+
if (this.oContainer.fOriginalRender) {
|
|
438
|
+
this.oContainer.getRenderer().render = this.oContainer.fOriginalRender;
|
|
439
|
+
delete this.oContainer.fOriginalRender;
|
|
440
|
+
}
|
|
441
|
+
this.oContainer.removeEventDelegate(this.onAfterRenderingDelegate);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
this.oContainer = null;
|
|
445
|
+
};
|
|
446
|
+
sap.zen.crosstab.Crosstab.prototype.onAfterRenderingDelegate = null;
|
|
447
|
+
sap.zen.crosstab.Crosstab.prototype.setupContainer = function(oContainer) {
|
|
448
|
+
var that = this;
|
|
449
|
+
var oRenderer = null;
|
|
450
|
+
if (oContainer && oContainer.getRenderer && Utils.isDispatcherAvailable() === true) {
|
|
451
|
+
// renderer as such
|
|
452
|
+
if (!oContainer.fOriginalRender) {
|
|
453
|
+
oRenderer = oContainer.getRenderer();
|
|
454
|
+
oContainer.fOriginalRender = oRenderer.render;
|
|
455
|
+
oRenderer.render = function (oRenderManager, oControl) {
|
|
456
|
+
oContainer.fOriginalRender.call(oContainer.getRenderer(), oRenderManager, oControl);
|
|
457
|
+
if (oContainer.oNotificationRegistry) {
|
|
458
|
+
jQuery.each(oContainer.oNotificationRegistry, function(sId, oHandlers) {
|
|
459
|
+
var oControl = sap.zen.Dispatcher.instance.getControlForId(sId);
|
|
460
|
+
if (oControl) {
|
|
461
|
+
oHandlers.fSetRenderRequest.call(oControl);
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
this.bContainerRenderRequest = true;
|
|
467
|
+
}
|
|
468
|
+
// onAfterRendering
|
|
469
|
+
if (oContainer.onAfterRendering) {
|
|
470
|
+
//REMOVE might be null
|
|
471
|
+
oContainer.removeEventDelegate(that.onAfterRenderingDelegate);
|
|
472
|
+
that.onAfterRenderingDelegate = {
|
|
473
|
+
onAfterRendering: function(){
|
|
474
|
+
if (oContainer.oNotificationRegistry) {
|
|
475
|
+
jQuery.each(oContainer.oNotificationRegistry, function(sId, oHandlers) {
|
|
476
|
+
var oControl = sap.zen.Dispatcher.instance.getControlForId(sId);
|
|
477
|
+
if (oControl) {
|
|
478
|
+
oHandlers.fSetIsRendered.call(oControl);
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
oContainer.addEventDelegate(that.onAfterRenderingDelegate);
|
|
485
|
+
} else {
|
|
486
|
+
this.bContainerIsRendered = true;
|
|
487
|
+
}
|
|
488
|
+
if (!oContainer.oNotificationRegistry) {
|
|
489
|
+
oContainer.oNotificationRegistry = {};
|
|
490
|
+
}
|
|
491
|
+
oContainer.oNotificationRegistry[this.getId()] = {"fSetRenderRequest" : this.setContainerRenderRequest, "fSetIsRendered" : this.setContainerIsRendered};
|
|
492
|
+
this.oContainer = oContainer;
|
|
493
|
+
} else {
|
|
494
|
+
this.oContainer = null;
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
sap.zen.crosstab.Crosstab.prototype.getContainer = function() {
|
|
498
|
+
var oContainer = null;
|
|
499
|
+
if (this.oContainer) {
|
|
500
|
+
oContainer = this.oContainer;
|
|
501
|
+
} else {
|
|
502
|
+
oContainer = this.getParent().getParent();
|
|
503
|
+
}
|
|
504
|
+
return oContainer;
|
|
505
|
+
};
|
|
506
|
+
sap.zen.crosstab.Crosstab.prototype.isAutoSize = function() {
|
|
507
|
+
var sWidth = this.getWidth();
|
|
508
|
+
var sHeight = this.getHeight();
|
|
509
|
+
if (!sWidth) {
|
|
510
|
+
return true;
|
|
511
|
+
} else {
|
|
512
|
+
if (sWidth === "auto") {
|
|
513
|
+
return true;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
if (!sHeight) {
|
|
517
|
+
return true;
|
|
518
|
+
} else {
|
|
519
|
+
if (sHeight === "auto") {
|
|
520
|
+
return true;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
return false;
|
|
524
|
+
};
|
|
525
|
+
sap.zen.crosstab.Crosstab.prototype.prepareContainer = function() {
|
|
526
|
+
var oContainer = null;
|
|
527
|
+
this.bContainerRenderRequest = false;
|
|
528
|
+
if (!this.isAutoSize()) {
|
|
529
|
+
this.cleanupContainer();
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
if (!sap.zen.Dispatcher) {
|
|
533
|
+
this.cleanupContainer();
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
// make sure that this is really newly determined here. Do not use .getContainer() which might return a cached container
|
|
537
|
+
oContainer = this.getParent().getParent();
|
|
538
|
+
if (!oContainer) {
|
|
539
|
+
this.cleanupContainer();
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
if (this.oContainer && (oContainer !== this.oContainer)) {
|
|
543
|
+
this.cleanupContainer();
|
|
544
|
+
}
|
|
545
|
+
this.setupContainer(oContainer);
|
|
546
|
+
};
|
|
547
|
+
sap.zen.crosstab.Crosstab.prototype.onAfterRendering = function () {
|
|
548
|
+
if(!this.bIsDeferredRendering && Utils.isDispatcherAvailable()){
|
|
549
|
+
this.bIsDeferredRendering = sap.zen.Dispatcher.instance.isDeferredRendering();
|
|
550
|
+
}
|
|
551
|
+
if (!this.bContainerIsRendered && this.bContainerRenderRequest === true && this.oContainer) {
|
|
552
|
+
this.iTimeoutCounter++;
|
|
553
|
+
if (this.iTimeoutCounter > 1000) {
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
if (this.oRenderTimer) {
|
|
557
|
+
clearTimeout(this.oRenderTimer);
|
|
558
|
+
this.oRenderTimer = null;
|
|
559
|
+
}
|
|
560
|
+
this.oRenderTimer = setTimeout((function (that) {
|
|
561
|
+
return function () {
|
|
562
|
+
that.onAfterRendering();
|
|
563
|
+
};
|
|
564
|
+
})(this), 10);
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
if (this.bOnAfterRendering || this.bIsDeferredRendering) {
|
|
568
|
+
this.doRendering();
|
|
569
|
+
}
|
|
570
|
+
this.bContainerRenderRequest = false;
|
|
571
|
+
this.bContainerIsRendered = false;
|
|
572
|
+
this.bIsDeferredRendering = false;
|
|
573
|
+
};
|
|
574
|
+
sap.zen.crosstab.Crosstab.prototype.prepareExistingDom = function () {
|
|
575
|
+
if (!this.bPlanningCheckMode) {
|
|
576
|
+
var oDomBody = jQuery(document.getElementById(this.getDimensionHeaderArea().getId())).find("tbody");
|
|
577
|
+
oDomBody.empty();
|
|
578
|
+
oDomBody = jQuery(document.getElementById(this.getRowHeaderArea().getId())).find("tbody");
|
|
579
|
+
oDomBody.empty();
|
|
580
|
+
oDomBody = jQuery(document.getElementById(this.getColumnHeaderArea().getId())).find("tbody");
|
|
581
|
+
oDomBody.empty();
|
|
582
|
+
oDomBody = jQuery(document.getElementById(this.getDataArea().getId())).find("tbody");
|
|
583
|
+
oDomBody.empty();
|
|
584
|
+
this.bRenderScrollbars = false;
|
|
585
|
+
this.determineNeedToAdjustOuterDivs();
|
|
586
|
+
this.bPreparedDom = true;
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
// Outer divs should generally not be adapted during paging operations since width and height are
|
|
590
|
+
// otherwise modified by JavaScript calculations which are only valid for the first rendering and
|
|
591
|
+
// give pixel-off errors.
|
|
592
|
+
// However, if the size of the crosstab is changed (either by using setWidth or implicitly by auto width),
|
|
593
|
+
// and paging is active, a resize of the outer divs needs to happen. This requires the size adaptation for
|
|
594
|
+
// the outer divs to work unless the last page has been loaded.
|
|
595
|
+
// Once the last page has been loaded due to enlarging the crosstab size, any further request to prepare
|
|
596
|
+
// the existing DOM is again a simple paging operation without size change, which means that starting from
|
|
597
|
+
// that point the outer size div sizes can again be left unaltered.
|
|
598
|
+
sap.zen.crosstab.Crosstab.prototype.determineNeedToAdjustOuterDivs = function () {
|
|
599
|
+
var iWidth = this.getIntWidth();
|
|
600
|
+
var iHeight = this.getIntHeight();
|
|
601
|
+
this.bAdjustFrameDivs = true;
|
|
602
|
+
if (iWidth === this.iSavedWidthForPrepareDom && iHeight === this.iSavedHeightForPrepareDom) {
|
|
603
|
+
this.bAdjustFrameDivs = false;
|
|
604
|
+
} else {
|
|
605
|
+
// any outer div adjust operation in the existing dom context needs to clear
|
|
606
|
+
// the borders for the calculations to work properly. Otherwise, calculations for
|
|
607
|
+
// border corrections will be carried out on already adjusted borders which leads
|
|
608
|
+
// to wrong results and pixel-off errors
|
|
609
|
+
this.getRenderEngine().removeOuterDivBorders();
|
|
610
|
+
}
|
|
611
|
+
if (!this.getDataArea().hasLoadingPages()) {
|
|
612
|
+
this.iSavedWidthForPrepareDom = iWidth;
|
|
613
|
+
this.iSavedHeightForPrepareDom = iHeight;
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
sap.zen.crosstab.Crosstab.prototype.determineHierarchyIndents = function () {
|
|
617
|
+
var oDomMeasureDiv = jQuery(document.getElementById(this.getId() + "_measureDiv"));
|
|
618
|
+
if (oDomMeasureDiv && oDomMeasureDiv.length > 0) {
|
|
619
|
+
oDomMeasureDiv.css("visibility", "visible");
|
|
620
|
+
this.iHierarchyIndentWidth = parseInt(oDomMeasureDiv.outerWidth(), 10);
|
|
621
|
+
this.iHierarchyIndentHeight = parseInt(oDomMeasureDiv.outerHeight(), 10);
|
|
622
|
+
oDomMeasureDiv.css("visibility", "none");
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
sap.zen.crosstab.Crosstab.prototype.determineAlertSymbolDimensions = function () {
|
|
626
|
+
var oDomMeasureDiv = jQuery(document.getElementById(this.getId() + "_exceptionMeasureDiv"));
|
|
627
|
+
if (oDomMeasureDiv && oDomMeasureDiv.length > 0) {
|
|
628
|
+
oDomMeasureDiv.css("visibility", "visible");
|
|
629
|
+
this.iExceptionSymbolWidth = parseInt(oDomMeasureDiv.outerWidth(), 10);
|
|
630
|
+
oDomMeasureDiv.css("visibility", "none");
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
sap.zen.crosstab.Crosstab.prototype.isRenderingPossible = function () {
|
|
634
|
+
/*
|
|
635
|
+
* Sometimes doRendering is called even though the DOM is not prepared. This means there is no basic Crosstab
|
|
636
|
+
* structure available which could be filled with content. If rendering is continued in this case, there will be
|
|
637
|
+
* JavaScript exceptions. In this case it is safer to wait for UI5 to call onAfterRendering(). See Message Number
|
|
638
|
+
* 0120061532 0001269803 2013 See Message Number 0120031469 0004834824 2012
|
|
639
|
+
*/
|
|
640
|
+
if (Utils.isDispatcherAvailable() === true && sap.zen.Dispatcher.instance.suppressRendering()) {
|
|
641
|
+
if (!sap.zen.Dispatcher.instance.isSingleDelta(this.getId())) {
|
|
642
|
+
// register for deferred rendering, do not render right now
|
|
643
|
+
// because the parent might not have correct size yet
|
|
644
|
+
sap.zen.Dispatcher.instance.registerForDeferredRendering(this);
|
|
645
|
+
return false;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
var aElementsToCheck = [];
|
|
649
|
+
aElementsToCheck.push(jQuery(document.getElementById(this.getId())));
|
|
650
|
+
aElementsToCheck.push(jQuery(document.getElementById(this.getId() + "_upperSection")));
|
|
651
|
+
aElementsToCheck.push(jQuery(document.getElementById(this.getId() + "_lowerSection")));
|
|
652
|
+
aElementsToCheck.push(jQuery(document.getElementById(this.getId() + "_dimHeaderArea")));
|
|
653
|
+
aElementsToCheck.push(jQuery(document.getElementById(this.getId() + "_colHeaderArea")));
|
|
654
|
+
aElementsToCheck.push(jQuery(document.getElementById(this.getId() + "_dataArea")));
|
|
655
|
+
for (var i = 0; i < aElementsToCheck.length; i++) {
|
|
656
|
+
if (aElementsToCheck[i].length !== 1) {
|
|
657
|
+
// expect another rendering call
|
|
658
|
+
this.bOnAfterRendering = true;
|
|
659
|
+
// do not continue with rendering
|
|
660
|
+
return false;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
return true;
|
|
664
|
+
};
|
|
665
|
+
sap.zen.crosstab.Crosstab.prototype.determineCrosstabSize = function () {
|
|
666
|
+
var bContinueRendering = true;
|
|
667
|
+
var oJqParent = null;
|
|
668
|
+
if (!this.getWidth() || !this.getHeight()) {
|
|
669
|
+
// if width/height has not been set there is no point in continuing the rendering process
|
|
670
|
+
// either a pixel value or 'auto' is required to render
|
|
671
|
+
bContinueRendering = false;
|
|
672
|
+
} else {
|
|
673
|
+
// we need to calculate the width and height in any case, i. e. also when we are not "auto"
|
|
674
|
+
// to be able to later decide whether we should start rendering or not.
|
|
675
|
+
// This scenario is relevant for running in a FIORI environment where - despite having provided
|
|
676
|
+
// width and height explicitly for the Crosstab - the Container might not already be rendered to
|
|
677
|
+
// its full size, hence leading to problems when measuring and adjusting outer divs
|
|
678
|
+
// Also, don't get the width/height data from the parent container control itself, but from
|
|
679
|
+
// the actual DOM parent since this will be the UI5 position container that actually values margin and border settings
|
|
680
|
+
oJqParent = jQuery.sap.byId(this.getId()).parent();
|
|
681
|
+
var iWidth = oJqParent.outerWidth();
|
|
682
|
+
if (iWidth && iWidth > 10) {
|
|
683
|
+
this.iCalculatedWidth = iWidth;
|
|
684
|
+
}
|
|
685
|
+
// See above. Calculate height of Crosstab container in all cases (FIORI)
|
|
686
|
+
var iHeight = oJqParent.outerHeight();
|
|
687
|
+
if (iHeight && iHeight > 10) {
|
|
688
|
+
this.iCalculatedHeight = iHeight;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
return bContinueRendering;
|
|
692
|
+
};
|
|
693
|
+
sap.zen.crosstab.Crosstab.prototype.setInvalidateCalledByScrolling = function() {
|
|
694
|
+
this.bCalledByScrolling = true;
|
|
695
|
+
};
|
|
696
|
+
sap.zen.crosstab.Crosstab.prototype.doRendering = function () {
|
|
697
|
+
this.iTimeoutCounter = 0;
|
|
698
|
+
if (this.oRenderTimer) {
|
|
699
|
+
clearTimeout(this.oRenderTimer);
|
|
700
|
+
this.oRenderTimer = null;
|
|
701
|
+
}
|
|
702
|
+
if (this.bPlanningCheckMode === true) {
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
if (!this.isRenderingPossible()) {
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
if (!this.determineCrosstabSize()) {
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
/*
|
|
712
|
+
* Start Temporary Workaround
|
|
713
|
+
*/
|
|
714
|
+
if (this.iCalculatedWidth === -1 || this.iCalculatedHeight === -1){
|
|
715
|
+
//Despite all other measures the container still hasn't rendered at this point.
|
|
716
|
+
//This has been reported for nested container structures with a docked Crosstab inside.
|
|
717
|
+
//A general fix needs to be made in the dispatcher, this is just a workaround to help the customers
|
|
718
|
+
this.iTimeoutCounter2++;
|
|
719
|
+
if (this.iTimeoutCounter2 > 1000) {
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
if (this.oRenderTimer2) {
|
|
723
|
+
clearTimeout(this.oRenderTimer2);
|
|
724
|
+
this.oRenderTimer2 = null;
|
|
725
|
+
}
|
|
726
|
+
this.oRenderTimer2 = setTimeout((function (that) {
|
|
727
|
+
return function () {
|
|
728
|
+
that.doRendering();
|
|
729
|
+
};
|
|
730
|
+
})(this), 10);
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
this.iTimeoutCounter2 = 0;
|
|
734
|
+
if (this.oRenderTimer2) {
|
|
735
|
+
clearTimeout(this.oRenderTimer2);
|
|
736
|
+
this.oRenderTimer2 = null;
|
|
737
|
+
}
|
|
738
|
+
/*
|
|
739
|
+
* End Temporary Workaround
|
|
740
|
+
*/
|
|
741
|
+
this.determineHierarchyIndents();
|
|
742
|
+
if (this.getPropertyBag().isDisplayExceptions()) {
|
|
743
|
+
this.determineAlertSymbolDimensions();
|
|
744
|
+
}
|
|
745
|
+
var oRenderEngine = this.getRenderEngine();
|
|
746
|
+
oRenderEngine.setAdjustFrameDivs(this.bAdjustFrameDivs);
|
|
747
|
+
if (oRenderEngine.hasCrosstabSizeChanged()) {
|
|
748
|
+
this.ensurePageManager().resizeEvent();
|
|
749
|
+
}
|
|
750
|
+
if (this.oPropertyBag.hasToolbar()) {
|
|
751
|
+
var oToolbarDiv = jQuery(document.getElementById(this.getId() + "_toolbar"));
|
|
752
|
+
var iToolbarHeight = oToolbarDiv.outerHeight();
|
|
753
|
+
this.oPropertyBag.setToolbarHeight(iToolbarHeight);
|
|
754
|
+
}
|
|
755
|
+
// The sequence of this is important, think before changing it!
|
|
756
|
+
oRenderEngine.beginRendering();
|
|
757
|
+
// main rendering block
|
|
758
|
+
oRenderEngine.renderCrosstabAreas();
|
|
759
|
+
// adjustment
|
|
760
|
+
oRenderEngine.calculateRenderSizeDivSize();
|
|
761
|
+
if (!this.oPropertyBag.isPixelScrolling()) {
|
|
762
|
+
oRenderEngine.appendColumnsAfterResize();
|
|
763
|
+
oRenderEngine.appendRowsAfterResize();
|
|
764
|
+
}
|
|
765
|
+
if (this.bRenderScrollbars) {
|
|
766
|
+
oRenderEngine.renderScrollbars();
|
|
767
|
+
}
|
|
768
|
+
oRenderEngine.adjustRenderSizeDivSize();
|
|
769
|
+
if (this.bRenderScrollbars) {
|
|
770
|
+
oRenderEngine.setScrollbarSteps();
|
|
771
|
+
}
|
|
772
|
+
oRenderEngine.adjustScrollDivSizes();
|
|
773
|
+
if (!this.bRenderScrollbars) {
|
|
774
|
+
oRenderEngine.checkScrollbarSize();
|
|
775
|
+
}
|
|
776
|
+
oRenderEngine.adjustScrollPositions(this.bRenderScrollbars);
|
|
777
|
+
if (!this.oPropertyBag.isRtl()) {
|
|
778
|
+
if (!this.oPropertyBag.isPixelScrolling()) {
|
|
779
|
+
oRenderEngine.moveScrollDivs();
|
|
780
|
+
}
|
|
781
|
+
} else {
|
|
782
|
+
if (this.oPropertyBag.isPixelScrolling() && jQuery.browser.webkit) {
|
|
783
|
+
oRenderEngine.moveScrollDivs();
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
if (this.oHorizontalHeaderScrollbar && !this.bPreparedDom) {
|
|
787
|
+
oRenderEngine.updateHeaderScrollbarSizes();
|
|
788
|
+
}
|
|
789
|
+
oRenderEngine.updateHeaderResizeDiv();
|
|
790
|
+
if (this.getPropertyBag().isDragDropEnabled() === true && Utils.isDispatcherAvailable() === true) {
|
|
791
|
+
if (!this.oDragDropHandler) {
|
|
792
|
+
this.oDragDropHandler = new DragDropHandler(this, this.oDragDropCommands);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
oRenderEngine.finishRendering();
|
|
796
|
+
this.oEventHandler.attachEvents();
|
|
797
|
+
this.bOnAfterRendering = true;
|
|
798
|
+
this.bRenderScrollbars = true;
|
|
799
|
+
this.bAdjustFrameDivs = true;
|
|
800
|
+
this.bPreparedDom = false;
|
|
801
|
+
this.bWasRendered = true;
|
|
802
|
+
var bCalledByScrolling = this.bCalledByScrolling;
|
|
803
|
+
this.bCalledByScrolling = false;
|
|
804
|
+
var bScrollInvalidate = this.bScrollInvalidate;
|
|
805
|
+
this.bScrollInvalidate = false;
|
|
806
|
+
if (!bCalledByScrolling && !this.hasLoadingPages() && bScrollInvalidate === true) {
|
|
807
|
+
this.invalidate();
|
|
808
|
+
}
|
|
809
|
+
// Do not block sending requests after a bookmark (back processing) restore
|
|
810
|
+
if (!this.hasLoadingPages()) {
|
|
811
|
+
this.getPropertyBag().setBookmarkProcessing(false);
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
sap.zen.crosstab.Crosstab.prototype.setScrollInvalidate = function(bScrollInvalidate) {
|
|
815
|
+
this.bScrollInvalidate = bScrollInvalidate;
|
|
816
|
+
};
|
|
817
|
+
sap.zen.crosstab.Crosstab.prototype.isScrollInvalidate = function() {
|
|
818
|
+
return this.bScrollInvalidate;
|
|
819
|
+
};
|
|
820
|
+
sap.zen.crosstab.Crosstab.prototype.scrollHorizontal = function (iCol) {
|
|
821
|
+
this.oRenderEngine.scrollHorizontal(iCol);
|
|
822
|
+
};
|
|
823
|
+
sap.zen.crosstab.Crosstab.prototype.scrollVertical = function (iRow) {
|
|
824
|
+
this.oRenderEngine.scrollVertical(iRow);
|
|
825
|
+
};
|
|
826
|
+
sap.zen.crosstab.Crosstab.prototype.scrollHeaderHorizontal = function (iPos) {
|
|
827
|
+
this.oRenderEngine.scrollHeaderHorizontal(iPos);
|
|
828
|
+
};
|
|
829
|
+
sap.zen.crosstab.Crosstab.prototype.getVScrollPos = function () {
|
|
830
|
+
var iVScrollPos = -1;
|
|
831
|
+
if (this.oVScrollbar) {
|
|
832
|
+
iVScrollPos = this.oVScrollbar.getScrollPosition();
|
|
833
|
+
}
|
|
834
|
+
return iVScrollPos;
|
|
835
|
+
};
|
|
836
|
+
sap.zen.crosstab.Crosstab.prototype.getHScrollPos = function () {
|
|
837
|
+
var iHScrollPos = -1;
|
|
838
|
+
if (this.oHScrollbar) {
|
|
839
|
+
iHScrollPos = this.oHScrollbar.getScrollPosition();
|
|
840
|
+
}
|
|
841
|
+
return iHScrollPos;
|
|
842
|
+
};
|
|
843
|
+
sap.zen.crosstab.Crosstab.prototype.renderResizeOutline = function () {
|
|
844
|
+
this.oRenderEngine.renderResizeOutline();
|
|
845
|
+
};
|
|
846
|
+
sap.zen.crosstab.Crosstab.prototype.removeResizeOutline = function () {
|
|
847
|
+
this.oRenderEngine.removeResizeOutline();
|
|
848
|
+
};
|
|
849
|
+
sap.zen.crosstab.Crosstab.prototype.registerPageRequestHandler = function (fHandler) {
|
|
850
|
+
this.fPageRequestHandler = fHandler;
|
|
851
|
+
};
|
|
852
|
+
sap.zen.crosstab.Crosstab.prototype.unregisterPageRequestHandler = function () {
|
|
853
|
+
this.fPageRequestHandler = null;
|
|
854
|
+
};
|
|
855
|
+
sap.zen.crosstab.Crosstab.prototype.getPageRequestHandler = function () {
|
|
856
|
+
return this.fPageRequestHandler;
|
|
857
|
+
};
|
|
858
|
+
sap.zen.crosstab.Crosstab.prototype.getReceivedPages = function () {
|
|
859
|
+
return this.ensurePageManager().getReceivedPages();
|
|
860
|
+
};
|
|
861
|
+
sap.zen.crosstab.Crosstab.prototype.getHierarchyIndentWidth = function () {
|
|
862
|
+
return this.iHierarchyIndentWidth;
|
|
863
|
+
};
|
|
864
|
+
sap.zen.crosstab.Crosstab.prototype.getExceptionSymbolWidth = function () {
|
|
865
|
+
return this.iExceptionSymbolWidth;
|
|
866
|
+
};
|
|
867
|
+
sap.zen.crosstab.Crosstab.prototype.getHierarchyIndentHeight = function () {
|
|
868
|
+
return this.iHierarchyIndentHeight;
|
|
869
|
+
};
|
|
870
|
+
sap.zen.crosstab.Crosstab.prototype.hideLoadingIndicator = function () {
|
|
871
|
+
this.oRenderEngine.hideLoadingIndicator();
|
|
872
|
+
};
|
|
873
|
+
sap.zen.crosstab.Crosstab.prototype.showLoadingIndicator = function () {
|
|
874
|
+
this.oRenderEngine.showLoadingIndicator();
|
|
875
|
+
};
|
|
876
|
+
sap.zen.crosstab.Crosstab.prototype.setHCutOff = function (bHCutOff) {
|
|
877
|
+
this.bHCutOff = bHCutOff;
|
|
878
|
+
};
|
|
879
|
+
sap.zen.crosstab.Crosstab.prototype.isHCutOff = function () {
|
|
880
|
+
return this.bHCutOff;
|
|
881
|
+
};
|
|
882
|
+
sap.zen.crosstab.Crosstab.prototype.setVCutOff = function (bVCutOff) {
|
|
883
|
+
this.bVCutOff = bVCutOff;
|
|
884
|
+
};
|
|
885
|
+
sap.zen.crosstab.Crosstab.prototype.isVCutOff = function () {
|
|
886
|
+
return this.bVCutOff;
|
|
887
|
+
};
|
|
888
|
+
sap.zen.crosstab.Crosstab.prototype.getTotalRows = function () {
|
|
889
|
+
return this.iTotalRowCnt;
|
|
890
|
+
};
|
|
891
|
+
sap.zen.crosstab.Crosstab.prototype.getTotalCols = function () {
|
|
892
|
+
return this.iTotalColCnt;
|
|
893
|
+
};
|
|
894
|
+
sap.zen.crosstab.Crosstab.prototype.setTotalCols = function (iColCnt) {
|
|
895
|
+
this.iTotalColCnt = iColCnt;
|
|
896
|
+
};
|
|
897
|
+
sap.zen.crosstab.Crosstab.prototype.setTotalRows = function (iRowCnt) {
|
|
898
|
+
this.iTotalRowCnt = iRowCnt;
|
|
899
|
+
};
|
|
900
|
+
sap.zen.crosstab.Crosstab.prototype.setHScrollbar = function (oHScrollbar) {
|
|
901
|
+
this.oHScrollbar = oHScrollbar;
|
|
902
|
+
};
|
|
903
|
+
sap.zen.crosstab.Crosstab.prototype.setVScrollbar = function (oVScrollbar) {
|
|
904
|
+
this.oVScrollbar = oVScrollbar;
|
|
905
|
+
};
|
|
906
|
+
sap.zen.crosstab.Crosstab.prototype.getVScrollbar = function () {
|
|
907
|
+
return this.oVScrollbar;
|
|
908
|
+
};
|
|
909
|
+
sap.zen.crosstab.Crosstab.prototype.getHScrollbar = function () {
|
|
910
|
+
return this.oHScrollbar;
|
|
911
|
+
};
|
|
912
|
+
sap.zen.crosstab.Crosstab.prototype.getTestProxy = function () {
|
|
913
|
+
return this.oTestProxy;
|
|
914
|
+
};
|
|
915
|
+
sap.zen.crosstab.Crosstab.prototype.setOnSelectCommand = function (sOnSelectCommand) {
|
|
916
|
+
this.sOnSelectCommand = sOnSelectCommand;
|
|
917
|
+
};
|
|
918
|
+
sap.zen.crosstab.Crosstab.prototype.getOnSelectCommand = function () {
|
|
919
|
+
return this.sOnSelectCommand;
|
|
920
|
+
};
|
|
921
|
+
sap.zen.crosstab.Crosstab.prototype.setTransferDataCommand = function (sTransferDataCommand) {
|
|
922
|
+
this.sTransferDataCommand = sTransferDataCommand;
|
|
923
|
+
};
|
|
924
|
+
sap.zen.crosstab.Crosstab.prototype.getTransferDataCommand = function () {
|
|
925
|
+
return this.sTransferDataCommand;
|
|
926
|
+
};
|
|
927
|
+
sap.zen.crosstab.Crosstab.prototype.setCallValueHelpCommand = function (sCallValueHelpCommand) {
|
|
928
|
+
this.sCallValueHelpCommand = sCallValueHelpCommand;
|
|
929
|
+
};
|
|
930
|
+
sap.zen.crosstab.Crosstab.prototype.getCallValueHelpCommand = function () {
|
|
931
|
+
return this.sCallValueHelpCommand;
|
|
932
|
+
};
|
|
933
|
+
sap.zen.crosstab.Crosstab.prototype.getRenderMode = function () {
|
|
934
|
+
return this.iRenderMode;
|
|
935
|
+
};
|
|
936
|
+
sap.zen.crosstab.Crosstab.prototype.getUtils = function () {
|
|
937
|
+
return this.oUtils;
|
|
938
|
+
};
|
|
939
|
+
sap.zen.crosstab.Crosstab.prototype.getDataArea = function () {
|
|
940
|
+
return this.dataArea;
|
|
941
|
+
};
|
|
942
|
+
sap.zen.crosstab.Crosstab.prototype.getDimensionHeaderArea = function () {
|
|
943
|
+
return this.dimensionHeaderArea;
|
|
944
|
+
};
|
|
945
|
+
sap.zen.crosstab.Crosstab.prototype.getColumnHeaderArea = function () {
|
|
946
|
+
return this.columnHeaderArea;
|
|
947
|
+
};
|
|
948
|
+
sap.zen.crosstab.Crosstab.prototype.getRowHeaderArea = function () {
|
|
949
|
+
return this.rowHeaderArea;
|
|
950
|
+
};
|
|
951
|
+
sap.zen.crosstab.Crosstab.prototype.getRenderEngine = function () {
|
|
952
|
+
return this.oRenderEngine;
|
|
953
|
+
};
|
|
954
|
+
sap.zen.crosstab.Crosstab.prototype.hResize = function () {
|
|
955
|
+
return this.isHResize;
|
|
956
|
+
};
|
|
957
|
+
sap.zen.crosstab.Crosstab.prototype.vResize = function () {
|
|
958
|
+
return this.isVResize;
|
|
959
|
+
};
|
|
960
|
+
sap.zen.crosstab.Crosstab.prototype.getPageManager = function () {
|
|
961
|
+
return this.oPageManager;
|
|
962
|
+
};
|
|
963
|
+
sap.zen.crosstab.Crosstab.prototype.isRenderScrollbars = function () {
|
|
964
|
+
return this.bRenderScrollbars;
|
|
965
|
+
};
|
|
966
|
+
sap.zen.crosstab.Crosstab.prototype.getPropertyBag = function () {
|
|
967
|
+
return this.oPropertyBag;
|
|
968
|
+
};
|
|
969
|
+
sap.zen.crosstab.Crosstab.prototype.hasToolbar = function () {
|
|
970
|
+
return this.bHasToolbar;
|
|
971
|
+
};
|
|
972
|
+
sap.zen.crosstab.Crosstab.prototype.setColHeaderHierarchyLevels = function (oLevels) {
|
|
973
|
+
this.oColHeaderHierarchyLevels = oLevels;
|
|
974
|
+
};
|
|
975
|
+
sap.zen.crosstab.Crosstab.prototype.getColHeaderHierarchyLevels = function () {
|
|
976
|
+
return this.oColHeaderHierarchyLevels;
|
|
977
|
+
};
|
|
978
|
+
sap.zen.crosstab.Crosstab.prototype.setRowHeaderHierarchyLevels = function (oLevels) {
|
|
979
|
+
this.oRowHeaderHierarchyLevels = oLevels;
|
|
980
|
+
};
|
|
981
|
+
sap.zen.crosstab.Crosstab.prototype.getRowHeaderHierarchyLevels = function () {
|
|
982
|
+
return this.oRowHeaderHierarchyLevels;
|
|
983
|
+
};
|
|
984
|
+
sap.zen.crosstab.Crosstab.prototype.isIE8Mode = function () {
|
|
985
|
+
return this.oRenderEngine.isIE8Mode();
|
|
986
|
+
};
|
|
987
|
+
sap.zen.crosstab.Crosstab.prototype.hasDimensionHeaderArea = function () {
|
|
988
|
+
var bResult = false;
|
|
989
|
+
if (this.dimensionHeaderArea !== undefined) {
|
|
990
|
+
bResult = (this.dimensionHeaderArea.getColCnt() > 0 && this.dimensionHeaderArea.getRowCnt() > 0);
|
|
991
|
+
}
|
|
992
|
+
return bResult;
|
|
993
|
+
};
|
|
994
|
+
sap.zen.crosstab.Crosstab.prototype.hasRowHeaderArea = function () {
|
|
995
|
+
var bResult = false;
|
|
996
|
+
if (this.rowHeaderArea !== undefined) {
|
|
997
|
+
bResult = (this.rowHeaderArea.getColCnt() > 0 && this.rowHeaderArea.getRowCnt() > 0);
|
|
998
|
+
}
|
|
999
|
+
return bResult;
|
|
1000
|
+
};
|
|
1001
|
+
sap.zen.crosstab.Crosstab.prototype.hasColHeaderArea = function () {
|
|
1002
|
+
var bResult = false;
|
|
1003
|
+
if (this.columnHeaderArea !== undefined) {
|
|
1004
|
+
bResult = (this.columnHeaderArea.getColCnt() > 0 && this.columnHeaderArea.getRowCnt() > 0);
|
|
1005
|
+
}
|
|
1006
|
+
return bResult;
|
|
1007
|
+
};
|
|
1008
|
+
sap.zen.crosstab.Crosstab.prototype.hasDataArea = function () {
|
|
1009
|
+
var bResult = false;
|
|
1010
|
+
if (this.dataArea !== undefined) {
|
|
1011
|
+
bResult = (this.dataArea.getColCnt() > 0 && this.dataArea.getRowCnt() > 0);
|
|
1012
|
+
}
|
|
1013
|
+
return bResult;
|
|
1014
|
+
};
|
|
1015
|
+
sap.zen.crosstab.Crosstab.prototype.restoreFocusOnCell = function () {
|
|
1016
|
+
this.oEventHandler.restoreFocusOnCell();
|
|
1017
|
+
};
|
|
1018
|
+
// Cell API
|
|
1019
|
+
sap.zen.crosstab.Crosstab.prototype.getTableCell = function (iTableRow, iTableCol) {
|
|
1020
|
+
return this.oCellApi.getTableCell(iTableRow, iTableCol);
|
|
1021
|
+
};
|
|
1022
|
+
sap.zen.crosstab.Crosstab.prototype.getTableCellWithSpans = function (iRow, iCol) {
|
|
1023
|
+
return this.oCellApi.getTableCellWithSpans(iRow, iCol);
|
|
1024
|
+
};
|
|
1025
|
+
sap.zen.crosstab.Crosstab.prototype.getTableCellWithColSpan = function (iRow, iCol) {
|
|
1026
|
+
return this.oCellApi.getTableCellWithColSpan(iRow, iCol);
|
|
1027
|
+
};
|
|
1028
|
+
sap.zen.crosstab.Crosstab.prototype.getTableCellWithRowSpan = function (iRow, iCol) {
|
|
1029
|
+
return this.oCellApi.getTableCellWithRowSpan(iRow, iCol);
|
|
1030
|
+
};
|
|
1031
|
+
sap.zen.crosstab.Crosstab.prototype.getTableRowCnt = function () {
|
|
1032
|
+
return this.oCellApi.getTableRowCnt();
|
|
1033
|
+
};
|
|
1034
|
+
sap.zen.crosstab.Crosstab.prototype.getTableColCnt = function () {
|
|
1035
|
+
return this.oCellApi.getTableColCnt();
|
|
1036
|
+
};
|
|
1037
|
+
sap.zen.crosstab.Crosstab.prototype.getTableFixedRowHeaderColCnt = function () {
|
|
1038
|
+
return this.oCellApi.getTableFixedRowHeaderColCnt();
|
|
1039
|
+
};
|
|
1040
|
+
sap.zen.crosstab.Crosstab.prototype.getTableFixedColHeaderRowCnt = function () {
|
|
1041
|
+
return this.oCellApi.getTableFixedColHeaderRowCnt();
|
|
1042
|
+
};
|
|
1043
|
+
sap.zen.crosstab.Crosstab.prototype.getTableMaxScrollColCnt = function () {
|
|
1044
|
+
return this.oCellApi.getTableMaxScrollColCnt();
|
|
1045
|
+
};
|
|
1046
|
+
sap.zen.crosstab.Crosstab.prototype.getTableMaxScrollRowCnt = function () {
|
|
1047
|
+
return this.oCellApi.getTableMaxScrollRowCnt();
|
|
1048
|
+
};
|
|
1049
|
+
sap.zen.crosstab.Crosstab.prototype.getTableMaxDimHeaderRow = function() {
|
|
1050
|
+
return this.oCellApi.getTableMaxDimHeaderRow();
|
|
1051
|
+
};
|
|
1052
|
+
sap.zen.crosstab.Crosstab.prototype.getTableMaxDimHeaderCol = function() {
|
|
1053
|
+
return this.oCellApi.getTableMaxDimHeaderCol();
|
|
1054
|
+
};
|
|
1055
|
+
sap.zen.crosstab.Crosstab.prototype.setCellApi = function (poCellApi) {
|
|
1056
|
+
this.oCellApi = poCellApi;
|
|
1057
|
+
};
|
|
1058
|
+
sap.zen.crosstab.Crosstab.prototype.hasLoadingPages = function () {
|
|
1059
|
+
return this.dataArea.hasLoadingPages() || this.rowHeaderArea.hasLoadingPages()
|
|
1060
|
+
|| this.columnHeaderArea.hasLoadingPages();
|
|
1061
|
+
};
|
|
1062
|
+
sap.zen.crosstab.Crosstab.prototype.getRenderRowCnt = function () {
|
|
1063
|
+
if (this.dataArea) {
|
|
1064
|
+
return this.dataArea.getRenderRowCnt();
|
|
1065
|
+
} else if (this.rowHeaderArea) {
|
|
1066
|
+
return this.rowHeaderArea.getRenderRowCnt();
|
|
1067
|
+
}
|
|
1068
|
+
};
|
|
1069
|
+
sap.zen.crosstab.Crosstab.prototype.getRenderStartRow = function () {
|
|
1070
|
+
if (this.dataArea) {
|
|
1071
|
+
return this.dataArea.getRenderStartRow();
|
|
1072
|
+
} else if (this.rowHeaderArea) {
|
|
1073
|
+
return this.rowHeaderArea.getRenderStartRow();
|
|
1074
|
+
}
|
|
1075
|
+
return null;
|
|
1076
|
+
};
|
|
1077
|
+
sap.zen.crosstab.Crosstab.prototype.getRenderColCnt = function () {
|
|
1078
|
+
if (this.dataArea) {
|
|
1079
|
+
return this.dataArea.getRenderColCnt();
|
|
1080
|
+
} else if (this.columnHeaderArea) {
|
|
1081
|
+
return this.columnHeaderArea.getRenderColCnt();
|
|
1082
|
+
}
|
|
1083
|
+
return null;
|
|
1084
|
+
};
|
|
1085
|
+
sap.zen.crosstab.Crosstab.prototype.getRenderStartCol = function () {
|
|
1086
|
+
if (this.dataArea) {
|
|
1087
|
+
return this.dataArea.getRenderStartCol();
|
|
1088
|
+
} else if (this.columnHeaderArea) {
|
|
1089
|
+
return this.columnHeaderArea.getRenderStartCol();
|
|
1090
|
+
}
|
|
1091
|
+
return null;
|
|
1092
|
+
};
|
|
1093
|
+
sap.zen.crosstab.Crosstab.prototype.setNewLinesCnt = function (iNewLinesCnt) {
|
|
1094
|
+
this.iNewLinesCnt = iNewLinesCnt;
|
|
1095
|
+
};
|
|
1096
|
+
sap.zen.crosstab.Crosstab.prototype.getNewLinesCnt = function () {
|
|
1097
|
+
return this.iNewLinesCnt;
|
|
1098
|
+
};
|
|
1099
|
+
sap.zen.crosstab.Crosstab.prototype.setNewLinesPos = function (sNewLinesPos) {
|
|
1100
|
+
this.sNewLinesPos = sNewLinesPos;
|
|
1101
|
+
};
|
|
1102
|
+
sap.zen.crosstab.Crosstab.prototype.getNewLinesPos = function () {
|
|
1103
|
+
return this.sNewLinesPos;
|
|
1104
|
+
};
|
|
1105
|
+
sap.zen.crosstab.Crosstab.prototype.isNewLinesTop = function () {
|
|
1106
|
+
if (!this.sNewLinesPos) {
|
|
1107
|
+
return false;
|
|
1108
|
+
}
|
|
1109
|
+
return (this.sNewLinesPos === "TOP");
|
|
1110
|
+
};
|
|
1111
|
+
sap.zen.crosstab.Crosstab.prototype.isNewLinesBottom = function () {
|
|
1112
|
+
if (!this.sNewLinesPos) {
|
|
1113
|
+
return false;
|
|
1114
|
+
}
|
|
1115
|
+
return (this.sNewLinesPos === "BOTTOM");
|
|
1116
|
+
};
|
|
1117
|
+
sap.zen.crosstab.Crosstab.prototype.setScrollNotifyCommand = function (sScrollNotifyCommand) {
|
|
1118
|
+
this.sScrollNotifyCommand = sScrollNotifyCommand;
|
|
1119
|
+
};
|
|
1120
|
+
sap.zen.crosstab.Crosstab.prototype.getScrollNotifyCommand = function () {
|
|
1121
|
+
return this.sScrollNotifyCommand;
|
|
1122
|
+
};
|
|
1123
|
+
sap.zen.crosstab.Crosstab.prototype.getContextMenuAction = function (sContextMenuComponentId, oDomClickedElement) {
|
|
1124
|
+
var fAction = null;
|
|
1125
|
+
if (this.oContextMenu) {
|
|
1126
|
+
fAction = this.oContextMenu.getContextMenuAction(sContextMenuComponentId, oDomClickedElement);
|
|
1127
|
+
}
|
|
1128
|
+
return fAction;
|
|
1129
|
+
};
|
|
1130
|
+
sap.zen.crosstab.Crosstab.prototype.createContextMenu = function () {
|
|
1131
|
+
if (!this.oContextMenu) {
|
|
1132
|
+
this.oContextMenu = new CrosstabContextMenu(this);
|
|
1133
|
+
}
|
|
1134
|
+
};
|
|
1135
|
+
sap.zen.crosstab.Crosstab.prototype.setValueHelpStatus = function(iValueHelpStatus) {
|
|
1136
|
+
this.iValueHelpStatus = iValueHelpStatus;
|
|
1137
|
+
};
|
|
1138
|
+
sap.zen.crosstab.Crosstab.prototype.getValueHelpStatus = function() {
|
|
1139
|
+
return this.iValueHelpStatus;
|
|
1140
|
+
};
|
|
1141
|
+
sap.zen.crosstab.Crosstab.prototype.getHorizontalHeaderScrollbar = function() {
|
|
1142
|
+
return this.oHorizontalHeaderScrollbar;
|
|
1143
|
+
};
|
|
1144
|
+
sap.zen.crosstab.Crosstab.prototype.setHorizontalHeaderScrollbar = function(oHorizontalHeaderScrollbar) {
|
|
1145
|
+
this.oHorizontalHeaderScrollbar = oHorizontalHeaderScrollbar;
|
|
1146
|
+
};
|
|
1147
|
+
sap.zen.crosstab.Crosstab.prototype.setHeaderHScrolling = function(bHeaderHScrolling) {
|
|
1148
|
+
this.bHeaderHScrolling = bHeaderHScrolling;
|
|
1149
|
+
if (!this.bHeaderHScrolling) {
|
|
1150
|
+
this.oHorizontalHeaderScrollbar = null;
|
|
1151
|
+
}
|
|
1152
|
+
};
|
|
1153
|
+
sap.zen.crosstab.Crosstab.prototype.isHeaderHScrolling = function() {
|
|
1154
|
+
return this.bHeaderHScrolling;
|
|
1155
|
+
};
|
|
1156
|
+
sap.zen.crosstab.Crosstab.prototype.setUserHeaderWidthCommand = function(sUserHeaderWidthCommand) {
|
|
1157
|
+
this.sUserHeaderWidthCommand = sUserHeaderWidthCommand;
|
|
1158
|
+
};
|
|
1159
|
+
sap.zen.crosstab.Crosstab.prototype.getUserHeaderWidthCommand = function() {
|
|
1160
|
+
return this.sUserHeaderWidthCommand;
|
|
1161
|
+
};
|
|
1162
|
+
sap.zen.crosstab.Crosstab.prototype.isUserHeaderResizeAllowed = function() {
|
|
1163
|
+
return this.bIsUserHeaderResizeAllowed;
|
|
1164
|
+
};
|
|
1165
|
+
sap.zen.crosstab.Crosstab.prototype.setUserHeaderResizeAllowed = function(bIsUserHeaderResizeAllowed) {
|
|
1166
|
+
this.bIsUserHeaderResizeAllowed = bIsUserHeaderResizeAllowed;
|
|
1167
|
+
};
|
|
1168
|
+
sap.zen.crosstab.Crosstab.prototype.setHeaderScrollingConfigured = function(bIsHeaderScrollingConfigured) {
|
|
1169
|
+
this.bIsHeaderScrollingConfigured = bIsHeaderScrollingConfigured;
|
|
1170
|
+
};
|
|
1171
|
+
sap.zen.crosstab.Crosstab.prototype.isHeaderScrollingConfigured = function() {
|
|
1172
|
+
return this.bIsHeaderScrollingConfigured;
|
|
1173
|
+
};
|
|
1174
|
+
sap.zen.crosstab.Crosstab.prototype.isPreparedDom = function() {
|
|
1175
|
+
return this.bPreparedDom;
|
|
1176
|
+
};
|
|
1177
|
+
sap.zen.crosstab.Crosstab.prototype.getSelectionHandler = function() {
|
|
1178
|
+
if(!this.oSelectionHandler && this.sSelectionMode !== undefined && this.sSelectionMode !== ""){
|
|
1179
|
+
this.oSelectionHandler = new SelectionHandler(this);
|
|
1180
|
+
}
|
|
1181
|
+
return this.oSelectionHandler;
|
|
1182
|
+
};
|
|
1183
|
+
sap.zen.crosstab.Crosstab.prototype.initHeaderInfo = function(oHeaderInfo) {
|
|
1184
|
+
this.oHeaderInfo = new CrosstabHeaderInfo(this, oHeaderInfo);
|
|
1185
|
+
};
|
|
1186
|
+
sap.zen.crosstab.Crosstab.prototype.getHeaderInfo = function() {
|
|
1187
|
+
return this.oHeaderInfo;
|
|
1188
|
+
};
|
|
1189
|
+
sap.zen.crosstab.Crosstab.prototype.setSelectionProperties = function(sSelectionMode, sSelectionSpace, bDisableHoverEffect, bSingleOnSelectEvent) {
|
|
1190
|
+
this.sSelectionMode = sSelectionMode;
|
|
1191
|
+
this.sSelectionSpace = sSelectionSpace;
|
|
1192
|
+
if (!bDisableHoverEffect) {
|
|
1193
|
+
this.bEnableHoverEffect = true;
|
|
1194
|
+
} else {
|
|
1195
|
+
this.bEnableHoverEffect = false;
|
|
1196
|
+
}
|
|
1197
|
+
this.getPropertyBag().setFireOnSelectedOnlyOnce(bSingleOnSelectEvent);
|
|
1198
|
+
};
|
|
1199
|
+
sap.zen.crosstab.Crosstab.prototype.getSelectionMode = function() {
|
|
1200
|
+
return this.sSelectionMode;
|
|
1201
|
+
};
|
|
1202
|
+
sap.zen.crosstab.Crosstab.prototype.getSelectionSpace = function() {
|
|
1203
|
+
return this.sSelectionSpace;
|
|
1204
|
+
};
|
|
1205
|
+
sap.zen.crosstab.Crosstab.prototype.isHoveringEnabled = function() {
|
|
1206
|
+
return this.bEnableHoverEffect;
|
|
1207
|
+
};
|
|
1208
|
+
sap.zen.crosstab.Crosstab.prototype.isPlanningMode = function() {
|
|
1209
|
+
return (this.getTransferDataCommand() && this.getTransferDataCommand() !== "");
|
|
1210
|
+
};
|
|
1211
|
+
sap.zen.crosstab.Crosstab.prototype.isSelectable = function() {
|
|
1212
|
+
return (this.oSelectionHandler && this.sSelectionMode !== undefined && this.sSelectionMode !== "");
|
|
1213
|
+
};
|
|
1214
|
+
sap.zen.crosstab.Crosstab.prototype.isQueueHeaderWidthRequest = function() {
|
|
1215
|
+
return this.bQueueHeaderWidthRequest;
|
|
1216
|
+
};
|
|
1217
|
+
sap.zen.crosstab.Crosstab.prototype.setQueueHeaderWidthRequest = function(bQueueIt) {
|
|
1218
|
+
this.bQueueHeaderWidthRequest = bQueueIt;
|
|
1219
|
+
};
|
|
1220
|
+
sap.zen.crosstab.Crosstab.prototype.postPlanningValue = function() {
|
|
1221
|
+
return this.oEventHandler.postPlanningValue();
|
|
1222
|
+
};
|
|
1223
|
+
sap.zen.crosstab.Crosstab.prototype.setDragAction = function(bDragAction) {
|
|
1224
|
+
this.bDragAction = bDragAction;
|
|
1225
|
+
if (this.oSelectionHandler) {
|
|
1226
|
+
this.oSelectionHandler.blockSelectionHovering(bDragAction);
|
|
1227
|
+
}
|
|
1228
|
+
};
|
|
1229
|
+
sap.zen.crosstab.Crosstab.prototype.isDragAction = function() {
|
|
1230
|
+
return this.bDragAction;
|
|
1231
|
+
};
|
|
1232
|
+
sap.zen.crosstab.Crosstab.prototype.onUnhandledDrop = function(e, ui, oPayload) {
|
|
1233
|
+
this.oDragDropHandler.onUnhandledDrop(e, ui, oPayload);
|
|
1234
|
+
};
|
|
1235
|
+
sap.zen.crosstab.Crosstab.prototype.onEscKeyPressed = function() {
|
|
1236
|
+
this.oDragDropHandler.onEscKeyPressed();
|
|
1237
|
+
};
|
|
1238
|
+
sap.zen.crosstab.Crosstab.prototype.setDragDropCommands = function(oDragDropCommands) {
|
|
1239
|
+
this.oDragDropCommands = oDragDropCommands;
|
|
1240
|
+
};
|
|
1241
|
+
sap.zen.crosstab.Crosstab.prototype.getDragDropHandler = function() {
|
|
1242
|
+
return this.oDragDropHandler;
|
|
1243
|
+
};
|
|
1244
|
+
sap.zen.crosstab.Crosstab.prototype.getRenderSizeDiv = function() {
|
|
1245
|
+
return jQuery(document.getElementById(this.getId() + "_renderSizeDiv"));
|
|
1246
|
+
};
|
|
1247
|
+
sap.zen.crosstab.Crosstab.prototype.getRowHeaderAreaDiv = function() {
|
|
1248
|
+
return jQuery(document.getElementById(this.getId() + "_lowerLeft_scrollDiv"));
|
|
1249
|
+
};
|
|
1250
|
+
sap.zen.crosstab.Crosstab.prototype.getColHeaderAreaDiv = function() {
|
|
1251
|
+
return jQuery(document.getElementById(this.getId() + "_upperRight_scrollDiv"));
|
|
1252
|
+
};
|
|
1253
|
+
sap.zen.crosstab.Crosstab.prototype.getDimHeaderAreaDiv = function() {
|
|
1254
|
+
return jQuery(document.getElementById(this.getId() + "_upperLeft_scrollDiv"));
|
|
1255
|
+
};
|
|
1256
|
+
sap.zen.crosstab.Crosstab.prototype.isVScrolling = function() {
|
|
1257
|
+
var bIsScrolling = false;
|
|
1258
|
+
var oVisibility = this.oRenderEngine.getScrollbarVisibility();
|
|
1259
|
+
if (oVisibility) {
|
|
1260
|
+
bIsScrolling = oVisibility.bHasVScrollbar;
|
|
1261
|
+
}
|
|
1262
|
+
return bIsScrolling;
|
|
1263
|
+
};
|
|
1264
|
+
sap.zen.crosstab.Crosstab.prototype.isHScrolling = function() {
|
|
1265
|
+
var bIsScrolling = false;
|
|
1266
|
+
var oVisibility = this.oRenderEngine.getScrollbarVisibility();
|
|
1267
|
+
if (oVisibility) {
|
|
1268
|
+
bIsScrolling = oVisibility.bHasHScrollbar;
|
|
1269
|
+
}
|
|
1270
|
+
return bIsScrolling;
|
|
1271
|
+
};
|
|
1272
|
+
sap.zen.crosstab.Crosstab.prototype.getGlassPane = function() {
|
|
1273
|
+
return jQuery(document.getElementById(this.getId() + "_glassPane"));
|
|
1274
|
+
};
|
|
1275
|
+
sap.zen.crosstab.Crosstab.prototype.block = function() {
|
|
1276
|
+
var oJqGlassPane;
|
|
1277
|
+
this.bIsBlocked = true;
|
|
1278
|
+
oJqGlassPane = this.getGlassPane();
|
|
1279
|
+
oJqGlassPane.css("visibility", "visible");
|
|
1280
|
+
};
|
|
1281
|
+
sap.zen.crosstab.Crosstab.prototype.unblock = function() {
|
|
1282
|
+
var oJqGlassPane;
|
|
1283
|
+
if (!this.hasLoadingPages()) {
|
|
1284
|
+
oJqGlassPane = this.getGlassPane();
|
|
1285
|
+
oJqGlassPane.css("visibility", "hidden");
|
|
1286
|
+
this.bIsBlocked = false;
|
|
1287
|
+
}
|
|
1288
|
+
};
|
|
1289
|
+
sap.zen.crosstab.Crosstab.prototype.isBlocked = function() {
|
|
1290
|
+
return this.bIsBlocked;
|
|
1291
|
+
};
|
|
1292
|
+
sap.zen.crosstab.Crosstab.prototype.setHasData = function(bHasData) {
|
|
1293
|
+
this.bHasData = bHasData;
|
|
1294
|
+
};
|
|
1295
|
+
sap.zen.crosstab.Crosstab.prototype.hasData = function() {
|
|
1296
|
+
return this.bHasData;
|
|
1297
|
+
};
|
|
1298
|
+
sap.zen.crosstab.Crosstab.prototype.enableClick = function() {
|
|
1299
|
+
this.oEventHandler.enableClick();
|
|
1300
|
+
};
|
|
1301
|
+
sap.zen.crosstab.Crosstab.prototype.getColResizer = function() {
|
|
1302
|
+
return this.oEventHandler.getColResizer();
|
|
1303
|
+
};
|
|
1304
|
+
sap.zen.crosstab.Crosstab.prototype.setUpdateColWidthCommand = function (sCommand) {
|
|
1305
|
+
this.sUpdateColWidthCommand = sCommand;
|
|
1306
|
+
};
|
|
1307
|
+
sap.zen.crosstab.Crosstab.prototype.getUpdateColWidthCommand = function () {
|
|
1308
|
+
return this.sUpdateColWidthCommand;
|
|
1309
|
+
};
|
|
1310
|
+
sap.zen.crosstab.Crosstab.prototype.executeScrollSequence = function(aScrollActions) {
|
|
1311
|
+
// format of each entry: [ScrollType, ScrollPos, debugger (true/false) before executing current scroll operation, Timeout in ms before executing current scroll operation (optional, default 1000ms)]
|
|
1312
|
+
// example: [["H", 37, false, 1000], ["V", 20, false, 3000], ["V", 78, false]];
|
|
1313
|
+
// exmaple: call in debugger using:
|
|
1314
|
+
// sap.ui.getCore().byId(<CROSSTAB_ID>).executeScrollSequence([["H", 37, false, 1000], ["V", 20, true, 3000], ["V", 78, false]]);
|
|
1315
|
+
// debugger kicks in before executing V20, but after having waited 3000ms
|
|
1316
|
+
var iMaxCurrentScrollAction = aScrollActions.length - 1;
|
|
1317
|
+
var iCurrentScrollAction;
|
|
1318
|
+
var that = this;
|
|
1319
|
+
function doScrolling() {
|
|
1320
|
+
var aCurrentAction;
|
|
1321
|
+
var sScrollType;
|
|
1322
|
+
var iScrollPos;
|
|
1323
|
+
var iTimeout;
|
|
1324
|
+
if (iCurrentScrollAction <= iMaxCurrentScrollAction) {
|
|
1325
|
+
aCurrentAction = aScrollActions[iCurrentScrollAction];
|
|
1326
|
+
sScrollType = aCurrentAction[0];
|
|
1327
|
+
iScrollPos = aCurrentAction[1];
|
|
1328
|
+
if (aCurrentAction.length > 3) {
|
|
1329
|
+
iTimeout = aCurrentAction[3];
|
|
1330
|
+
} else {
|
|
1331
|
+
iTimeout = 1000;
|
|
1332
|
+
}
|
|
1333
|
+
setTimeout(function() {
|
|
1334
|
+
if (sScrollType === "H") {
|
|
1335
|
+
that.scrollHorizontal(iScrollPos);
|
|
1336
|
+
} else if (sScrollType === "V") {
|
|
1337
|
+
that.scrollVertical(iScrollPos);
|
|
1338
|
+
}
|
|
1339
|
+
iCurrentScrollAction++;
|
|
1340
|
+
doScrolling();
|
|
1341
|
+
}, iTimeout);
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
if (iMaxCurrentScrollAction >= 0) {
|
|
1345
|
+
iCurrentScrollAction = 0;
|
|
1346
|
+
doScrolling();
|
|
1347
|
+
}
|
|
1348
|
+
};
|
|
1349
|
+
return sap.zen.crosstab.Crosstab;
|
|
1350
|
+
}
|
|
1351
|
+
);
|