@sapui5/sap.zen.dsh 1.102.0 → 1.102.3
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
CHANGED
package/src/sap/zen/dsh/.library
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<vendor>SAP SE</vendor>
|
|
5
5
|
<copyright>SAPUI5
|
|
6
6
|
(c) Copyright 2009-2021 SAP SE. All rights reserved</copyright>
|
|
7
|
-
<version>1.102.
|
|
7
|
+
<version>1.102.3</version>
|
|
8
8
|
<documentation>Design Studio Runtime Library. Intended only to be used within S/4 HANA Fiori applications.</documentation>
|
|
9
9
|
<appData>
|
|
10
10
|
<jsdoc xmlns="http://www.sap.com/ui5/buildext/jsdoc" >
|
|
@@ -8523,7 +8523,7 @@ sap.zen.DataSourceInfo.prototype.initMe = function(oDataSource)
|
|
|
8523
8523
|
}
|
|
8524
8524
|
var loCubeInfo = loQueryModel.getCubeInfo();
|
|
8525
8525
|
this.mLastDataUpdate = null;
|
|
8526
|
-
if (loCubeInfo.getDataRollUpMin() !== null)
|
|
8526
|
+
if (loCubeInfo.getDataRollUpMin() !== null && loCubeInfo.getDataRollUpMin().getYear() > 0 && loCubeInfo.getDataRollUpMin().getMilliseconds() > 0)
|
|
8527
8527
|
{
|
|
8528
8528
|
this.mLastDataUpdate = loCubeInfo.getDataRollUpMin().toSAPFormat();
|
|
8529
8529
|
}
|
|
@@ -8532,7 +8532,7 @@ sap.zen.DataSourceInfo.prototype.initMe = function(oDataSource)
|
|
|
8532
8532
|
this.mLastDataUpdate = "";
|
|
8533
8533
|
}
|
|
8534
8534
|
this.mLastDataUpdateMaximum = null;
|
|
8535
|
-
if (loCubeInfo.getDataRollUpMax() !== null)
|
|
8535
|
+
if (loCubeInfo.getDataRollUpMax() !== null && loCubeInfo.getDataRollUpMax().getYear() > 0 && loCubeInfo.getDataRollUpMax().getMilliseconds() > 0)
|
|
8536
8536
|
{
|
|
8537
8537
|
this.mLastDataUpdateMaximum = loCubeInfo.getDataRollUpMax().toSAPFormat();
|
|
8538
8538
|
}
|
|
@@ -8541,7 +8541,7 @@ sap.zen.DataSourceInfo.prototype.initMe = function(oDataSource)
|
|
|
8541
8541
|
this.mLastDataUpdateMaximum = "";
|
|
8542
8542
|
}
|
|
8543
8543
|
this.mKeyDate = null;
|
|
8544
|
-
if (loCubeInfo.getDueDate() !== null)
|
|
8544
|
+
if (loCubeInfo.getDueDate() !== null && loCubeInfo.getDueDate().getYear() > 0 && loCubeInfo.getDueDate().getMilliseconds() > 0)
|
|
8545
8545
|
{
|
|
8546
8546
|
this.mKeyDate = loCubeInfo.getDueDate().toSAPFormat();
|
|
8547
8547
|
}
|
|
@@ -8555,7 +8555,7 @@ sap.zen.DataSourceInfo.prototype.initMe = function(oDataSource)
|
|
|
8555
8555
|
this.mCreatedBy = "";
|
|
8556
8556
|
}
|
|
8557
8557
|
this.mCreatedAt = null;
|
|
8558
|
-
if (loCubeInfo.getCreatedOn() !== null)
|
|
8558
|
+
if (loCubeInfo.getCreatedOn() !== null && loCubeInfo.getCreatedOn().getYear() > 0 && loCubeInfo.getCreatedOn().getMilliseconds() > 0)
|
|
8559
8559
|
{
|
|
8560
8560
|
this.mCreatedAt = loCubeInfo.getCreatedOn().toSAPFormat();
|
|
8561
8561
|
}
|
|
@@ -8569,7 +8569,7 @@ sap.zen.DataSourceInfo.prototype.initMe = function(oDataSource)
|
|
|
8569
8569
|
this.mLastChangedBy = "";
|
|
8570
8570
|
}
|
|
8571
8571
|
this.mLastChangedAt = null;
|
|
8572
|
-
if (loCubeInfo.getUpdatedOn() !== null)
|
|
8572
|
+
if (loCubeInfo.getUpdatedOn() !== null && loCubeInfo.getUpdatedOn().getYear() > 0 && loCubeInfo.getUpdatedOn().getMilliseconds() > 0)
|
|
8573
8573
|
{
|
|
8574
8574
|
this.mLastChangedAt = loCubeInfo.getUpdatedOn().toSAPFormat();
|
|
8575
8575
|
}
|
|
@@ -8583,7 +8583,7 @@ sap.zen.DataSourceInfo.prototype.initMe = function(oDataSource)
|
|
|
8583
8583
|
this.mLastRefreshedBy = "";
|
|
8584
8584
|
}
|
|
8585
8585
|
this.mLastRefreshedAt = null;
|
|
8586
|
-
if (loCubeInfo.getUpdatedOn() !== null)
|
|
8586
|
+
if (loCubeInfo.getUpdatedOn() !== null && loCubeInfo.getUpdatedOn().getYear() > 0 && loCubeInfo.getUpdatedOn().getMilliseconds() > 0)
|
|
8587
8587
|
{
|
|
8588
8588
|
this.mLastRefreshedAt = loCubeInfo.getUpdatedOn().toSAPFormat();
|
|
8589
8589
|
}
|
|
@@ -40166,7 +40166,7 @@ sap.zen.ContextMenuControl.prototype.buildSetHierarchyDrillLevelAction = functio
|
|
|
40166
40166
|
var lScriptAction = oFF.XStringUtils.concatenate2(oDimension.getDataSource().getName(), ".setRootExpandingLevel(");
|
|
40167
40167
|
lScriptAction = oFF.XStringUtils.concatenate4(lScriptAction, "'", oDimension.getName(), "'");
|
|
40168
40168
|
lScriptAction = oFF.XStringUtils.concatenate2(lScriptAction, ",");
|
|
40169
|
-
lScriptAction = oFF.XStringUtils.
|
|
40169
|
+
lScriptAction = oFF.XStringUtils.concatenate2(lScriptAction, level);
|
|
40170
40170
|
lScriptAction = oFF.XStringUtils.concatenate2(lScriptAction, ");");
|
|
40171
40171
|
lScriptAction = this.createScript(lScriptAction);
|
|
40172
40172
|
return lScriptAction;
|
|
@@ -31,7 +31,7 @@ sap.ui.define(
|
|
|
31
31
|
* @alias sap.zen.dsh
|
|
32
32
|
* @public
|
|
33
33
|
* @author SAP SE
|
|
34
|
-
* @version 1.102.
|
|
34
|
+
* @version 1.102.3
|
|
35
35
|
*/
|
|
36
36
|
var thisLib = sap.ui.getCore().initLibrary(
|
|
37
37
|
{
|
|
@@ -56,7 +56,7 @@ sap.ui.define(
|
|
|
56
56
|
],
|
|
57
57
|
elements: [],
|
|
58
58
|
noLibraryCSS: true,
|
|
59
|
-
version: "1.102.
|
|
59
|
+
version: "1.102.3"
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
62
|
|
|
@@ -465,7 +465,8 @@ sap.ui.define(
|
|
|
465
465
|
var ltFilterGroupItems = oFilterBar.getFilterGroupItems();
|
|
466
466
|
for (var i = 0; i < ltFilterGroupItems.length; i++) {
|
|
467
467
|
var loFilterControl = oFilterBar.determineControlByFilterItem(ltFilterGroupItems[i]);
|
|
468
|
-
if (loFilterControl && loFilterControl.ZEN_multiInput && loFilterControl.ZEN_multiInput[0] && loFilterControl.ZEN_multiInput[0].getTokens().length)
|
|
468
|
+
if ((loFilterControl && loFilterControl.ZEN_multiInput && loFilterControl.ZEN_multiInput[0] && loFilterControl.ZEN_multiInput[0].getTokens().length) ||
|
|
469
|
+
(loFilterControl && Object.values(loFilterControl.getModel().getProperty("/filters"))[0].ranges.length > 0)) {
|
|
469
470
|
ltFiltersWithValue.push(ltFilterGroupItems[i]);
|
|
470
471
|
}
|
|
471
472
|
}
|
|
@@ -19,198 +19,10 @@ sap.ui.define(
|
|
|
19
19
|
var oJqCurrentDraggable;
|
|
20
20
|
var oJqCurrentSortable;
|
|
21
21
|
BaseHandler.apply(this, arguments);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
jQuery(oSplitter.getDomRef()).find("[tabIndex='-1']").attr("tabIndex","0");
|
|
27
|
-
};
|
|
28
|
-
oSplitter.oSplitterConfig = oConfig;
|
|
29
|
-
if (oConfig.splitterOrientation === "Horizontal") {
|
|
30
|
-
oSplitter.setOrientation(sap.ui.core.Orientation.Vertical);
|
|
31
|
-
}
|
|
32
|
-
//wrap methods for adding content areas to the splitter control
|
|
33
|
-
oSplitter.addFirstPaneContent = function(oControl) {
|
|
34
|
-
oSplitter.addContentArea(oControl);
|
|
35
|
-
// set initial default width
|
|
36
|
-
oControl.getLayoutData().setMinSize(oSplitter.oSplitterConfig.minSizeFirstPane);
|
|
37
|
-
oControl.getLayoutData().setSize(oSplitter.oSplitterConfig.splitterPosition);
|
|
38
|
-
};
|
|
39
|
-
oSplitter.addSecondPaneContent = function(oControl) {
|
|
40
|
-
oSplitter.addContentArea(oControl);
|
|
41
|
-
// set initial default width
|
|
42
|
-
oControl.getLayoutData().setMinSize(oSplitter.oSplitterConfig.minSizeSecondPane);
|
|
43
|
-
oControl.getLayoutData().setSize("auto"); // depends on splitterPosition valid for 1st content area
|
|
44
|
-
};
|
|
45
|
-
return oSplitter;
|
|
46
|
-
};
|
|
47
|
-
this.updateSplitter = function(oSplitter) {
|
|
48
|
-
if (!oSplitter) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
// determine size
|
|
52
|
-
var lSplitterSize = 0;
|
|
53
|
-
if (oSplitter.getOrientation() === "Horizontal") {
|
|
54
|
-
lSplitterSize = oSplitter.getDomRef().offsetWidth;
|
|
55
|
-
} else {
|
|
56
|
-
lSplitterSize = oSplitter.getDomRef().offsetHeight;
|
|
57
|
-
}
|
|
58
|
-
// check if size has changed: calculate new size if necessary
|
|
59
|
-
if (oSplitter.splitterSize && oSplitter.splitterSize != lSplitterSize){
|
|
60
|
-
// calculate total size of content areas and determine if recalculation is required
|
|
61
|
-
var lRecalculate = 0;
|
|
62
|
-
var lTotalSize = 0;
|
|
63
|
-
oSplitter.getContentAreas().forEach(
|
|
64
|
-
function(oContentArea){
|
|
65
|
-
// determine size of content area
|
|
66
|
-
var lSize = 0;
|
|
67
|
-
if (oSplitter.getOrientation() === "Horizontal") {
|
|
68
|
-
lSize = oContentArea.getDomRef().offsetWidth;
|
|
69
|
-
} else {
|
|
70
|
-
lSize = oContentArea.getDomRef().offsetHeight;
|
|
71
|
-
}
|
|
72
|
-
// add to total size of content areas
|
|
73
|
-
lTotalSize += lSize;
|
|
74
|
-
// check if size needs to be recalculated: this is the case if size is not percentage or auto)
|
|
75
|
-
if (oContentArea.getLayoutData().getSize().endsWith("px")) {
|
|
76
|
-
lRecalculate += 1;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
// perform recalculation if required (new size is set in percentage)
|
|
81
|
-
if (lRecalculate > 1) {
|
|
82
|
-
oSplitter.getContentAreas().forEach(function(oContentArea){
|
|
83
|
-
// determine size of content area
|
|
84
|
-
var lSize = 0;
|
|
85
|
-
if (oSplitter.getOrientation() === "Horizontal") {
|
|
86
|
-
lSize = oContentArea.getDomRef().offsetWidth;
|
|
87
|
-
} else {
|
|
88
|
-
lSize = oContentArea.getDomRef().offsetHeight;
|
|
89
|
-
}
|
|
90
|
-
// calculate new size
|
|
91
|
-
var lNewSize = (lSize * 100) / lTotalSize;
|
|
92
|
-
// apply new size to content area
|
|
93
|
-
oContentArea.getLayoutData().setSize(lNewSize + "%");
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
// set the new splitter size
|
|
98
|
-
oSplitter.splitterSize = lSplitterSize;
|
|
99
|
-
};
|
|
100
|
-
this.createMainPanel = function(sId) {
|
|
101
|
-
var oMainPanel = new sap.m.NavContainer(sId, {autoFocus: false}).addStyleClass("zenNavigationPanelM").addStyleClass("sapContrastPlus");
|
|
102
|
-
var oPage = this.createPanel({});
|
|
103
|
-
oMainPanel.addPage(oPage);
|
|
104
|
-
oMainPanel.setTop = function(oControl) {
|
|
105
|
-
oPage.setTop(oControl);
|
|
106
|
-
};
|
|
107
|
-
oMainPanel.setCenter = function(oControl) {
|
|
108
|
-
oPage.setCenter(oControl);
|
|
109
|
-
};
|
|
110
|
-
oMainPanel.destroyTop = function() {
|
|
111
|
-
oMainPanel.getPages()[0].destroySubHeader();
|
|
112
|
-
};
|
|
113
|
-
oMainPanel.destroyCenter = function() {
|
|
114
|
-
oMainPanel.getPages()[0].destroyContent();
|
|
115
|
-
};
|
|
116
|
-
return oMainPanel;
|
|
117
|
-
};
|
|
118
|
-
this.createPanel = function(oConfig) {
|
|
119
|
-
var oPanel = null;
|
|
120
|
-
if (jQuery.type(oConfig) === "string") {
|
|
121
|
-
oPanel = new sap.m.Page(oConfig);
|
|
122
|
-
} else {
|
|
123
|
-
oPanel = new sap.m.Page();
|
|
124
|
-
}
|
|
125
|
-
oPanel.setShowHeader(false);
|
|
126
|
-
oPanel.setTop = function(oControl) {
|
|
127
|
-
oPanel.setSubHeader(oControl);
|
|
128
|
-
};
|
|
129
|
-
oPanel.setCenter = function(oControl) {
|
|
130
|
-
var aContent = oControl.content;
|
|
131
|
-
if (aContent) {
|
|
132
|
-
for (var i = 0; i < aContent.length; i++) {
|
|
133
|
-
oPanel.addContent(aContent[i]);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
if (oConfig.top) {
|
|
138
|
-
oPanel.setTop(oConfig.top);
|
|
139
|
-
}
|
|
140
|
-
if (oConfig.center) {
|
|
141
|
-
oPanel.setCenter(oConfig.center);
|
|
142
|
-
}
|
|
143
|
-
oPanel.addEventDelegate({
|
|
144
|
-
onAfterRendering:function() {
|
|
145
|
-
var jqPanel = oPanel.$();
|
|
146
|
-
if (jqPanel.closest(".sapUiSizeCompact").length === 0 && jqPanel.children("header").length > 0) { // check if runs not in Compact mode
|
|
147
|
-
jqPanel.children("section").css("top", "3rem");
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
oPanel.onAfterRendering= function(){
|
|
152
|
-
jQuery(oPanel.getDomRef()).find("[tabIndex='-1']").attr("tabIndex","0");
|
|
153
|
-
};
|
|
154
|
-
return oPanel;
|
|
155
|
-
};
|
|
156
|
-
this.createTopArea = function(oConfig) {
|
|
157
|
-
var oTop = new sap.m.Toolbar();
|
|
158
|
-
var aContent = oConfig.content;
|
|
159
|
-
if (oConfig.contentAlign === "right") {
|
|
160
|
-
oTop.addContent(new sap.m.ToolbarSpacer());
|
|
161
|
-
}
|
|
162
|
-
if (aContent) {
|
|
163
|
-
for (var i = 0; i < aContent.length; i++) {
|
|
164
|
-
oTop.addContent(aContent[i]);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return oTop;
|
|
168
|
-
};
|
|
169
|
-
this.createCenterArea = function(oConfig) {
|
|
170
|
-
var oCenter = {
|
|
171
|
-
content: oConfig.content ? oConfig.content : [],
|
|
172
|
-
addContent: function(oContent) {
|
|
173
|
-
this.content.push(oContent);
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
return oCenter;
|
|
177
|
-
};
|
|
178
|
-
this.createSearchField = function(oConfig) {
|
|
179
|
-
var oSearchField = new sap.m.SearchField();
|
|
180
|
-
oSearchField.setWidth(oConfig.width);
|
|
181
|
-
oSearchField.attachLiveChange(oConfig.suggest);
|
|
182
|
-
return oSearchField;
|
|
183
|
-
};
|
|
184
|
-
this.createText = function(oConfig, id) {
|
|
185
|
-
if (oConfig && oConfig.design) {
|
|
186
|
-
delete oConfig.design;
|
|
187
|
-
}
|
|
188
|
-
return new sap.m.Title(id, oConfig);
|
|
189
|
-
};
|
|
190
|
-
this.createLabel = function(oConfig, id) {
|
|
191
|
-
var oLabel;
|
|
192
|
-
if (oConfig && oConfig.design === "Bold") {
|
|
193
|
-
delete oConfig.design;
|
|
194
|
-
delete oConfig.labelFor;
|
|
195
|
-
oLabel = new sap.m.Title(id, oConfig);
|
|
196
|
-
} else {
|
|
197
|
-
oLabel = new sap.m.Label(id, oConfig);
|
|
198
|
-
}
|
|
199
|
-
return oLabel;
|
|
200
|
-
};
|
|
201
|
-
this.createRowRepeater = function() {
|
|
202
|
-
var oRowRepeater = new sap.m.List({
|
|
203
|
-
noDataText: " "
|
|
204
|
-
});
|
|
205
|
-
return oRowRepeater;
|
|
206
|
-
};
|
|
207
|
-
this.cloneRowRepeater = function(oOldRowRepeater) {
|
|
208
|
-
var oRowRepeater = oOldRowRepeater.clone();
|
|
209
|
-
return oRowRepeater;
|
|
210
|
-
};
|
|
211
|
-
this.getRowRepeaterAggregation = function() {
|
|
212
|
-
return "items";
|
|
213
|
-
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Create the Control
|
|
25
|
+
*/
|
|
214
26
|
this.create = function(oChainedControl, oControlProperties) {
|
|
215
27
|
var oControl, sNavigationPanelMode = oControlProperties.property.navigationpanelmode;
|
|
216
28
|
var cssClassSuffix = "M";
|
|
@@ -494,6 +306,263 @@ sap.ui.define(
|
|
|
494
306
|
};
|
|
495
307
|
return oControl;
|
|
496
308
|
};
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Update the Control
|
|
312
|
+
*/
|
|
313
|
+
this.update = function(oControl, oControlProperties, oComponentProperties) {
|
|
314
|
+
if (oControl && oControlProperties) {
|
|
315
|
+
var oModel = oControl.getModel();
|
|
316
|
+
if (this.isDesignModeD4LIncluded() ||
|
|
317
|
+
(oControlProperties.newds && oControlProperties.property && oModel.getProperty("/property/navigationpanelmode") !== oControlProperties.property.navigationpanelmode)) {
|
|
318
|
+
return this.create(oControl, oControlProperties, oComponentProperties);
|
|
319
|
+
}
|
|
320
|
+
if (oControlProperties.newds || !oModel.getProperty("/navigationpanel/apply/ready")) {
|
|
321
|
+
if (oControlProperties.charnames) {
|
|
322
|
+
oModel.setProperty("/charnames", oControlProperties.charnames);
|
|
323
|
+
}
|
|
324
|
+
if (oControlProperties.characteristics) {
|
|
325
|
+
this.rewriteMeasuresPosition(oControlProperties, oModel.getProperty("/property/showmeasuresseparately"));
|
|
326
|
+
oModel.setProperty("/characteristics", oControlProperties.characteristics);
|
|
327
|
+
oModel.setProperty("/measures", oControlProperties.measures);
|
|
328
|
+
}
|
|
329
|
+
if (oControlProperties.axis && this.axisArraysNotSame(oControlProperties.axis, oModel.getProperty("/axis"))) {
|
|
330
|
+
oModel.setProperty("/axis", oControlProperties.axis);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
if (oControlProperties.filters) {
|
|
334
|
+
oModel.setProperty("/filters", oControlProperties.filters);
|
|
335
|
+
}
|
|
336
|
+
if (oControlProperties.changeVisibility) {
|
|
337
|
+
if (oControlProperties.visible) {
|
|
338
|
+
oControl.removeStyleClass("zenHideFilterPanel");
|
|
339
|
+
} else {
|
|
340
|
+
oControl.addStyleClass("zenHideFilterPanel");
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
if(typeof (sap.zen.dsh.DSH_deployment) !== "undefined") {
|
|
344
|
+
if (!oControlProperties.pauserefresh && oControl.getModel().getProperty("/property/pauserefresh")) {
|
|
345
|
+
oControl.ZEN_submit();
|
|
346
|
+
}
|
|
347
|
+
oControl.getModel().setProperty("/property/pauserefresh", oControlProperties.pauserefresh);
|
|
348
|
+
}
|
|
349
|
+
oControl.getModel().setProperty("/dsName", oControlProperties.dsName);
|
|
350
|
+
}
|
|
351
|
+
that.clearDragGhosts(); // clear all dragGhost DIVs that might still be hanging around
|
|
352
|
+
if (oControl) {
|
|
353
|
+
this.updateSplitter(oControl.oHorizontalSplitter);
|
|
354
|
+
}
|
|
355
|
+
return oControl;
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
this.createSplitter = function(oConfig) {
|
|
359
|
+
// create the UI5 splitter control
|
|
360
|
+
var oSplitter = new sap.ui.layout.Splitter();
|
|
361
|
+
oSplitter.mFnOrigOnAfterRendering = oSplitter.onAfterRendering;
|
|
362
|
+
oSplitter.onAfterRendering = function(){
|
|
363
|
+
if (oSplitter.mFnOrigOnAfterRendering) {
|
|
364
|
+
oSplitter.mFnOrigOnAfterRendering();
|
|
365
|
+
}
|
|
366
|
+
jQuery(oSplitter.getDomRef()).find("[tabIndex='-1']").attr("tabIndex","0");
|
|
367
|
+
};
|
|
368
|
+
oSplitter.oSplitterConfig = oConfig;
|
|
369
|
+
if (oConfig.splitterOrientation === "Horizontal") {
|
|
370
|
+
oSplitter.setOrientation(sap.ui.core.Orientation.Vertical);
|
|
371
|
+
}
|
|
372
|
+
//wrap methods for adding content areas to the splitter control
|
|
373
|
+
oSplitter.addFirstPaneContent = function(oControl) {
|
|
374
|
+
oSplitter.addContentArea(oControl);
|
|
375
|
+
// set initial default width
|
|
376
|
+
oControl.getLayoutData().setMinSize(oSplitter.oSplitterConfig.minSizeFirstPane);
|
|
377
|
+
oControl.getLayoutData().setSize(oSplitter.oSplitterConfig.splitterPosition);
|
|
378
|
+
};
|
|
379
|
+
oSplitter.addSecondPaneContent = function(oControl) {
|
|
380
|
+
oSplitter.addContentArea(oControl);
|
|
381
|
+
// set initial default width
|
|
382
|
+
oControl.getLayoutData().setMinSize(oSplitter.oSplitterConfig.minSizeSecondPane);
|
|
383
|
+
oControl.getLayoutData().setSize("auto"); // depends on splitterPosition valid for 1st content area
|
|
384
|
+
};
|
|
385
|
+
return oSplitter;
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
this.updateSplitter = function(oSplitter) {
|
|
389
|
+
if (!oSplitter) {
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
// determine size
|
|
393
|
+
var lSplitterSize = 0;
|
|
394
|
+
if (oSplitter.getOrientation() === "Horizontal") {
|
|
395
|
+
lSplitterSize = oSplitter.getDomRef().offsetWidth;
|
|
396
|
+
} else {
|
|
397
|
+
lSplitterSize = oSplitter.getDomRef().offsetHeight;
|
|
398
|
+
}
|
|
399
|
+
// check if size has changed: calculate new size if necessary
|
|
400
|
+
if (oSplitter.splitterSize && oSplitter.splitterSize != lSplitterSize){
|
|
401
|
+
// calculate total size of content areas and determine if recalculation is required
|
|
402
|
+
var lRecalculate = 0;
|
|
403
|
+
var lTotalSize = 0;
|
|
404
|
+
oSplitter.getContentAreas().forEach(
|
|
405
|
+
function(oContentArea){
|
|
406
|
+
// determine size of content area
|
|
407
|
+
var lSize = 0;
|
|
408
|
+
if (oSplitter.getOrientation() === "Horizontal") {
|
|
409
|
+
lSize = oContentArea.getDomRef().offsetWidth;
|
|
410
|
+
} else {
|
|
411
|
+
lSize = oContentArea.getDomRef().offsetHeight;
|
|
412
|
+
}
|
|
413
|
+
// add to total size of content areas
|
|
414
|
+
lTotalSize += lSize;
|
|
415
|
+
// check if size needs to be recalculated: this is the case if size is not percentage or auto)
|
|
416
|
+
if (oContentArea.getLayoutData().getSize().endsWith("px")) {
|
|
417
|
+
lRecalculate += 1;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
);
|
|
421
|
+
// perform recalculation if required (new size is set in percentage)
|
|
422
|
+
if (lRecalculate > 1) {
|
|
423
|
+
oSplitter.getContentAreas().forEach(function(oContentArea){
|
|
424
|
+
// determine size of content area
|
|
425
|
+
var lSize = 0;
|
|
426
|
+
if (oSplitter.getOrientation() === "Horizontal") {
|
|
427
|
+
lSize = oContentArea.getDomRef().offsetWidth;
|
|
428
|
+
} else {
|
|
429
|
+
lSize = oContentArea.getDomRef().offsetHeight;
|
|
430
|
+
}
|
|
431
|
+
// calculate new size
|
|
432
|
+
var lNewSize = (lSize * 100) / lTotalSize;
|
|
433
|
+
// apply new size to content area
|
|
434
|
+
oContentArea.getLayoutData().setSize(lNewSize + "%");
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
// set the new splitter size
|
|
439
|
+
oSplitter.splitterSize = lSplitterSize;
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
this.createMainPanel = function(sId) {
|
|
443
|
+
var oMainPanel = new sap.m.NavContainer(sId, {autoFocus: false}).addStyleClass("zenNavigationPanelM").addStyleClass("sapContrastPlus");
|
|
444
|
+
var oPage = this.createPanel({});
|
|
445
|
+
oMainPanel.addPage(oPage);
|
|
446
|
+
oMainPanel.setTop = function(oControl) {
|
|
447
|
+
oPage.setTop(oControl);
|
|
448
|
+
};
|
|
449
|
+
oMainPanel.setCenter = function(oControl) {
|
|
450
|
+
oPage.setCenter(oControl);
|
|
451
|
+
};
|
|
452
|
+
oMainPanel.destroyTop = function() {
|
|
453
|
+
oMainPanel.getPages()[0].destroySubHeader();
|
|
454
|
+
};
|
|
455
|
+
oMainPanel.destroyCenter = function() {
|
|
456
|
+
oMainPanel.getPages()[0].destroyContent();
|
|
457
|
+
};
|
|
458
|
+
return oMainPanel;
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
this.createPanel = function(oConfig) {
|
|
462
|
+
var oPanel = null;
|
|
463
|
+
if (jQuery.type(oConfig) === "string") {
|
|
464
|
+
oPanel = new sap.m.Page(oConfig);
|
|
465
|
+
} else {
|
|
466
|
+
oPanel = new sap.m.Page();
|
|
467
|
+
}
|
|
468
|
+
oPanel.setShowHeader(false);
|
|
469
|
+
oPanel.setTop = function(oControl) {
|
|
470
|
+
oPanel.setSubHeader(oControl);
|
|
471
|
+
};
|
|
472
|
+
oPanel.setCenter = function(oControl) {
|
|
473
|
+
var aContent = oControl.content;
|
|
474
|
+
if (aContent) {
|
|
475
|
+
for (var i = 0; i < aContent.length; i++) {
|
|
476
|
+
oPanel.addContent(aContent[i]);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
if (oConfig.top) {
|
|
481
|
+
oPanel.setTop(oConfig.top);
|
|
482
|
+
}
|
|
483
|
+
if (oConfig.center) {
|
|
484
|
+
oPanel.setCenter(oConfig.center);
|
|
485
|
+
}
|
|
486
|
+
oPanel.addEventDelegate({
|
|
487
|
+
onAfterRendering:function() {
|
|
488
|
+
var jqPanel = oPanel.$();
|
|
489
|
+
if (jqPanel.closest(".sapUiSizeCompact").length === 0 && jqPanel.children("header").length > 0) { // check if runs not in Compact mode
|
|
490
|
+
jqPanel.children("section").css("top", "3rem");
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
oPanel.onAfterRendering= function(){
|
|
495
|
+
jQuery(oPanel.getDomRef()).find("[tabIndex='-1']").attr("tabIndex","0");
|
|
496
|
+
};
|
|
497
|
+
return oPanel;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
this.createTopArea = function(oConfig) {
|
|
501
|
+
var oTop = new sap.m.Toolbar();
|
|
502
|
+
var aContent = oConfig.content;
|
|
503
|
+
if (oConfig.contentAlign === "right") {
|
|
504
|
+
oTop.addContent(new sap.m.ToolbarSpacer());
|
|
505
|
+
}
|
|
506
|
+
if (aContent) {
|
|
507
|
+
for (var i = 0; i < aContent.length; i++) {
|
|
508
|
+
oTop.addContent(aContent[i]);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
return oTop;
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
this.createCenterArea = function(oConfig) {
|
|
515
|
+
var oCenter = {
|
|
516
|
+
content: oConfig.content ? oConfig.content : [],
|
|
517
|
+
addContent: function(oContent) {
|
|
518
|
+
this.content.push(oContent);
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
return oCenter;
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
this.createSearchField = function(oConfig) {
|
|
525
|
+
var oSearchField = new sap.m.SearchField();
|
|
526
|
+
oSearchField.setWidth(oConfig.width);
|
|
527
|
+
oSearchField.attachLiveChange(oConfig.suggest);
|
|
528
|
+
return oSearchField;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
this.createText = function(oConfig, id) {
|
|
532
|
+
if (oConfig && oConfig.design) {
|
|
533
|
+
delete oConfig.design;
|
|
534
|
+
}
|
|
535
|
+
return new sap.m.Title(id, oConfig);
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
this.createLabel = function(oConfig, id) {
|
|
539
|
+
var oLabel;
|
|
540
|
+
if (oConfig && oConfig.design === "Bold") {
|
|
541
|
+
delete oConfig.design;
|
|
542
|
+
delete oConfig.labelFor;
|
|
543
|
+
oLabel = new sap.m.Title(id, oConfig);
|
|
544
|
+
} else {
|
|
545
|
+
oLabel = new sap.m.Label(id, oConfig);
|
|
546
|
+
}
|
|
547
|
+
return oLabel;
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
this.createRowRepeater = function() {
|
|
551
|
+
var oRowRepeater = new sap.m.List({
|
|
552
|
+
noDataText: " "
|
|
553
|
+
});
|
|
554
|
+
return oRowRepeater;
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
this.cloneRowRepeater = function(oOldRowRepeater) {
|
|
558
|
+
var oRowRepeater = oOldRowRepeater.clone();
|
|
559
|
+
return oRowRepeater;
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
this.getRowRepeaterAggregation = function() {
|
|
563
|
+
return "items";
|
|
564
|
+
};
|
|
565
|
+
|
|
497
566
|
this.rewriteMeasuresPosition = function(oControlProperties, bShowMeasuresSeparately) {
|
|
498
567
|
if (oControlProperties && oControlProperties.characteristics && (bShowMeasuresSeparately || (oControlProperties.property && oControlProperties.property.showmeasuresseparately))) {
|
|
499
568
|
for (var i = 0, l=oControlProperties.characteristics.length; i < l; i++) {
|
|
@@ -506,6 +575,7 @@ sap.ui.define(
|
|
|
506
575
|
}
|
|
507
576
|
}
|
|
508
577
|
};
|
|
578
|
+
|
|
509
579
|
this.getRowFactory = function(oControl, sKeyPath, sTextPath, fTextFormatter, bMarker, fCallback) {
|
|
510
580
|
return function(sRowId, oContext) {
|
|
511
581
|
//create the template control that will be repeated and will display the data
|
|
@@ -617,6 +687,7 @@ sap.ui.define(
|
|
|
617
687
|
return oCLM;
|
|
618
688
|
};
|
|
619
689
|
};
|
|
690
|
+
|
|
620
691
|
this.changeTemplate = function(oControl, oRowTemplate, oContext, bExpand) {
|
|
621
692
|
var oModel = oContext.oModel;
|
|
622
693
|
if (bExpand || oModel.getProperty("/navigationpanel/measures/expanded")) {
|
|
@@ -657,6 +728,7 @@ sap.ui.define(
|
|
|
657
728
|
oRowTemplate.setWidths(["20px", "auto"]);
|
|
658
729
|
}
|
|
659
730
|
};
|
|
731
|
+
|
|
660
732
|
this.getFilterFormatter = function(sMeasureKey, sCharAxis, aParents) {
|
|
661
733
|
return function(oFilters) {
|
|
662
734
|
var i, j, l;
|
|
@@ -706,12 +778,14 @@ sap.ui.define(
|
|
|
706
778
|
return "inherit";
|
|
707
779
|
};
|
|
708
780
|
};
|
|
781
|
+
|
|
709
782
|
this.isDropInPanel = function(e, sId) {
|
|
710
783
|
Log.error("isDropInPanel");
|
|
711
784
|
Log.error(e);
|
|
712
785
|
var oRect = document.getElementById(sId).getBoundingClientRect();
|
|
713
786
|
return (e.clientX >= oRect.left && e.clientX <= oRect.right && e.clientY >= oRect.top && e.clientY <= oRect.bottom);
|
|
714
787
|
};
|
|
788
|
+
|
|
715
789
|
this.onUnhandledDrop = function(e) {
|
|
716
790
|
Log.error("onUnhandledDrop");
|
|
717
791
|
Log.error(e);
|
|
@@ -719,6 +793,7 @@ sap.ui.define(
|
|
|
719
793
|
BaseHandler.dispatcher.setDragDropCanceled(true);
|
|
720
794
|
}
|
|
721
795
|
};
|
|
796
|
+
|
|
722
797
|
this.onEscKeyPressed = function() {
|
|
723
798
|
Log.error("onEscKeyPressed");
|
|
724
799
|
BaseHandler.dispatcher.setDragDropCanceled(true);
|
|
@@ -729,6 +804,7 @@ sap.ui.define(
|
|
|
729
804
|
oJqCurrentSortable.sortable().trigger("mouseup");
|
|
730
805
|
}
|
|
731
806
|
};
|
|
807
|
+
|
|
732
808
|
this.getDimensionsOnAfterRendering = function(oControl, sRowRepeaterId, sRowRepeaterRowsId, sRowRepeaterColumnsId) {
|
|
733
809
|
return function() {
|
|
734
810
|
var jqRepeaterElements = jQuery(document.getElementById(sRowRepeaterId)).children("ul").children("li");
|
|
@@ -845,6 +921,7 @@ sap.ui.define(
|
|
|
845
921
|
}
|
|
846
922
|
};
|
|
847
923
|
};
|
|
924
|
+
|
|
848
925
|
this.isOverParent = function(ui) {
|
|
849
926
|
var x = ui.offset.left;
|
|
850
927
|
var y = ui.offset.top;
|
|
@@ -866,6 +943,7 @@ sap.ui.define(
|
|
|
866
943
|
}
|
|
867
944
|
return true;
|
|
868
945
|
};
|
|
946
|
+
|
|
869
947
|
this.getAxisOnAfterRendering = function(sAxis, sConnectWith, oControl, fApply) {
|
|
870
948
|
return function() {
|
|
871
949
|
var sRowRepeaterId = this.getId();
|
|
@@ -1018,6 +1096,7 @@ sap.ui.define(
|
|
|
1018
1096
|
}
|
|
1019
1097
|
};
|
|
1020
1098
|
};
|
|
1099
|
+
|
|
1021
1100
|
if (sap.ui.Device.support.touch) {
|
|
1022
1101
|
this.getTouchToMouse = function(sMouseEvent) {
|
|
1023
1102
|
return function(e) {
|
|
@@ -1034,50 +1113,7 @@ sap.ui.define(
|
|
|
1034
1113
|
touchend: that.getTouchToMouse("mouseup")
|
|
1035
1114
|
};
|
|
1036
1115
|
}
|
|
1037
|
-
|
|
1038
|
-
if (oControl && oControlProperties) {
|
|
1039
|
-
var oModel = oControl.getModel();
|
|
1040
|
-
if (this.isDesignModeD4LIncluded() ||
|
|
1041
|
-
(oControlProperties.newds && oControlProperties.property && oModel.getProperty("/property/navigationpanelmode") !== oControlProperties.property.navigationpanelmode)) {
|
|
1042
|
-
return this.create(oControl, oControlProperties, oComponentProperties);
|
|
1043
|
-
}
|
|
1044
|
-
if (oControlProperties.newds || !oModel.getProperty("/navigationpanel/apply/ready")) {
|
|
1045
|
-
if (oControlProperties.charnames) {
|
|
1046
|
-
oModel.setProperty("/charnames", oControlProperties.charnames);
|
|
1047
|
-
}
|
|
1048
|
-
if (oControlProperties.characteristics) {
|
|
1049
|
-
this.rewriteMeasuresPosition(oControlProperties, oModel.getProperty("/property/showmeasuresseparately"));
|
|
1050
|
-
oModel.setProperty("/characteristics", oControlProperties.characteristics);
|
|
1051
|
-
oModel.setProperty("/measures", oControlProperties.measures);
|
|
1052
|
-
}
|
|
1053
|
-
if (oControlProperties.axis && this.axisArraysNotSame(oControlProperties.axis, oModel.getProperty("/axis"))) {
|
|
1054
|
-
oModel.setProperty("/axis", oControlProperties.axis);
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
if (oControlProperties.filters) {
|
|
1058
|
-
oModel.setProperty("/filters", oControlProperties.filters);
|
|
1059
|
-
}
|
|
1060
|
-
if (oControlProperties.changeVisibility) {
|
|
1061
|
-
if (oControlProperties.visible) {
|
|
1062
|
-
oControl.removeStyleClass("zenHideFilterPanel");
|
|
1063
|
-
} else {
|
|
1064
|
-
oControl.addStyleClass("zenHideFilterPanel");
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
if(typeof (sap.zen.dsh.DSH_deployment) !== "undefined") {
|
|
1068
|
-
if (!oControlProperties.pauserefresh && oControl.getModel().getProperty("/property/pauserefresh")) {
|
|
1069
|
-
oControl.ZEN_submit();
|
|
1070
|
-
}
|
|
1071
|
-
oControl.getModel().setProperty("/property/pauserefresh", oControlProperties.pauserefresh);
|
|
1072
|
-
}
|
|
1073
|
-
oControl.getModel().setProperty("/dsName", oControlProperties.dsName);
|
|
1074
|
-
}
|
|
1075
|
-
that.clearDragGhosts(); // clear all dragGhost DIVs that might still be hanging around
|
|
1076
|
-
if (oControl) {
|
|
1077
|
-
this.updateSplitter(oControl.oHorizontalSplitter);
|
|
1078
|
-
}
|
|
1079
|
-
return oControl;
|
|
1080
|
-
};
|
|
1116
|
+
|
|
1081
1117
|
this.axisArraysNotSame = function(aAxis1, aAxis2) {
|
|
1082
1118
|
var aAxisNames = ["rows", "columns"];
|
|
1083
1119
|
if (aAxis1 && aAxis2) {
|
|
@@ -1097,6 +1133,7 @@ sap.ui.define(
|
|
|
1097
1133
|
}
|
|
1098
1134
|
return true;
|
|
1099
1135
|
};
|
|
1136
|
+
|
|
1100
1137
|
this.getContextMenuAction = function(sContextMenuComponentId, oClickedUI5Component, oDomClickedElement) {
|
|
1101
1138
|
var sCommand = oClickedUI5Component.getModel().getProperty("/command/createcontextmenu");
|
|
1102
1139
|
if (sCommand) {
|
|
@@ -1121,15 +1158,19 @@ sap.ui.define(
|
|
|
1121
1158
|
}
|
|
1122
1159
|
return null;
|
|
1123
1160
|
};
|
|
1161
|
+
|
|
1124
1162
|
this.isDesignModeD4LIncluded = function(){
|
|
1125
1163
|
return sap.zen.designmode;
|
|
1126
1164
|
};
|
|
1165
|
+
|
|
1127
1166
|
this.getType = function() {
|
|
1128
1167
|
return "navigationpanel";
|
|
1129
1168
|
};
|
|
1169
|
+
|
|
1130
1170
|
this.getDecorator = function() {
|
|
1131
1171
|
return "DataSourceControlDecorator";
|
|
1132
1172
|
};
|
|
1173
|
+
|
|
1133
1174
|
// clear all DragGhosts that are still around. In some cases the draggable.stop() function
|
|
1134
1175
|
// is not called and so the DragGhost is not cleared. This happens usually when the user
|
|
1135
1176
|
// is dragging quickly one after another. In that case the drag is disrupted by a loading of
|
|
@@ -1137,6 +1178,7 @@ sap.ui.define(
|
|
|
1137
1178
|
this.clearDragGhosts = function() {
|
|
1138
1179
|
jQuery("div.zenDnDHelper").remove();
|
|
1139
1180
|
};
|
|
1181
|
+
|
|
1140
1182
|
this.getDimensionNameAndIdForJQElement = function (jqElement, bMember, bSibling) {
|
|
1141
1183
|
var dimIdElem = bSibling ? jqElement.siblings(bMember ? ".zenMemberId" : ".zenDimensionId") : jqElement.find(bMember ? ".zenMemberId" : ".zenDimensionId");
|
|
1142
1184
|
var control = dimIdElem.control(0);
|
|
@@ -1145,10 +1187,12 @@ sap.ui.define(
|
|
|
1145
1187
|
id: dimIdElem.attr("id")
|
|
1146
1188
|
};
|
|
1147
1189
|
};
|
|
1190
|
+
|
|
1148
1191
|
this.getType = function(){
|
|
1149
1192
|
return "navigationpanel";
|
|
1150
1193
|
};
|
|
1151
1194
|
};
|
|
1195
|
+
|
|
1152
1196
|
var instance = new NavigationPanelHandler();
|
|
1153
1197
|
BaseHandler.dispatcher.addHandlers(instance.getType(), instance);
|
|
1154
1198
|
return instance;
|