@openui5/sap.ui.mdc 1.93.3 → 1.96.1
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/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +236 -334
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -1
- package/src/sap/ui/mdc/Chart.js +150 -22
- package/src/sap/ui/mdc/ChartDelegateNew.js +15 -0
- package/src/sap/ui/mdc/ChartNew.js +107 -66
- package/src/sap/ui/mdc/Control.js +4 -3
- package/src/sap/ui/mdc/Element.js +5 -4
- package/src/sap/ui/mdc/Field.js +2 -2
- package/src/sap/ui/mdc/FilterBar.js +1 -10
- package/src/sap/ui/mdc/FilterField.js +28 -4
- package/src/sap/ui/mdc/Link.js +2 -2
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +160 -79
- package/src/sap/ui/mdc/TableDelegate.js +20 -3
- package/src/sap/ui/mdc/ValueHelp.js +1474 -0
- package/src/sap/ui/mdc/ValueHelpDelegate.js +147 -0
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +49 -104
- package/src/sap/ui/mdc/chart/DimensionItem.js +3 -3
- package/src/sap/ui/mdc/chart/Item.js +2 -3
- package/src/sap/ui/mdc/chart/MeasureItem.js +2 -2
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +21 -2
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +237 -225
- package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +14 -10
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +12 -10
- package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -1
- package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +2 -2
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +13 -7
- package/src/sap/ui/mdc/condition/Operator.js +4 -4
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +43 -0
- package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +91 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +20 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +31 -0
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +5 -0
- package/src/sap/ui/mdc/enum/ContentMode.js +25 -4
- package/src/sap/ui/mdc/enum/SelectType.js +43 -0
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +19 -4
- package/src/sap/ui/mdc/field/ConditionsType.js +5 -4
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +38 -14
- package/src/sap/ui/mdc/field/FieldBase.js +92 -41
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +9 -2
- package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
- package/src/sap/ui/mdc/field/FieldInfoBase.js +9 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -1
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +3 -3
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/BooleanContent.js +15 -3
- package/src/sap/ui/mdc/field/content/ContentFactory.js +16 -8
- package/src/sap/ui/mdc/field/content/DefaultContent.js +64 -23
- package/src/sap/ui/mdc/field/content/LinkContent.js +6 -0
- package/src/sap/ui/mdc/field/content/SearchContent.js +21 -3
- package/src/sap/ui/mdc/field/content/UnitContent.js +2 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +105 -44
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +52 -0
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +10 -51
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +22 -0
- package/src/sap/ui/mdc/flexibility/ActionToolbarAction.flexibility.js +19 -0
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +57 -46
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +203 -197
- package/src/sap/ui/mdc/library.js +588 -8
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialog.js +2 -2
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +31 -5
- package/src/sap/ui/mdc/messagebundle_ar.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_bg.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ca.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_cs.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_cy.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_da.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_de.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_el.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_en.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +19 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +35 -28
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_et.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_fi.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_fr.properties +22 -15
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hu.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_id.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_it.properties +33 -26
- package/src/sap/ui/mdc/messagebundle_iw.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_kk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ko.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_lt.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_lv.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ms.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_nl.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_no.properties +17 -10
- package/src/sap/ui/mdc/messagebundle_pl.properties +14 -7
- package/src/sap/ui/mdc/messagebundle_pt.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ro.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_ru.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sh.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sk.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_sl.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sv.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_th.properties +16 -9
- package/src/sap/ui/mdc/messagebundle_tr.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_uk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_vi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +10 -3
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +3 -3
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +6 -6
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +37 -10
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +492 -203
- package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +3 -2
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -60
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +22 -24
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +59 -0
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +1 -2
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +17 -8
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1 -2
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +1171 -0
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +7 -11
- package/src/sap/ui/mdc/p13n/panels/ListView.js +5 -3
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +16 -9
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -1
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -1
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +89 -0
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +9 -6
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +33 -4
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +9 -15
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +12 -0
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +5 -12
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +19 -21
- package/src/sap/ui/mdc/table/Column.js +35 -9
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +0 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +108 -5
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +19 -3
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableTypeBase.js +0 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/FilterBar.less +2 -2
- package/src/sap/ui/mdc/themes/base/GroupView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ListView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +56 -21
- package/src/sap/ui/mdc/ui/Container.js +2 -2
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/Common.js +26 -0
- package/src/sap/ui/mdc/util/FilterUtil.js +12 -1
- package/src/sap/ui/mdc/util/IdentifierUtil.js +4 -0
- package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
- package/src/sap/ui/mdc/util/PropertyHelper.js +22 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +498 -0
- package/src/sap/ui/mdc/valuehelp/Popover.js +362 -0
- package/src/sap/ui/mdc/valuehelp/base/Container.js +642 -0
- package/src/sap/ui/mdc/valuehelp/base/Content.js +628 -0
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +139 -0
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +557 -0
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +133 -0
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +318 -0
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +276 -0
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +532 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +638 -0
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +916 -0
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -2
- package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +48 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsBase.js +310 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsViz.js +39 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsBase.js +118 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsViz.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ChartNew.js +24 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +289 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +401 -93
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +4 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/ui/core/Element",
|
|
8
9
|
"sap/ui/mdc/library",
|
|
9
10
|
"../ActionToolbar",
|
|
10
11
|
"sap/m/Title",
|
|
@@ -14,8 +15,10 @@ sap.ui.define([
|
|
|
14
15
|
"sap/ui/mdc/chart/ChartSettings",
|
|
15
16
|
"sap/ui/core/library",
|
|
16
17
|
"sap/ui/Device",
|
|
17
|
-
"sap/ui/core/ShortcutHintsMixin"
|
|
18
|
+
"sap/ui/core/ShortcutHintsMixin",
|
|
19
|
+
"sap/ui/mdc/actiontoolbar/ActionToolbarAction"
|
|
18
20
|
], function(
|
|
21
|
+
Element,
|
|
19
22
|
MDCLib,
|
|
20
23
|
ActionToolbar,
|
|
21
24
|
Title,
|
|
@@ -25,291 +28,300 @@ sap.ui.define([
|
|
|
25
28
|
ChartSettings,
|
|
26
29
|
CoreLibrary,
|
|
27
30
|
Device,
|
|
28
|
-
ShortcutHintsMixin
|
|
31
|
+
ShortcutHintsMixin,
|
|
32
|
+
ActionToolbarAction
|
|
29
33
|
) {
|
|
30
34
|
"use strict";
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
/**
|
|
37
|
+
/**
|
|
38
|
+
* Constructor for a new ToolbarHandler.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
41
|
+
* @param {object} [mSettings] initial settings for the new control
|
|
42
|
+
* @class The ToolbarHandler control creates a sap.m.OverflowToolbar based on metadata and the configuration specified.
|
|
43
|
+
* @extends sap.m.OverflowToolbar
|
|
44
|
+
* @author SAP SE
|
|
45
|
+
* @version 1.96.1
|
|
46
|
+
* @constructor
|
|
47
|
+
* @experimental As of version ...
|
|
48
|
+
* @private
|
|
49
|
+
* @since 1.88
|
|
50
|
+
* @alias sap.ui.mdc.chart.ToolbarHandler
|
|
51
|
+
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
52
|
+
*/
|
|
53
|
+
var ToolbarHandler = Element.extend("sap.ui.mdc.ToolbarHandler", {});
|
|
54
|
+
|
|
33
55
|
|
|
56
|
+
var MDCRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
|
|
57
|
+
var HasPopup = CoreLibrary.aria.HasPopup;
|
|
34
58
|
/**
|
|
35
|
-
* Toolbar helper class for sap.ui.mdc.Chart.
|
|
36
59
|
*
|
|
37
|
-
*
|
|
38
|
-
* @private
|
|
39
|
-
* @experimental
|
|
40
|
-
* @since 1.60
|
|
41
|
-
* @alias sap.ui.mdc.chart.ToolbarHandler
|
|
60
|
+
* Creates a new toolbar for the mdc.Chart based on actions
|
|
42
61
|
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
design: "Transparent",
|
|
56
|
-
begin: [
|
|
57
|
-
new Title(oChart.getId() + "-title", {
|
|
58
|
-
text: oChart.getHeader()
|
|
59
|
-
})
|
|
60
|
-
]
|
|
61
|
-
});
|
|
62
|
+
ToolbarHandler.prototype.createToolbar = function(oChart, aUserActions, bInitNotBound) {
|
|
63
|
+
aUserActions = aUserActions || [];
|
|
64
|
+
|
|
65
|
+
if (!oChart.getAggregation("_toolbar")) {
|
|
66
|
+
var oToolbar = new ActionToolbar(oChart.getId() + "--toolbar", {
|
|
67
|
+
design: "Transparent",
|
|
68
|
+
begin: [
|
|
69
|
+
new Title(oChart.getId() + "-title", {
|
|
70
|
+
text: oChart.getHeader()
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
});
|
|
62
74
|
|
|
63
|
-
|
|
75
|
+
oChart.setAggregation("_toolbar", oToolbar);
|
|
64
76
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
77
|
+
this.initializeToolbarNotBound(oChart);
|
|
78
|
+
this.addActions(oToolbar, aUserActions); //Add actions after chart content for correct sorting
|
|
79
|
+
if (!bInitNotBound){
|
|
80
|
+
this.updateToolbar(oChart);
|
|
70
81
|
}
|
|
71
|
-
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
ToolbarHandler.prototype.addActions = function(oToolbar, aActions) {
|
|
86
|
+
aActions.forEach(function(action) {
|
|
87
|
+
oToolbar.addAction(action);
|
|
88
|
+
});
|
|
89
|
+
};
|
|
72
90
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
91
|
+
ToolbarHandler.prototype.initializeToolbarNotBound = function(oChart) {
|
|
92
|
+
var oToolbar = oChart.getAggregation("_toolbar");
|
|
93
|
+
|
|
94
|
+
if (!oToolbar) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.ZoomInOut)) {
|
|
99
|
+
|
|
100
|
+
this._oZoomInButton = new OverflowButton({
|
|
101
|
+
tooltip: MDCRb.getText("chart.TOOLBAR_ZOOM_IN"),
|
|
102
|
+
icon: "sap-icon://zoom-in",
|
|
103
|
+
enabled: "{= ${$mdcChart>/_chart/getZoomInfo/enabled} && ${$mdcChart>/_chart/getZoomInfo/currentZoomLevel} < 1}"
|
|
76
104
|
});
|
|
77
|
-
},
|
|
78
105
|
|
|
79
|
-
|
|
80
|
-
|
|
106
|
+
this._oZoomOutButton = new OverflowButton({
|
|
107
|
+
tooltip: MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"),
|
|
108
|
+
icon: "sap-icon://zoom-out",
|
|
109
|
+
enabled: "{= ${$mdcChart>/_chart/getZoomInfo/enabled} && ${$mdcChart>/_chart/getZoomInfo/currentZoomLevel} > 0}"
|
|
110
|
+
});
|
|
81
111
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
112
|
+
oToolbar.addEnd(this._oZoomInButton);
|
|
113
|
+
oToolbar.addEnd(this._oZoomOutButton);
|
|
114
|
+
}
|
|
85
115
|
|
|
86
|
-
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.ZoomInOut)) {
|
|
87
116
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
117
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.DrillDownUp) < 0) {
|
|
118
|
+
oChart._oDrillDownBtn = new OverflowButton(oChart.getId() + "-drillDown", {
|
|
119
|
+
icon: "sap-icon://drill-down",
|
|
120
|
+
enabled: false,
|
|
121
|
+
tooltip: MDCRb.getText("chart.CHART_DRILLDOWN_TITLE"),
|
|
122
|
+
text: MDCRb.getText("chart.CHART_DRILLDOWN_TITLE"),
|
|
123
|
+
press: [
|
|
124
|
+
oChart._showDrillDown, oChart
|
|
125
|
+
]
|
|
126
|
+
});
|
|
127
|
+
oToolbar.addEnd(oChart._oDrillDownBtn);
|
|
128
|
+
}
|
|
93
129
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
130
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.Legend) < 0) {
|
|
131
|
+
this._legendBtn = new OverflowToggleButton(oChart.getId() + "-chart_legend", {
|
|
132
|
+
type: "Transparent",
|
|
133
|
+
text: MDCRb.getText("chart.LEGENDBTN_TEXT"),
|
|
134
|
+
tooltip: MDCRb.getText('chart.LEGENDBTN_TOOLTIP'),
|
|
135
|
+
icon: "sap-icon://legend",
|
|
136
|
+
enabled: false,
|
|
137
|
+
pressed: false
|
|
138
|
+
});
|
|
99
139
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
140
|
+
oToolbar.addEnd(this._legendBtn);
|
|
141
|
+
}
|
|
103
142
|
|
|
143
|
+
//Check p13n mode property on the chart and enable only desired buttons
|
|
144
|
+
var aP13nMode = oChart.getP13nMode() || [];
|
|
104
145
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
});
|
|
115
|
-
oToolbar.addEnd(oChart._oDrillDownBtn);
|
|
116
|
-
}
|
|
146
|
+
if (aP13nMode.indexOf("Item") > -1) {
|
|
147
|
+
this._chartSettingsBtn = new OverflowButton(oChart.getId() + "-chart_settings", {
|
|
148
|
+
tooltip: MDCRb.getText('chart.PERSONALIZATION_DIALOG_TITLE'),
|
|
149
|
+
text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_TITLE'),
|
|
150
|
+
icon: "sap-icon://action-settings",//TODO the right icon for P13n chart dialog
|
|
151
|
+
ariaHasPopup: HasPopup.ListBox,
|
|
152
|
+
enabled: false
|
|
153
|
+
});
|
|
154
|
+
oToolbar.addEnd(this._chartSettingsBtn);
|
|
117
155
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
pressed: false
|
|
125
|
-
});
|
|
156
|
+
ShortcutHintsMixin.addConfig(this._chartSettingsBtn, {
|
|
157
|
+
addAccessibilityLabel: true,
|
|
158
|
+
messageBundleKey: Device.os.macintosh ? "mdc.PERSONALIZATION_SHORTCUT_MAC" : "mdc.PERSONALIZATION_SHORTCUT" // Cmd+, or Ctrl+,
|
|
159
|
+
},
|
|
160
|
+
oChart // we need the chart instance, otherwise the messageBundleKey does not find the resource bundle
|
|
161
|
+
);
|
|
126
162
|
|
|
127
|
-
|
|
128
|
-
}
|
|
163
|
+
}
|
|
129
164
|
|
|
130
|
-
|
|
131
|
-
|
|
165
|
+
if (aP13nMode.indexOf("Sort") > -1) {
|
|
166
|
+
this._sortBtn = new OverflowButton(oChart.getId() + "-sort_settings", {
|
|
167
|
+
ariaHasPopup: HasPopup.ListBox,
|
|
168
|
+
icon: "sap-icon://sort",
|
|
169
|
+
tooltip: MDCRb.getText('sort.PERSONALIZATION_DIALOG_TITLE'),
|
|
170
|
+
text: MDCRb.getText('sort.PERSONALIZATION_DIALOG_TITLE'),
|
|
171
|
+
enabled: false
|
|
172
|
+
});
|
|
173
|
+
oToolbar.addEnd(this._sortBtn);
|
|
174
|
+
}
|
|
132
175
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
icon: "sap-icon://action-settings",//TODO the right icon for P13n chart dialog
|
|
138
|
-
ariaHasPopup: HasPopup.ListBox,
|
|
139
|
-
enabled: false
|
|
140
|
-
});
|
|
141
|
-
oToolbar.addEnd(this._chartSettingsBtn);
|
|
176
|
+
if (aP13nMode.indexOf("Type") > -1) {
|
|
177
|
+
this._chartTypeBtn = new ChartTypeButton(oChart);
|
|
178
|
+
oToolbar.addEnd(this._chartTypeBtn);
|
|
179
|
+
}
|
|
142
180
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
messageBundleKey: Device.os.macintosh ? "mdc.PERSONALIZATION_SHORTCUT_MAC" : "mdc.PERSONALIZATION_SHORTCUT" // Cmd+, or Ctrl+,
|
|
146
|
-
},
|
|
147
|
-
oChart // we need the chart instance, otherwise the messageBundleKey does not find the resource bundle
|
|
148
|
-
);
|
|
181
|
+
oToolbar.setEnabled(false);
|
|
182
|
+
};
|
|
149
183
|
|
|
150
|
-
|
|
184
|
+
/**
|
|
185
|
+
*
|
|
186
|
+
* Updates the mdc.Chart toolbar content
|
|
187
|
+
*/
|
|
188
|
+
ToolbarHandler.prototype.updateToolbar = function(oChart) {
|
|
189
|
+
var oToolbar = oChart.getAggregation("_toolbar");
|
|
151
190
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
icon: "sap-icon://sort",
|
|
156
|
-
tooltip: MDCRb.getText('sort.PERSONALIZATION_DIALOG_TITLE'),
|
|
157
|
-
text: MDCRb.getText('sort.PERSONALIZATION_DIALOG_TITLE'),
|
|
158
|
-
enabled: false
|
|
159
|
-
});
|
|
160
|
-
oToolbar.addEnd(this._sortBtn);
|
|
161
|
-
}
|
|
191
|
+
if (!oToolbar) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
162
194
|
|
|
163
|
-
|
|
164
|
-
this._chartTypeBtn = new ChartTypeButton(oChart);
|
|
165
|
-
oToolbar.addEnd(this._chartTypeBtn);
|
|
166
|
-
}
|
|
195
|
+
//oToolbar.destroyEnd(true);
|
|
167
196
|
|
|
168
|
-
|
|
169
|
-
|
|
197
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.ZoomInOut)) {
|
|
198
|
+
var oInnerChart = oChart.getAggregation("_chart");
|
|
170
199
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
var oToolbar = oChart.getAggregation("_toolbar");
|
|
200
|
+
this._oZoomInButton.setTooltip(MDCRb.getText("chart.TOOLBAR_ZOOM_IN"));
|
|
201
|
+
this._oZoomInButton.setText(MDCRb.getText("chart.TOOLBAR_ZOOM_IN"));
|
|
202
|
+
this._oZoomInButton.attachPress(function onZoomInButtonPressed(oControlEvent) {
|
|
203
|
+
this.handleZoomIn(oInnerChart, this._oZoomInButton, this._oZoomOutButton);
|
|
204
|
+
}.bind(this));
|
|
177
205
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
206
|
+
this._oZoomOutButton.setTooltip(MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"));
|
|
207
|
+
this._oZoomOutButton.setText(MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"));
|
|
208
|
+
this._oZoomOutButton.attachPress(function onZoomInButtonPressed(oControlEvent) {
|
|
209
|
+
this.handleZoomOut(oInnerChart, this._oZoomInButton, this._oZoomOutButton);
|
|
210
|
+
}.bind(this));
|
|
181
211
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
this._oZoomInButton.setTooltip(MDCRb.getText("chart.TOOLBAR_ZOOM_IN"));
|
|
188
|
-
this._oZoomInButton.setText(MDCRb.getText("chart.TOOLBAR_ZOOM_IN"));
|
|
189
|
-
this._oZoomInButton.attachPress(function onZoomInButtonPressed(oControlEvent) {
|
|
190
|
-
this.handleZoomIn(oInnerChart, this._oZoomInButton, this._oZoomOutButton);
|
|
191
|
-
}.bind(this));
|
|
192
|
-
|
|
193
|
-
this._oZoomOutButton.setTooltip(MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"));
|
|
194
|
-
this._oZoomOutButton.setText(MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"));
|
|
195
|
-
this._oZoomOutButton.attachPress(function onZoomInButtonPressed(oControlEvent) {
|
|
196
|
-
this.handleZoomOut(oInnerChart, this._oZoomInButton, this._oZoomOutButton);
|
|
197
|
-
}.bind(this));
|
|
198
|
-
|
|
199
|
-
if (oInnerChart) {
|
|
200
|
-
oInnerChart.attachRenderComplete(function onInnerChartRenderCompleted(oControlEvent) {
|
|
201
|
-
var oZoomInfo = oInnerChart.getZoomInfo();
|
|
202
|
-
this.handleInnerChartRenderCompleted(oZoomInfo, this._oZoomInButton, this._oZoomOutButton);
|
|
203
|
-
}, this);
|
|
204
|
-
}
|
|
212
|
+
if (oInnerChart) {
|
|
213
|
+
oInnerChart.attachRenderComplete(function onInnerChartRenderCompleted(oControlEvent) {
|
|
214
|
+
var oZoomInfo = oInnerChart.getZoomInfo();
|
|
215
|
+
this.handleInnerChartRenderCompleted(oZoomInfo, this._oZoomInButton, this._oZoomOutButton);
|
|
216
|
+
}, this);
|
|
205
217
|
}
|
|
218
|
+
}
|
|
206
219
|
|
|
207
220
|
|
|
208
|
-
|
|
221
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.DrillDownUp) < 0) {
|
|
209
222
|
|
|
210
|
-
|
|
211
|
-
|
|
223
|
+
oChart._oDrillDownBtn.setEnabled(true);
|
|
224
|
+
}
|
|
212
225
|
|
|
213
|
-
|
|
214
|
-
|
|
226
|
+
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.Legend) < 0) {
|
|
227
|
+
this._legendBtn.setEnabled(true);
|
|
228
|
+
this._legendBtn.setPressed(oChart.getLegendVisible());
|
|
229
|
+
this._legendBtn.attachPress(function(){
|
|
230
|
+
oChart.setLegendVisible(!oChart.getLegendVisible());
|
|
215
231
|
this._legendBtn.setPressed(oChart.getLegendVisible());
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
this._legendBtn.setPressed(oChart.getLegendVisible());
|
|
219
|
-
}.bind(this));
|
|
220
|
-
}
|
|
232
|
+
}.bind(this));
|
|
233
|
+
}
|
|
221
234
|
|
|
222
|
-
|
|
223
|
-
|
|
235
|
+
//Check p13n mode property on the chart and enable only desired buttons
|
|
236
|
+
var aP13nMode = oChart.getP13nMode() || [];
|
|
224
237
|
|
|
225
|
-
|
|
238
|
+
if (aP13nMode.indexOf("Item") > -1) {
|
|
226
239
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
});
|
|
240
|
+
this._chartSettingsBtn.setEnabled(true);
|
|
241
|
+
this._chartSettingsBtn.attachPress(function(oEvent) {
|
|
242
|
+
var oSource = oEvent.getSource();
|
|
243
|
+
oChart._getPropertyData().then(function(aProperties) {
|
|
244
|
+
ChartSettings.showPanel(oChart, "Chart", oSource, aProperties);
|
|
233
245
|
});
|
|
234
|
-
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
235
248
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
});
|
|
249
|
+
if (aP13nMode.indexOf("Sort") > -1) {
|
|
250
|
+
this._sortBtn.setEnabled(true);
|
|
251
|
+
this._sortBtn.attachPress(function(oEvent) {
|
|
252
|
+
var oSource = oEvent.getSource();
|
|
253
|
+
oChart._getPropertyData().then(function(aProperties) {
|
|
254
|
+
ChartSettings.showPanel(oChart, "Sort", oSource, aProperties);
|
|
243
255
|
});
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
if (aP13nMode.indexOf("Type") > -1) {
|
|
247
|
-
this._chartTypeBtn.bindToInnerChart(oChart);
|
|
248
|
-
//oToolbar.addEnd(new ChartTypeButton(oChart));
|
|
249
|
-
}
|
|
256
|
+
});
|
|
257
|
+
}
|
|
250
258
|
|
|
259
|
+
if (aP13nMode.indexOf("Type") > -1) {
|
|
260
|
+
this._chartTypeBtn.bindToInnerChart(oChart);
|
|
261
|
+
//oToolbar.addEnd(new ChartTypeButton(oChart));
|
|
262
|
+
}
|
|
251
263
|
|
|
252
|
-
oToolbar.setEnabled(true);
|
|
253
|
-
},
|
|
254
264
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
},
|
|
265
|
+
oToolbar.setEnabled(true);
|
|
266
|
+
};
|
|
258
267
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
this.toggleZoomButtonsEnabledState(oZoomInfo, oZoomInButton, oZoomOutButton);
|
|
263
|
-
},
|
|
268
|
+
ToolbarHandler.prototype.handleInnerChartRenderCompleted = function(oZoomInfo, oZoomInButton, oZoomOutButton) {
|
|
269
|
+
this.toggleZoomButtonsEnabledState(oZoomInfo, oZoomInButton, oZoomOutButton);
|
|
270
|
+
};
|
|
264
271
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
272
|
+
ToolbarHandler.prototype.handleZoomIn = function(oInnerChart, oZoomInButton, oZoomOutButton) {
|
|
273
|
+
oInnerChart.zoom({ direction: "in" });
|
|
274
|
+
var oZoomInfo = oInnerChart.getZoomInfo();
|
|
275
|
+
this.toggleZoomButtonsEnabledState(oZoomInfo, oZoomInButton, oZoomOutButton);
|
|
276
|
+
};
|
|
270
277
|
|
|
271
|
-
|
|
272
|
-
|
|
278
|
+
ToolbarHandler.prototype.handleZoomOut = function(oInnerChart, oZoomInButton, oZoomOutButton) {
|
|
279
|
+
oInnerChart.zoom({ direction: "out" });
|
|
280
|
+
var oZoomInfo = oInnerChart.getZoomInfo();
|
|
281
|
+
this.toggleZoomButtonsEnabledState(oZoomInfo, oZoomInButton, oZoomOutButton);
|
|
282
|
+
};
|
|
273
283
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
oZoomInButton.setEnabled(false);
|
|
277
|
-
oZoomOutButton.setEnabled(false);
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
284
|
+
ToolbarHandler.prototype.toggleZoomButtonsEnabledState = function(oZoomInfo, oZoomInButton, oZoomOutButton) {
|
|
285
|
+
var vZoomLevel = oZoomInfo.currentZoomLevel;
|
|
280
286
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
287
|
+
// zooming isn't applicable, perhaps all data points are plotted
|
|
288
|
+
if (vZoomLevel == null) { // zoom level is null or undefined
|
|
289
|
+
oZoomInButton.setEnabled(false);
|
|
290
|
+
oZoomOutButton.setEnabled(false);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
285
293
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
294
|
+
// zoomed out all the way
|
|
295
|
+
if (vZoomLevel === 0) {
|
|
296
|
+
oZoomInButton.setEnabled(true);
|
|
297
|
+
oZoomOutButton.setEnabled(false);
|
|
291
298
|
|
|
292
|
-
|
|
299
|
+
// if the zoom out button is disabled and it currently has focus,
|
|
300
|
+
// set the focus to the zoom in button
|
|
301
|
+
if (oZoomOutButton.getFocusDomRef() === document.activeElement) {
|
|
302
|
+
oZoomInButton.focus();
|
|
293
303
|
}
|
|
294
304
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
oZoomOutButton.setEnabled(true);
|
|
298
|
-
oZoomInButton.setEnabled(false);
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
299
307
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}
|
|
308
|
+
// zoomed in all the way
|
|
309
|
+
if (vZoomLevel === 1) {
|
|
310
|
+
oZoomOutButton.setEnabled(true);
|
|
311
|
+
oZoomInButton.setEnabled(false);
|
|
305
312
|
|
|
306
|
-
|
|
313
|
+
// if the zoom in button is disabled and it currently has focus,
|
|
314
|
+
// set the focus to the zoom out button
|
|
315
|
+
if (oZoomInButton.getFocusDomRef() === document.activeElement) {
|
|
316
|
+
oZoomOutButton.focus();
|
|
307
317
|
}
|
|
308
318
|
|
|
309
|
-
|
|
310
|
-
oZoomInButton.setEnabled(true);
|
|
311
|
-
oZoomOutButton.setEnabled(true);
|
|
319
|
+
return;
|
|
312
320
|
}
|
|
321
|
+
|
|
322
|
+
// the zoom level is between 0 and 1
|
|
323
|
+
oZoomInButton.setEnabled(true);
|
|
324
|
+
oZoomOutButton.setEnabled(true);
|
|
313
325
|
};
|
|
314
326
|
|
|
315
327
|
return ToolbarHandler;
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @class The ChartSelectionDetailsNew control creates a sap.m.SelectionDetails popover based on metadata and the configuration specified.
|
|
34
34
|
* @extends sap.m.SelectionDetails
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.96.1
|
|
37
37
|
* @constructor
|
|
38
38
|
* @experimental As of version ...
|
|
39
39
|
* @private
|
|
@@ -41,7 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
* @class The ChartToolbarNew control creates a sap.m.OverflowToolbar based on metadata and the configuration specified.
|
|
42
42
|
* @extends sap.m.OverflowToolbar
|
|
43
43
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
44
|
+
* @version 1.96.1
|
|
45
45
|
* @constructor
|
|
46
46
|
* @experimental As of version ...
|
|
47
47
|
* @private
|
|
@@ -92,7 +92,10 @@ sap.ui.define([
|
|
|
92
92
|
|
|
93
93
|
this.addEnd(this._oChartSelectionDetails);
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
//Check p13n mode property on the chart and enable only desired buttons
|
|
96
|
+
var aP13nMode = oMDCChart.getP13nMode() || [];
|
|
97
|
+
|
|
98
|
+
if ( aP13nMode.indexOf("Item") > -1 && (!oMDCChart.getIgnoreToolbarActions().length || oMDCChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.DrillDownUp) < 0)) {
|
|
96
99
|
this._oDrillDownBtn = new OverflowButton(oMDCChart.getId() + "-drillDown", {
|
|
97
100
|
icon: "sap-icon://drill-down",
|
|
98
101
|
tooltip: MDCRb.getText("chart.CHART_DRILLDOWN_TITLE"),
|
|
@@ -140,9 +143,6 @@ sap.ui.define([
|
|
|
140
143
|
this.addEnd(this.oZoomOutButton);
|
|
141
144
|
}
|
|
142
145
|
|
|
143
|
-
//Check p13n mode property on the chart and enable only desired buttons
|
|
144
|
-
var aP13nMode = oMDCChart.getP13nMode() || [];
|
|
145
|
-
|
|
146
146
|
if (aP13nMode.indexOf("Sort") > -1 || aP13nMode.indexOf("Item") > -1) {
|
|
147
147
|
this._oSettingsBtn = new OverflowButton(oMDCChart.getId() + "-chart_settings", {
|
|
148
148
|
icon: "sap-icon://action-settings",//TODO the right icon for P13n chart dialog
|
|
@@ -160,10 +160,6 @@ sap.ui.define([
|
|
|
160
160
|
this.addEnd(this._oChartTypeBtn);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
//Add initial actions from MDC Chart
|
|
164
|
-
oMDCChart._getInitialToolbarActions().forEach(function(oAction){
|
|
165
|
-
this.addAction(oAction);
|
|
166
|
-
}.bind(this));
|
|
167
163
|
};
|
|
168
164
|
|
|
169
165
|
ChartToolbar.prototype.toggleZoomButtons = function (oMDCChart) {
|
|
@@ -194,7 +190,15 @@ sap.ui.define([
|
|
|
194
190
|
};
|
|
195
191
|
|
|
196
192
|
ChartToolbar.prototype._getZoomEnablement = function (oMDCChart) {
|
|
197
|
-
var zoomInfo
|
|
193
|
+
var zoomInfo;
|
|
194
|
+
|
|
195
|
+
try {
|
|
196
|
+
zoomInfo = oMDCChart.getZoomState();
|
|
197
|
+
} catch (error) {
|
|
198
|
+
//Catch the case when an inner chart is not yet rendered
|
|
199
|
+
zoomInfo = {enabled: false};
|
|
200
|
+
}
|
|
201
|
+
|
|
198
202
|
|
|
199
203
|
if (zoomInfo && zoomInfo.hasOwnProperty("currentZoomLevel") && zoomInfo.currentZoomLevel != null && zoomInfo.enabled) {
|
|
200
204
|
var toolbarZoomInfo = {enabled: true};
|