@openui5/sap.m 1.103.1 → 1.104.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +2 -3
- package/.reuse/dep5 +17 -0
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
- package/THIRDPARTY.txt +35 -2
- package/package.json +4 -4
- package/src/sap/m/.library +1 -1
- package/src/sap/m/AccButton.js +1 -1
- package/src/sap/m/ActionListItem.js +1 -1
- package/src/sap/m/ActionSelect.js +1 -1
- package/src/sap/m/ActionSheet.js +1 -1
- package/src/sap/m/App.js +1 -1
- package/src/sap/m/AssociativeOverflowToolbar.js +1 -1
- package/src/sap/m/Avatar.js +1 -1
- package/src/sap/m/Bar.js +11 -10
- package/src/sap/m/Breadcrumbs.js +2 -2
- package/src/sap/m/BusyDialog.js +1 -1
- package/src/sap/m/BusyIndicator.js +1 -1
- package/src/sap/m/Button.js +3 -2
- package/src/sap/m/Carousel.js +1 -1
- package/src/sap/m/CarouselLayout.js +1 -1
- package/src/sap/m/CheckBox.js +1 -1
- package/src/sap/m/ColorPalette.js +1 -1
- package/src/sap/m/ColorPalettePopover.js +1 -1
- package/src/sap/m/Column.js +1 -1
- package/src/sap/m/ColumnHeaderPopover.js +1 -1
- package/src/sap/m/ColumnListItem.js +1 -1
- package/src/sap/m/ColumnPopoverActionItem.js +1 -1
- package/src/sap/m/ColumnPopoverCustomItem.js +1 -1
- package/src/sap/m/ColumnPopoverItem.js +1 -1
- package/src/sap/m/ColumnPopoverSelectListItem.js +1 -1
- package/src/sap/m/ColumnPopoverSortItem.js +1 -1
- package/src/sap/m/ComboBox.js +1 -1
- package/src/sap/m/ComboBoxBase.js +1 -1
- package/src/sap/m/ComboBoxTextField.js +1 -1
- package/src/sap/m/CustomDynamicDateOption.js +1 -1
- package/src/sap/m/CustomListItem.js +1 -1
- package/src/sap/m/CustomTile.js +1 -1
- package/src/sap/m/CustomTreeItem.js +1 -1
- package/src/sap/m/DatePicker.js +14 -22
- package/src/sap/m/DateRangeSelection.js +45 -38
- package/src/sap/m/DateTimeField.js +87 -20
- package/src/sap/m/DateTimeInput.js +1 -1
- package/src/sap/m/DateTimePicker.js +40 -21
- package/src/sap/m/Dialog.js +1 -1
- package/src/sap/m/DisplayListItem.js +1 -1
- package/src/sap/m/DraftIndicator.js +1 -1
- package/src/sap/m/DynamicDate.js +1 -1
- package/src/sap/m/DynamicDateOption.js +6 -4
- package/src/sap/m/DynamicDateRange.js +3 -2
- package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
- package/src/sap/m/ExpandableText.js +1 -1
- package/src/sap/m/FacetFilter.js +1 -1
- package/src/sap/m/FacetFilterItem.js +1 -1
- package/src/sap/m/FacetFilterList.js +1 -1
- package/src/sap/m/FeedContent.js +1 -1
- package/src/sap/m/FeedInput.js +1 -1
- package/src/sap/m/FeedListItem.js +1 -1
- package/src/sap/m/FeedListItemAction.js +1 -1
- package/src/sap/m/Fiori20Adapter.js +2 -2
- package/src/sap/m/FlexBox.js +1 -1
- package/src/sap/m/FlexItemData.js +1 -1
- package/src/sap/m/FormattedText.js +1 -1
- package/src/sap/m/GenericTag.js +1 -1
- package/src/sap/m/GenericTile.js +12 -9
- package/src/sap/m/GenericTileLineModeRenderer.js +4 -4
- package/src/sap/m/GenericTileRenderer.js +16 -4
- package/src/sap/m/GroupHeaderListItem.js +1 -1
- package/src/sap/m/GrowingEnablement.js +11 -4
- package/src/sap/m/GrowingList.js +1 -1
- package/src/sap/m/HBox.js +1 -1
- package/src/sap/m/HeaderContainer.js +3 -3
- package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
- package/src/sap/m/IconTabBar.js +1 -1
- package/src/sap/m/IconTabBarSelectList.js +1 -1
- package/src/sap/m/IconTabFilter.js +1 -1
- package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
- package/src/sap/m/IconTabHeader.js +7 -2
- package/src/sap/m/IconTabSeparator.js +1 -1
- package/src/sap/m/IllustratedMessage.js +63 -24
- package/src/sap/m/IllustratedMessageRenderer.js +10 -6
- package/src/sap/m/Illustration.js +1 -1
- package/src/sap/m/IllustrationPool.js +1 -0
- package/src/sap/m/Image.js +1 -1
- package/src/sap/m/ImageContent.js +1 -1
- package/src/sap/m/Input.js +1 -4
- package/src/sap/m/InputBase.js +1 -1
- package/src/sap/m/InputListItem.js +1 -1
- package/src/sap/m/Label.js +1 -1
- package/src/sap/m/LightBox.js +1 -1
- package/src/sap/m/LightBoxItem.js +1 -1
- package/src/sap/m/Link.js +41 -5
- package/src/sap/m/LinkRenderer.js +18 -10
- package/src/sap/m/List.js +1 -1
- package/src/sap/m/ListBase.js +4 -1
- package/src/sap/m/ListItemBase.js +10 -2
- package/src/sap/m/MaskEnabler.js +52 -2
- package/src/sap/m/MaskInput.js +23 -1
- package/src/sap/m/MaskInputRule.js +1 -1
- package/src/sap/m/Menu.js +1 -1
- package/src/sap/m/MenuButton.js +1 -1
- package/src/sap/m/MenuItem.js +1 -1
- package/src/sap/m/MenuListItem.js +1 -1
- package/src/sap/m/MessageItem.js +1 -1
- package/src/sap/m/MessageListItem.js +1 -1
- package/src/sap/m/MessagePage.js +1 -1
- package/src/sap/m/MessagePopover.js +4 -1
- package/src/sap/m/MessagePopoverItem.js +1 -1
- package/src/sap/m/MessageStrip.js +1 -1
- package/src/sap/m/MessageToast.js +1 -1
- package/src/sap/m/MessageView.js +1 -1
- package/src/sap/m/MultiComboBox.js +1 -1
- package/src/sap/m/MultiEditField.js +1 -1
- package/src/sap/m/MultiInput.js +1 -1
- package/src/sap/m/NavContainer.js +20 -16
- package/src/sap/m/NewsContent.js +1 -1
- package/src/sap/m/NotificationList.js +1 -1
- package/src/sap/m/NotificationListBase.js +1 -1
- package/src/sap/m/NotificationListGroup.js +1 -1
- package/src/sap/m/NotificationListItem.js +1 -1
- package/src/sap/m/NumericContent.js +1 -1
- package/src/sap/m/NumericInput.js +1 -1
- package/src/sap/m/ObjectAttribute.js +1 -1
- package/src/sap/m/ObjectHeader.js +1 -1
- package/src/sap/m/ObjectIdentifier.js +1 -1
- package/src/sap/m/ObjectListItem.js +1 -1
- package/src/sap/m/ObjectMarker.js +1 -1
- package/src/sap/m/ObjectNumber.js +1 -1
- package/src/sap/m/ObjectNumberRenderer.js +10 -3
- package/src/sap/m/ObjectStatus.js +1 -1
- package/src/sap/m/OverflowToolbar.js +1 -1
- package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
- package/src/sap/m/OverflowToolbarButton.js +1 -1
- package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
- package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
- package/src/sap/m/P13nAnyFilterItem.js +1 -1
- package/src/sap/m/P13nColumnsItem.js +1 -1
- package/src/sap/m/P13nColumnsPanel.js +1 -1
- package/src/sap/m/P13nConditionPanel.js +1 -1
- package/src/sap/m/P13nDialog.js +1 -1
- package/src/sap/m/P13nDimMeasureItem.js +1 -1
- package/src/sap/m/P13nDimMeasurePanel.js +1 -1
- package/src/sap/m/P13nFilterItem.js +1 -1
- package/src/sap/m/P13nFilterPanel.js +1 -1
- package/src/sap/m/P13nGroupItem.js +1 -1
- package/src/sap/m/P13nGroupPanel.js +1 -1
- package/src/sap/m/P13nItem.js +1 -1
- package/src/sap/m/P13nPanel.js +1 -1
- package/src/sap/m/P13nSelectionItem.js +1 -1
- package/src/sap/m/P13nSelectionPanel.js +1 -1
- package/src/sap/m/P13nSortItem.js +1 -1
- package/src/sap/m/P13nSortPanel.js +1 -1
- package/src/sap/m/PDFViewer.js +2 -2
- package/src/sap/m/PDFViewerRenderer.js +1 -0
- package/src/sap/m/Page.js +1 -1
- package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
- package/src/sap/m/PagingButton.js +1 -1
- package/src/sap/m/Panel.js +1 -1
- package/src/sap/m/PlanningCalendar.js +1 -1
- package/src/sap/m/PlanningCalendarHeader.js +1 -1
- package/src/sap/m/PlanningCalendarLegend.js +1 -1
- package/src/sap/m/PlanningCalendarRow.js +1 -1
- package/src/sap/m/PlanningCalendarView.js +1 -1
- package/src/sap/m/Popover.js +4 -4
- package/src/sap/m/ProgressIndicator.js +1 -1
- package/src/sap/m/ProgressIndicatorRenderer.js +6 -3
- package/src/sap/m/PullToRefresh.js +1 -1
- package/src/sap/m/QuickView.js +1 -1
- package/src/sap/m/QuickViewBase.js +1 -1
- package/src/sap/m/QuickViewCard.js +1 -1
- package/src/sap/m/QuickViewGroup.js +1 -1
- package/src/sap/m/QuickViewGroupElement.js +1 -1
- package/src/sap/m/QuickViewPage.js +1 -1
- package/src/sap/m/RadioButton.js +1 -1
- package/src/sap/m/RadioButtonGroup.js +1 -1
- package/src/sap/m/RangeSlider.js +1 -1
- package/src/sap/m/RatingIndicator.js +8 -1
- package/src/sap/m/RatingIndicatorRenderer.js +13 -4
- package/src/sap/m/ResponsivePopover.js +1 -1
- package/src/sap/m/ResponsiveScale.js +1 -1
- package/src/sap/m/ScrollBar.js +1 -1
- package/src/sap/m/ScrollContainer.js +1 -1
- package/src/sap/m/SearchField.js +1 -1
- package/src/sap/m/SegmentedButton.js +1 -1
- package/src/sap/m/SegmentedButtonItem.js +1 -1
- package/src/sap/m/Select.js +5 -12
- package/src/sap/m/SelectDialog.js +1 -1
- package/src/sap/m/SelectDialogBase.js +1 -1
- package/src/sap/m/SelectList.js +1 -1
- package/src/sap/m/SelectionDetails.js +1 -1
- package/src/sap/m/SelectionDetailsFacade.js +2 -2
- package/src/sap/m/SelectionDetailsItem.js +1 -1
- package/src/sap/m/SelectionDetailsItemLine.js +1 -1
- package/src/sap/m/Shell.js +1 -1
- package/src/sap/m/SimpleFixFlex.js +1 -1
- package/src/sap/m/SinglePlanningCalendar.js +1 -1
- package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarGrid.js +1 -1
- package/src/sap/m/SinglePlanningCalendarMonthGrid.js +1 -1
- package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
- package/src/sap/m/SlideTile.js +1 -1
- package/src/sap/m/Slider.js +1 -1
- package/src/sap/m/SliderTooltip.js +1 -1
- package/src/sap/m/SliderTooltipBase.js +1 -1
- package/src/sap/m/SliderTooltipContainer.js +1 -1
- package/src/sap/m/SplitApp.js +1 -1
- package/src/sap/m/SplitButton.js +1 -1
- package/src/sap/m/SplitContainer.js +1 -1
- package/src/sap/m/StandardDynamicDateOption.js +1 -1
- package/src/sap/m/StandardListItem.js +1 -1
- package/src/sap/m/StandardTile.js +1 -1
- package/src/sap/m/StandardTreeItem.js +1 -1
- package/src/sap/m/StepInput.js +1 -1
- package/src/sap/m/SuggestionItem.js +1 -1
- package/src/sap/m/SuggestionsPopover.js +1 -1
- package/src/sap/m/Switch.js +1 -1
- package/src/sap/m/TabContainer.js +1 -1
- package/src/sap/m/TabContainerItem.js +1 -1
- package/src/sap/m/TabStrip.js +1 -1
- package/src/sap/m/TabStripItem.js +1 -1
- package/src/sap/m/Table.js +1 -1
- package/src/sap/m/TablePersoController.js +1 -1
- package/src/sap/m/TablePersoDialog.js +1 -1
- package/src/sap/m/TablePersoProvider.js +1 -1
- package/src/sap/m/TableSelectDialog.js +1 -1
- package/src/sap/m/Text.js +1 -1
- package/src/sap/m/TextArea.js +1 -1
- package/src/sap/m/Tile.js +1 -1
- package/src/sap/m/TileContainer.js +1 -1
- package/src/sap/m/TileContent.js +8 -9
- package/src/sap/m/TileContentRenderer.js +1 -1
- package/src/sap/m/TimePicker.js +43 -6
- package/src/sap/m/TimePickerClock.js +1 -1
- package/src/sap/m/TimePickerClocks.js +5 -3
- package/src/sap/m/TimePickerInputs.js +1 -1
- package/src/sap/m/TimePickerInternals.js +1 -1
- package/src/sap/m/TimePickerSlider.js +1 -1
- package/src/sap/m/TimePickerSliders.js +1 -1
- package/src/sap/m/Title.js +1 -1
- package/src/sap/m/TitlePropagationSupport.js +1 -1
- package/src/sap/m/ToggleButton.js +2 -2
- package/src/sap/m/Token.js +1 -1
- package/src/sap/m/Tokenizer.js +1 -1
- package/src/sap/m/Toolbar.js +1 -1
- package/src/sap/m/ToolbarLayoutData.js +1 -1
- package/src/sap/m/ToolbarSeparator.js +1 -1
- package/src/sap/m/ToolbarSpacer.js +1 -1
- package/src/sap/m/Tree.js +1 -1
- package/src/sap/m/TreeItemBase.js +1 -1
- package/src/sap/m/UploadCollection.js +2 -2
- package/src/sap/m/UploadCollectionItem.js +1 -1
- package/src/sap/m/UploadCollectionParameter.js +1 -1
- package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
- package/src/sap/m/VBox.js +1 -1
- package/src/sap/m/ValueStateHeader.js +1 -1
- package/src/sap/m/VariantItem.js +160 -0
- package/src/sap/m/VariantManagement.js +610 -547
- package/src/sap/m/ViewSettingsCustomItem.js +1 -1
- package/src/sap/m/ViewSettingsCustomTab.js +1 -1
- package/src/sap/m/ViewSettingsDialog.js +1 -1
- package/src/sap/m/ViewSettingsFilterItem.js +1 -1
- package/src/sap/m/ViewSettingsItem.js +1 -1
- package/src/sap/m/VisibleItem.js +1 -1
- package/src/sap/m/WheelSlider.js +1 -1
- package/src/sap/m/WheelSliderContainer.js +1 -1
- package/src/sap/m/Wizard.js +1 -1
- package/src/sap/m/WizardProgressNavigator.js +1 -1
- package/src/sap/m/WizardStep.js +1 -1
- package/src/sap/m/changeHandler/AddTableColumn.js +1 -1
- package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
- package/src/sap/m/changeHandler/CombineButtons.js +1 -1
- package/src/sap/m/changeHandler/MoveTableColumns.js +2 -2
- package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
- package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
- package/src/sap/m/designtime/VariantManagement.designtime.js +34 -24
- package/src/sap/m/flexibility/EngineFlex.js +48 -0
- package/src/sap/m/library.js +29 -6
- package/src/sap/m/messagebundle.properties +23 -1
- package/src/sap/m/messagebundle_ar.properties +16 -5
- package/src/sap/m/messagebundle_bg.properties +11 -0
- package/src/sap/m/messagebundle_ca.properties +11 -0
- package/src/sap/m/messagebundle_cs.properties +11 -0
- package/src/sap/m/messagebundle_cy.properties +11 -0
- package/src/sap/m/messagebundle_da.properties +11 -0
- package/src/sap/m/messagebundle_de.properties +11 -0
- package/src/sap/m/messagebundle_el.properties +12 -1
- package/src/sap/m/messagebundle_en.properties +11 -0
- package/src/sap/m/messagebundle_en_GB.properties +11 -0
- package/src/sap/m/messagebundle_en_US_sappsd.properties +11 -0
- package/src/sap/m/messagebundle_en_US_saprigi.properties +9 -0
- package/src/sap/m/messagebundle_en_US_saptrc.properties +11 -0
- package/src/sap/m/messagebundle_es.properties +11 -0
- package/src/sap/m/messagebundle_es_MX.properties +11 -0
- package/src/sap/m/messagebundle_et.properties +11 -0
- package/src/sap/m/messagebundle_fi.properties +14 -3
- package/src/sap/m/messagebundle_fr.properties +11 -0
- package/src/sap/m/messagebundle_fr_CA.properties +11 -0
- package/src/sap/m/messagebundle_hi.properties +11 -0
- package/src/sap/m/messagebundle_hr.properties +15 -4
- package/src/sap/m/messagebundle_hu.properties +13 -2
- package/src/sap/m/messagebundle_id.properties +11 -0
- package/src/sap/m/messagebundle_it.properties +12 -1
- package/src/sap/m/messagebundle_iw.properties +12 -1
- package/src/sap/m/messagebundle_ja.properties +11 -0
- package/src/sap/m/messagebundle_kk.properties +11 -0
- package/src/sap/m/messagebundle_ko.properties +17 -6
- package/src/sap/m/messagebundle_lt.properties +11 -0
- package/src/sap/m/messagebundle_lv.properties +11 -0
- package/src/sap/m/messagebundle_ms.properties +11 -0
- package/src/sap/m/messagebundle_nl.properties +25 -14
- package/src/sap/m/messagebundle_no.properties +12 -1
- package/src/sap/m/messagebundle_pl.properties +12 -1
- package/src/sap/m/messagebundle_pt.properties +15 -4
- package/src/sap/m/messagebundle_pt_PT.properties +11 -0
- package/src/sap/m/messagebundle_ro.properties +11 -0
- package/src/sap/m/messagebundle_ru.properties +11 -0
- package/src/sap/m/messagebundle_sh.properties +11 -0
- package/src/sap/m/messagebundle_sk.properties +11 -0
- package/src/sap/m/messagebundle_sl.properties +11 -0
- package/src/sap/m/messagebundle_sv.properties +11 -0
- package/src/sap/m/messagebundle_th.properties +34 -23
- package/src/sap/m/messagebundle_tr.properties +11 -0
- package/src/sap/m/messagebundle_uk.properties +11 -0
- package/src/sap/m/messagebundle_vi.properties +11 -0
- package/src/sap/m/messagebundle_zh_CN.properties +11 -0
- package/src/sap/m/messagebundle_zh_TW.properties +11 -0
- package/src/sap/m/p13n/AbstractContainer.js +5 -5
- package/src/sap/m/p13n/AbstractContainerItem.js +2 -2
- package/src/sap/m/p13n/BasePanel.js +4 -3
- package/src/sap/m/p13n/Container.js +1 -1
- package/src/sap/m/p13n/Engine.js +1253 -0
- package/src/sap/m/p13n/FlexUtil.js +162 -0
- package/src/sap/m/p13n/GroupController.js +145 -0
- package/src/sap/m/p13n/GroupPanel.js +10 -3
- package/src/sap/m/p13n/MetadataHelper.js +35 -0
- package/src/sap/m/p13n/PersistenceProvider.js +135 -0
- package/src/sap/m/p13n/Popup.js +46 -9
- package/src/sap/m/p13n/QueryPanel.js +1 -1
- package/src/sap/m/p13n/SelectionController.js +563 -0
- package/src/sap/m/p13n/SelectionPanel.js +13 -1
- package/src/sap/m/p13n/SortController.js +153 -0
- package/src/sap/m/p13n/SortPanel.js +11 -1
- package/src/sap/m/p13n/enum/PersistenceMode.js +43 -0
- package/src/sap/m/p13n/handler/xConfigHandler.js +166 -0
- package/src/sap/m/p13n/modification/FlexModificationHandler.js +90 -0
- package/src/sap/m/p13n/modification/LocalStorageModificationHandler.js +75 -0
- package/src/sap/m/p13n/modification/ModificationHandler.js +133 -0
- package/src/sap/m/p13n/modules/AdaptationProvider.js +67 -0
- package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +124 -0
- package/src/sap/m/p13n/modules/StateHandlerRegistry.js +101 -0
- package/src/sap/m/p13n/modules/UIManager.js +230 -0
- package/src/sap/m/p13n/modules/xConfigAPI.js +286 -0
- package/src/sap/m/plugins/ColumnResizer.js +15 -1
- package/src/sap/m/plugins/DataStateIndicator.js +2 -2
- package/src/sap/m/plugins/PasteProvider.js +1 -1
- package/src/sap/m/plugins/PluginBase.js +1 -1
- package/src/sap/m/semantic/AddAction.js +1 -1
- package/src/sap/m/semantic/CancelAction.js +1 -1
- package/src/sap/m/semantic/DeleteAction.js +1 -1
- package/src/sap/m/semantic/DetailPage.js +1 -1
- package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
- package/src/sap/m/semantic/EditAction.js +1 -1
- package/src/sap/m/semantic/FavoriteAction.js +1 -1
- package/src/sap/m/semantic/FilterAction.js +1 -1
- package/src/sap/m/semantic/FilterSelect.js +1 -1
- package/src/sap/m/semantic/FlagAction.js +1 -1
- package/src/sap/m/semantic/ForwardAction.js +1 -1
- package/src/sap/m/semantic/FullscreenPage.js +1 -1
- package/src/sap/m/semantic/GroupAction.js +1 -1
- package/src/sap/m/semantic/GroupSelect.js +1 -1
- package/src/sap/m/semantic/MainAction.js +1 -1
- package/src/sap/m/semantic/MasterPage.js +1 -1
- package/src/sap/m/semantic/MessagesIndicator.js +1 -1
- package/src/sap/m/semantic/MultiSelectAction.js +1 -1
- package/src/sap/m/semantic/NegativeAction.js +1 -1
- package/src/sap/m/semantic/OpenInAction.js +1 -1
- package/src/sap/m/semantic/PositiveAction.js +1 -1
- package/src/sap/m/semantic/PrintAction.js +1 -1
- package/src/sap/m/semantic/SaveAction.js +1 -1
- package/src/sap/m/semantic/Segment.js +1 -1
- package/src/sap/m/semantic/SegmentedContainer.js +1 -1
- package/src/sap/m/semantic/SemanticButton.js +1 -1
- package/src/sap/m/semantic/SemanticConfiguration.js +1 -1
- package/src/sap/m/semantic/SemanticControl.js +1 -1
- package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
- package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
- package/src/sap/m/semantic/SemanticPage.js +1 -1
- package/src/sap/m/semantic/SemanticSelect.js +1 -1
- package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
- package/src/sap/m/semantic/SendEmailAction.js +1 -1
- package/src/sap/m/semantic/SendMessageAction.js +1 -1
- package/src/sap/m/semantic/ShareInJamAction.js +1 -1
- package/src/sap/m/semantic/ShareMenu.js +1 -1
- package/src/sap/m/semantic/ShareMenuPage.js +1 -1
- package/src/sap/m/semantic/SortAction.js +1 -1
- package/src/sap/m/semantic/SortSelect.js +1 -1
- package/src/sap/m/table/Util.js +8 -3
- package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
- package/src/sap/m/table/columnmenu/Entry.js +1 -1
- package/src/sap/m/table/columnmenu/Item.js +1 -1
- package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
- package/src/sap/m/table/columnmenu/Menu.js +8 -2
- package/src/sap/m/table/columnmenu/QuickAction.js +1 -1
- package/src/sap/m/table/columnmenu/QuickActionBase.js +1 -1
- package/src/sap/m/table/columnmenu/QuickActionItem.js +1 -1
- package/src/sap/m/table/columnmenu/QuickGroup.js +21 -1
- package/src/sap/m/table/columnmenu/QuickGroupItem.js +13 -1
- package/src/sap/m/table/columnmenu/QuickSort.js +1 -1
- package/src/sap/m/table/columnmenu/QuickSortItem.js +1 -1
- package/src/sap/m/table/columnmenu/QuickTotal.js +21 -1
- package/src/sap/m/table/columnmenu/QuickTotalItem.js +13 -1
- package/src/sap/m/themes/base/Breadcrumbs.less +6 -0
- package/src/sap/m/themes/base/CheckBox.less +1 -0
- package/src/sap/m/themes/base/Dialog.less +1 -0
- package/src/sap/m/themes/base/FeedContent.less +13 -5
- package/src/sap/m/themes/base/GenericTile.less +39 -9
- package/src/sap/m/themes/base/IllustratedMessage.less +7 -0
- package/src/sap/m/themes/base/NumericContent.less +1 -1
- package/src/sap/m/themes/base/ObjectStatus.less +2 -1
- package/src/sap/m/themes/base/OverflowToolbarAssociativePopover.less +5 -1
- package/src/sap/m/themes/base/SelectList.less +0 -5
- package/src/sap/m/themes/base/SinglePlanningCalendarGrid.less +7 -0
- package/src/sap/m/themes/base/SlideTile.less +20 -4
- package/src/sap/m/themes/base/Table.less +11 -1
- package/src/sap/m/themes/base/TileContent.less +17 -0
- package/src/sap/m/upload/UploadSet.js +98 -15
- package/src/sap/m/upload/UploadSetItem.js +13 -1
- package/src/sap/m/upload/UploadSetRenderer.js +8 -16
- package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
|
@@ -6,18 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
// Provides control sap.m.VariantManagement.
|
|
8
8
|
sap.ui.define([
|
|
9
|
-
"sap/ui/model/Context",
|
|
10
|
-
"sap/ui/model/PropertyBinding",
|
|
11
9
|
"sap/ui/model/json/JSONModel",
|
|
10
|
+
"sap/ui/model/base/ManagedObjectModel",
|
|
12
11
|
"sap/ui/model/Filter",
|
|
13
12
|
"sap/ui/model/FilterOperator",
|
|
14
13
|
"sap/ui/Device",
|
|
15
14
|
"sap/ui/core/InvisibleText",
|
|
16
15
|
"sap/ui/core/Control",
|
|
17
16
|
"sap/ui/core/Icon",
|
|
17
|
+
"sap/ui/core/Item",
|
|
18
18
|
"sap/ui/layout/HorizontalLayout",
|
|
19
19
|
"sap/ui/layout/Grid",
|
|
20
|
-
'sap/base/Log',
|
|
21
20
|
"sap/m/SearchField",
|
|
22
21
|
"sap/m/RadioButton",
|
|
23
22
|
"sap/m/ColumnListItem",
|
|
@@ -46,18 +45,17 @@ sap.ui.define([
|
|
|
46
45
|
"sap/ui/core/library",
|
|
47
46
|
"sap/m/library"
|
|
48
47
|
], function(
|
|
49
|
-
Context,
|
|
50
|
-
PropertyBinding,
|
|
51
48
|
JSONModel,
|
|
49
|
+
ManagedObjectModel,
|
|
52
50
|
Filter,
|
|
53
51
|
FilterOperator,
|
|
54
52
|
Device,
|
|
55
53
|
InvisibleText,
|
|
56
54
|
Control,
|
|
57
55
|
Icon,
|
|
56
|
+
Item,
|
|
58
57
|
HorizontalLayout,
|
|
59
58
|
Grid,
|
|
60
|
-
Log,
|
|
61
59
|
SearchField,
|
|
62
60
|
RadioButton,
|
|
63
61
|
ColumnListItem,
|
|
@@ -94,6 +92,9 @@ sap.ui.define([
|
|
|
94
92
|
// shortcut for sap.m.ButtonType
|
|
95
93
|
var ButtonType = mobileLibrary.ButtonType;
|
|
96
94
|
|
|
95
|
+
// shortcut for sap.m.FlexAlignItems
|
|
96
|
+
var FlexAlignItems = mobileLibrary.FlexAlignItems;
|
|
97
|
+
|
|
97
98
|
// shortcut for sap.m.PlacementType
|
|
98
99
|
var PlacementType = mobileLibrary.PlacementType;
|
|
99
100
|
|
|
@@ -109,6 +110,9 @@ sap.ui.define([
|
|
|
109
110
|
// shortcut for sap.ui.core.TextAlign
|
|
110
111
|
var TextAlign = coreLibrary.TextAlign;
|
|
111
112
|
|
|
113
|
+
// shortcut for sap.ui.core.TitleLevel
|
|
114
|
+
var TitleLevel = coreLibrary.TitleLevel;
|
|
115
|
+
|
|
112
116
|
/**
|
|
113
117
|
* Constructor for a new <code>VariantManagement</code>.
|
|
114
118
|
* @param {string} [sId] - ID for the new control, generated automatically if no ID is given
|
|
@@ -132,42 +136,121 @@ sap.ui.define([
|
|
|
132
136
|
designtime: "sap/m/designtime/VariantManagement.designtime",
|
|
133
137
|
properties: {
|
|
134
138
|
/**
|
|
135
|
-
* Indicates that
|
|
139
|
+
* Indicates that default of variants is supported
|
|
136
140
|
*/
|
|
137
|
-
|
|
141
|
+
supportDefault: {
|
|
138
142
|
type: "boolean",
|
|
139
143
|
group: "Misc",
|
|
140
144
|
defaultValue: true
|
|
141
145
|
},
|
|
142
146
|
|
|
143
147
|
/**
|
|
144
|
-
* Indicates that
|
|
145
|
-
* opened.
|
|
148
|
+
* Indicates that favorite handling is supported
|
|
146
149
|
*/
|
|
147
|
-
|
|
150
|
+
supportFavorites: {
|
|
151
|
+
type: "boolean",
|
|
152
|
+
group: "Misc",
|
|
153
|
+
defaultValue: true
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Indicates that apply automatically functionality is supported
|
|
158
|
+
*/
|
|
159
|
+
supportApplyAutomatically: {
|
|
160
|
+
type: "boolean",
|
|
161
|
+
group: "Misc",
|
|
162
|
+
defaultValue: true
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Indicates that public functionality is supported
|
|
167
|
+
*/
|
|
168
|
+
supportPublic: {
|
|
169
|
+
type: "boolean",
|
|
170
|
+
group: "Misc",
|
|
171
|
+
defaultValue: true
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Indicates that contexts functionality is supported
|
|
176
|
+
*/
|
|
177
|
+
supportContexts: {
|
|
148
178
|
type: "boolean",
|
|
149
179
|
group: "Misc",
|
|
150
180
|
defaultValue: false
|
|
151
181
|
},
|
|
152
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Identifies the currently selected item
|
|
185
|
+
*/
|
|
186
|
+
selectedKey: {
|
|
187
|
+
type: "string",
|
|
188
|
+
group: "Misc",
|
|
189
|
+
defaultValue: ""
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Identifies the defaulted item
|
|
194
|
+
*/
|
|
195
|
+
defaultKey: {
|
|
196
|
+
type: "string",
|
|
197
|
+
group: "Misc",
|
|
198
|
+
defaultValue: ""
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Controls the visibility of the 'SaveAs' button
|
|
203
|
+
*/
|
|
204
|
+
showSaveAs: {
|
|
205
|
+
type: "boolean",
|
|
206
|
+
group: "Misc",
|
|
207
|
+
defaultValue: true
|
|
208
|
+
},
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* If set to <code>false</code> neither 'Save As' nor 'Save' buttons on the 'My Views' dialog are visible.
|
|
212
|
+
*/
|
|
213
|
+
creationAllowed: {
|
|
214
|
+
type: "boolean",
|
|
215
|
+
group: "Misc",
|
|
216
|
+
defaultValue: true
|
|
217
|
+
},
|
|
218
|
+
|
|
153
219
|
/**
|
|
154
220
|
* Indicates that the control is in edit state. If set to <code>false</code>, the footer of the <i>Views</i> list will be hidden.
|
|
155
221
|
*/
|
|
156
|
-
|
|
222
|
+
showFooter: {
|
|
157
223
|
type: "boolean",
|
|
158
224
|
group: "Misc",
|
|
159
225
|
defaultValue: true
|
|
160
226
|
},
|
|
161
227
|
|
|
162
228
|
/**
|
|
163
|
-
*
|
|
164
|
-
|
|
165
|
-
|
|
229
|
+
* Indicates the visible and selected item.
|
|
230
|
+
*/
|
|
231
|
+
modified: {
|
|
232
|
+
type: "boolean",
|
|
233
|
+
group: "Misc",
|
|
234
|
+
defaultValue: false
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Indicates the title in the 'My Views' popover.
|
|
166
239
|
*/
|
|
167
|
-
|
|
240
|
+
popoverTitle: {
|
|
168
241
|
type: "string",
|
|
169
242
|
group: "Misc",
|
|
170
|
-
defaultValue:
|
|
243
|
+
defaultValue: ""
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Indicates that the control is in error state. If set to <code>true</code>, an error message will be displayed whenever the variant is
|
|
248
|
+
* opened.
|
|
249
|
+
*/
|
|
250
|
+
inErrorState: {
|
|
251
|
+
type: "boolean",
|
|
252
|
+
group: "Misc",
|
|
253
|
+
defaultValue: false
|
|
171
254
|
},
|
|
172
255
|
|
|
173
256
|
/**
|
|
@@ -182,13 +265,33 @@ sap.ui.define([
|
|
|
182
265
|
|
|
183
266
|
/**
|
|
184
267
|
* Defines the Apply Automatically text for the standard variant in the Manage Views dialog if the application controls this behavior.
|
|
185
|
-
*
|
|
186
|
-
* <br><b>Note:</b> the usage of this property is restricted to <code>sap.fe</code> components only.
|
|
187
268
|
*/
|
|
188
269
|
displayTextForExecuteOnSelectionForStandardVariant: {
|
|
189
270
|
type: "string",
|
|
190
271
|
group: "Misc",
|
|
191
272
|
defaultValue: ""
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Semantic level of the header.
|
|
277
|
+
* For more information, see {@link sap.m.Title#setLevel}.
|
|
278
|
+
*/
|
|
279
|
+
level: {
|
|
280
|
+
type: "sap.ui.core.TitleLevel",
|
|
281
|
+
group: "Appearance",
|
|
282
|
+
defaultValue: TitleLevel.Auto
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
defaultAggregation: "items",
|
|
286
|
+
aggregations: {
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Items displayed by the <code>VariantManagement</code> control.
|
|
290
|
+
*/
|
|
291
|
+
items: {
|
|
292
|
+
type: "sap.m.VariantItem",
|
|
293
|
+
multiple: true,
|
|
294
|
+
singularName: "item"
|
|
192
295
|
}
|
|
193
296
|
},
|
|
194
297
|
events: {
|
|
@@ -233,6 +336,13 @@ sap.ui.define([
|
|
|
233
336
|
type: "boolean"
|
|
234
337
|
},
|
|
235
338
|
|
|
339
|
+
/**
|
|
340
|
+
* Indicates the check box state for 'Public'.
|
|
341
|
+
*/
|
|
342
|
+
'public': {
|
|
343
|
+
type: "boolean"
|
|
344
|
+
},
|
|
345
|
+
|
|
236
346
|
/**
|
|
237
347
|
* Indicates the check box state for 'Create Tile'.
|
|
238
348
|
* <br>Note:</br>This event parameter is used only internally.
|
|
@@ -248,6 +358,11 @@ sap.ui.define([
|
|
|
248
358
|
*/
|
|
249
359
|
cancel: {},
|
|
250
360
|
|
|
361
|
+
/**
|
|
362
|
+
* This event is fired when users presses the cancel button inside <i>Manage Views</i> dialog.
|
|
363
|
+
*/
|
|
364
|
+
manageCancel: {},
|
|
365
|
+
|
|
251
366
|
/**
|
|
252
367
|
* This event is fired when users apply changes to variants in the <i>Manage Views</i> dialog.
|
|
253
368
|
*/
|
|
@@ -275,6 +390,13 @@ sap.ui.define([
|
|
|
275
390
|
type: "object[]"
|
|
276
391
|
},
|
|
277
392
|
|
|
393
|
+
/**
|
|
394
|
+
* List of variant keys and the associated favorite indicator
|
|
395
|
+
*/
|
|
396
|
+
fav: {
|
|
397
|
+
type: "object[]"
|
|
398
|
+
},
|
|
399
|
+
|
|
278
400
|
/**
|
|
279
401
|
* The default variant key
|
|
280
402
|
*/
|
|
@@ -330,11 +452,34 @@ sap.ui.define([
|
|
|
330
452
|
|
|
331
453
|
this._oRb = sap.ui.getCore().getLibraryResourceBundle("sap.m");
|
|
332
454
|
|
|
455
|
+
|
|
456
|
+
this._oManagedObjectModel = new ManagedObjectModel(this);
|
|
457
|
+
this.setModel(this._oManagedObjectModel, "$mVariants");
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
VariantManagement.prototype.applySettings = function(mSettings, oScope) {
|
|
461
|
+
Control.prototype.applySettings.apply(this, arguments);
|
|
462
|
+
|
|
333
463
|
this._createInnerModel();
|
|
464
|
+
this._initializeControl();
|
|
465
|
+
};
|
|
334
466
|
|
|
335
|
-
|
|
467
|
+
VariantManagement.prototype.setShowFooter = function(bValue) {
|
|
468
|
+
this.setProperty("showFooter", bValue);
|
|
469
|
+
return this;
|
|
336
470
|
};
|
|
337
471
|
|
|
472
|
+
VariantManagement.prototype.setDefaultKey = function(sValue) {
|
|
473
|
+
this.setProperty("defaultKey", sValue);
|
|
474
|
+
return this;
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
VariantManagement.prototype.setPopoverTitle = function(sValue) {
|
|
478
|
+
this.setProperty("popoverTitle", sValue);
|
|
479
|
+
return this;
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
|
|
338
483
|
VariantManagement.prototype._initializeControl = function() {
|
|
339
484
|
if (this.oVariantInvisibleText) {
|
|
340
485
|
return;
|
|
@@ -344,8 +489,8 @@ sap.ui.define([
|
|
|
344
489
|
|
|
345
490
|
this.oVariantText = new Title(this.getId() + "-text", {
|
|
346
491
|
text: {
|
|
347
|
-
path: '/
|
|
348
|
-
model:
|
|
492
|
+
path: '/selectedKey',
|
|
493
|
+
model: "$mVariants",
|
|
349
494
|
formatter: function(sKey) {
|
|
350
495
|
var sText = "";
|
|
351
496
|
if (sKey) {
|
|
@@ -355,6 +500,10 @@ sap.ui.define([
|
|
|
355
500
|
|
|
356
501
|
return sText;
|
|
357
502
|
}.bind(this)
|
|
503
|
+
},
|
|
504
|
+
level: {
|
|
505
|
+
path: '/level',
|
|
506
|
+
model: "$mVariants"
|
|
358
507
|
}
|
|
359
508
|
});
|
|
360
509
|
|
|
@@ -371,9 +520,9 @@ sap.ui.define([
|
|
|
371
520
|
text: "*",
|
|
372
521
|
visible: {
|
|
373
522
|
path: "/modified",
|
|
374
|
-
model:
|
|
523
|
+
model: "$mVariants",
|
|
375
524
|
formatter: function(bValue) {
|
|
376
|
-
var sKey = this.
|
|
525
|
+
var sKey = this.getSelectedKey();
|
|
377
526
|
|
|
378
527
|
if (sKey) {
|
|
379
528
|
this._setInvisibleText(this.getSelectedVariantText(sKey), bValue);
|
|
@@ -412,55 +561,7 @@ sap.ui.define([
|
|
|
412
561
|
this.addDependent(this.oVariantLayout);
|
|
413
562
|
};
|
|
414
563
|
|
|
415
|
-
VariantManagement.prototype.applySettings = function(mSettings, oScope) {
|
|
416
|
-
Control.prototype.applySettings.apply(this, arguments);
|
|
417
|
-
};
|
|
418
|
-
|
|
419
|
-
VariantManagement.prototype.setModelName = function(sName) {
|
|
420
|
-
this.setProperty("modelName", sName);
|
|
421
564
|
|
|
422
|
-
this._sModelName = sName;
|
|
423
|
-
|
|
424
|
-
this._initializeControl();
|
|
425
|
-
|
|
426
|
-
return this;
|
|
427
|
-
};
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* Registration of a callback function. The provided callback function is executed to check if apply automatically on standard variant should be considered.
|
|
431
|
-
* @private
|
|
432
|
-
* @ui5-restricted sap.fe
|
|
433
|
-
* @since 1.103
|
|
434
|
-
* @param {function} fCallBack Called when standard variant must be applied. It determines if apply automatically on standard variant should be considered.
|
|
435
|
-
* As a convenience the current variant will be passed to the callback. This variant instance may not be changed in any ways. It is only intended to provide certain variant information.
|
|
436
|
-
* @returns {this} Reference to this in order to allow method chaining.
|
|
437
|
-
*/
|
|
438
|
-
VariantManagement.prototype.registerApplyAutomaticallyOnStandardVariant = function(fCallBack) {
|
|
439
|
-
this._fRegisteredApplyAutomaticallyOnStandardVariant = fCallBack;
|
|
440
|
-
|
|
441
|
-
return this;
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* Retrieves the apply automatically state for a variant.
|
|
446
|
-
* @private
|
|
447
|
-
* @ui5-restricted sap.mdc
|
|
448
|
-
* @param {object} oVariant the inner variant object
|
|
449
|
-
* @returns {boolean} apply automatically state
|
|
450
|
-
*/
|
|
451
|
-
VariantManagement.prototype.getApplyAutomaticallyOnVariant = function(oVariant) {
|
|
452
|
-
var bExecuteOnSelection = oVariant.executeOnSelect;
|
|
453
|
-
|
|
454
|
-
if (this._fRegisteredApplyAutomaticallyOnStandardVariant && this.getDisplayTextForExecuteOnSelectionForStandardVariant() && (oVariant.key === this.getStandardVariantKey())) {
|
|
455
|
-
try {
|
|
456
|
-
bExecuteOnSelection = this._fRegisteredApplyAutomaticallyOnStandardVariant(oVariant);
|
|
457
|
-
} catch (ex) {
|
|
458
|
-
Log.error("callback for determination of apply automatically on standard variant failed");
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
return bExecuteOnSelection;
|
|
463
|
-
};
|
|
464
565
|
|
|
465
566
|
/**
|
|
466
567
|
* Required by the {@link sap.m.IOverflowToolbarContent} interface.
|
|
@@ -500,67 +601,12 @@ sap.ui.define([
|
|
|
500
601
|
|
|
501
602
|
VariantManagement.prototype._createInnerModel = function() {
|
|
502
603
|
var oModel = new JSONModel({
|
|
503
|
-
showExecuteOnSelection: false,
|
|
504
|
-
showSetAsDefault: true,
|
|
505
|
-
showSaveAs: true,
|
|
506
|
-
showPublic: false,
|
|
507
|
-
showContexts: false,
|
|
508
|
-
editable: true,
|
|
509
604
|
showManualVariantKey: false,
|
|
510
|
-
showCreateTile: false
|
|
511
|
-
popoverTitle: this._oRb.getText("VARIANT_MANAGEMENT_VARIANTS")
|
|
605
|
+
showCreateTile: false
|
|
512
606
|
});
|
|
513
607
|
this.setModel(oModel, VariantManagement.INNER_MODEL_NAME);
|
|
514
|
-
|
|
515
|
-
this._bindProperties();
|
|
516
|
-
|
|
517
|
-
this._updateInnerModelWithSettingsInfo();
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
VariantManagement.prototype._bindProperties = function() {
|
|
521
|
-
this.bindProperty("showSetAsDefault", {
|
|
522
|
-
path: "/showSetAsDefault",
|
|
523
|
-
model: VariantManagement.INNER_MODEL_NAME
|
|
524
|
-
});
|
|
525
|
-
this.bindProperty("editable", {
|
|
526
|
-
path: "/editable",
|
|
527
|
-
model: VariantManagement.INNER_MODEL_NAME
|
|
528
|
-
});
|
|
529
608
|
};
|
|
530
609
|
|
|
531
|
-
VariantManagement.prototype._setShowSaveAs = function(bValue) {
|
|
532
|
-
this._setInnerModelProperty("/showSaveAs", bValue);
|
|
533
|
-
};
|
|
534
|
-
|
|
535
|
-
VariantManagement.prototype._setShowFooter = function(bValue) {
|
|
536
|
-
this._setInnerModelProperty("/editable", bValue);
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
VariantManagement.prototype._setPopoverTitle = function(sText) {
|
|
540
|
-
this._setInnerModelProperty("/popoverTitle", sText);
|
|
541
|
-
};
|
|
542
|
-
|
|
543
|
-
VariantManagement.prototype._getShowPublic = function() {
|
|
544
|
-
return this._getInnerModelProperty("/showPublic");
|
|
545
|
-
};
|
|
546
|
-
VariantManagement.prototype._setShowPublic = function(bValue) {
|
|
547
|
-
this._setInnerModelProperty("/showPublic", bValue);
|
|
548
|
-
};
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
VariantManagement.prototype._getShowContexts = function() {
|
|
552
|
-
return this._getInnerModelProperty("/showContexts");
|
|
553
|
-
};
|
|
554
|
-
VariantManagement.prototype._setShowContexts = function(bValue) {
|
|
555
|
-
this._setInnerModelProperty("/showContexts", bValue);
|
|
556
|
-
};
|
|
557
|
-
|
|
558
|
-
VariantManagement.prototype._getShowExecuteOnSelection = function() {
|
|
559
|
-
return this._getInnerModelProperty("/showExecuteOnSelection");
|
|
560
|
-
};
|
|
561
|
-
VariantManagement.prototype._setShowExecuteOnSelection = function(bValue) {
|
|
562
|
-
this._setInnerModelProperty("/showExecuteOnSelection", bValue);
|
|
563
|
-
};
|
|
564
610
|
|
|
565
611
|
VariantManagement.prototype._getShowCreateTile = function() {
|
|
566
612
|
return this._getInnerModelProperty("/showCreateTile");
|
|
@@ -576,7 +622,6 @@ sap.ui.define([
|
|
|
576
622
|
this._setInnerModelProperty("/showManualVariantKey", bValue);
|
|
577
623
|
};
|
|
578
624
|
|
|
579
|
-
|
|
580
625
|
VariantManagement.prototype._setInnerModelProperty = function(sPropertyPath, vValue) {
|
|
581
626
|
var oInnerModel = this.getModel(VariantManagement.INNER_MODEL_NAME);
|
|
582
627
|
if (oInnerModel) {
|
|
@@ -594,153 +639,21 @@ sap.ui.define([
|
|
|
594
639
|
};
|
|
595
640
|
|
|
596
641
|
|
|
597
|
-
/**
|
|
598
|
-
* Gets the previous default variant key
|
|
599
|
-
* @public
|
|
600
|
-
* @abstract
|
|
601
|
-
* @returns {string} Key of the previous dfault variant
|
|
602
|
-
*/
|
|
603
|
-
VariantManagement.prototype.getOriginalDefaultVariantKey = function() {
|
|
604
|
-
};
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* Sets the default variant key
|
|
608
|
-
* @public
|
|
609
|
-
* @abstract
|
|
610
|
-
* @param {string} sKey - the variant key should be set as default
|
|
611
|
-
*/
|
|
612
|
-
VariantManagement.prototype.setDefaultVariantKey = function(sKey) {
|
|
613
|
-
};
|
|
614
|
-
|
|
615
|
-
/**
|
|
616
|
-
* Gets the default variant key
|
|
617
|
-
* @public
|
|
618
|
-
* @abstract
|
|
619
|
-
* @returns {string} Key of the default variant
|
|
620
|
-
*/
|
|
621
|
-
VariantManagement.prototype.getDefaultVariantKey = function() {
|
|
622
|
-
};
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
* Sets the currently selected variant key.
|
|
626
|
-
* @public
|
|
627
|
-
* @abstract
|
|
628
|
-
* @param {string} sKey - the new current variant key
|
|
629
|
-
*/
|
|
630
|
-
VariantManagement.prototype.setCurrentVariantKey = function(sKey) {
|
|
631
|
-
};
|
|
632
|
-
|
|
633
|
-
/**
|
|
634
|
-
* Gets the currently selected variant key.
|
|
635
|
-
* @public
|
|
636
|
-
* @abstract
|
|
637
|
-
* @returns {string} Key of the currently selected variant. In case the model is not yet set <code>null</code> will be returned.
|
|
638
|
-
*/
|
|
639
|
-
VariantManagement.prototype.getCurrentVariantKey = function() {
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* Retrieves all variants.
|
|
645
|
-
* @public
|
|
646
|
-
* @returns {array} All variants. In case the model is not yet set, an empty array will be returned.
|
|
647
|
-
*/
|
|
648
|
-
VariantManagement.prototype.getVariants = function() {
|
|
649
|
-
return this._getItems();
|
|
650
|
-
};
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* Sets the modified flag
|
|
654
|
-
* @public
|
|
655
|
-
* @abstract
|
|
656
|
-
* @param {boolean} bFlag - represents the variant modify state
|
|
657
|
-
*/
|
|
658
|
-
VariantManagement.prototype.setModified = function(bFlag) {
|
|
659
|
-
};
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Determines if the current variant is modified.
|
|
663
|
-
* @public
|
|
664
|
-
* @abstract
|
|
665
|
-
* @returns {boolean} If the current variant is modified <code>true</code>, otherwise <code>false</code>
|
|
666
|
-
*/
|
|
667
|
-
VariantManagement.prototype.getModified = function() {
|
|
668
|
-
};
|
|
669
|
-
|
|
670
|
-
/**
|
|
671
|
-
* Gets the information, if favorites should be shown.
|
|
672
|
-
* @public
|
|
673
|
-
* @abstract
|
|
674
|
-
* @returns {boolean} The information if favorites should be shown
|
|
675
|
-
*/
|
|
676
|
-
VariantManagement.prototype.getShowFavorites = function() {
|
|
677
|
-
};
|
|
678
|
-
|
|
679
642
|
/**
|
|
680
643
|
* Gets all the variants
|
|
681
644
|
* @private
|
|
682
|
-
* @abstract
|
|
683
645
|
* @returns {array} Of variants
|
|
684
646
|
*/
|
|
685
647
|
VariantManagement.prototype._getItems = function() {
|
|
648
|
+
return this.getItems();
|
|
686
649
|
};
|
|
687
650
|
|
|
688
|
-
/**
|
|
689
|
-
* Gets all the binding path
|
|
690
|
-
* @private
|
|
691
|
-
* @abstract
|
|
692
|
-
* @returns {array} Of variants
|
|
693
|
-
*/
|
|
694
|
-
VariantManagement.prototype._getBindingPath = function() {
|
|
695
|
-
return "";
|
|
696
|
-
};
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* Propagate information about public and save as
|
|
700
|
-
* @private
|
|
701
|
-
* @abstract
|
|
702
|
-
*/
|
|
703
|
-
VariantManagement.prototype._updateInnerModelWithSettingsInfo = function() {
|
|
704
|
-
};
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* Check if the item is delete enabled.
|
|
708
|
-
* @private
|
|
709
|
-
* @abstract
|
|
710
|
-
* @param {object} oItem - represents the variant
|
|
711
|
-
* @returns {boolean} indicator if the item is delete enabled
|
|
712
|
-
*/
|
|
713
|
-
VariantManagement.prototype.isItemDeleteEnabled = function(oItem) {
|
|
714
|
-
return true;
|
|
715
|
-
};
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* Check if the item is delete enabled.
|
|
719
|
-
* @private
|
|
720
|
-
* @abstract
|
|
721
|
-
* @param {object} oItem - represents the variant
|
|
722
|
-
* @returns {boolean} indicator if the item is delete enabled
|
|
723
|
-
*/
|
|
724
|
-
VariantManagement.prototype.isItemDeleteVisible = function(oItem) {
|
|
725
|
-
return oItem.remove;
|
|
726
|
-
};
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Check if the item is delete enabled.
|
|
730
|
-
* @private
|
|
731
|
-
* @abstract
|
|
732
|
-
* @param {object} oItem - represents the variant
|
|
733
|
-
* @returns {boolean} indicator if the item is delete enabled
|
|
734
|
-
*/
|
|
735
|
-
VariantManagement.prototype.isItemRenameAllowed = function(oItem) {
|
|
736
|
-
return oItem.rename;
|
|
737
|
-
};
|
|
738
651
|
|
|
739
652
|
VariantManagement.prototype.getSelectedVariantText = function(sKey) {
|
|
740
653
|
var oItem = this._getItemByKey(sKey);
|
|
741
654
|
|
|
742
655
|
if (oItem) {
|
|
743
|
-
return oItem.
|
|
656
|
+
return oItem.getTitle();
|
|
744
657
|
}
|
|
745
658
|
|
|
746
659
|
return "";
|
|
@@ -749,7 +662,7 @@ sap.ui.define([
|
|
|
749
662
|
VariantManagement.prototype.getStandardVariantKey = function() {
|
|
750
663
|
var aItems = this._getItems();
|
|
751
664
|
if (aItems && aItems[0]) {
|
|
752
|
-
return aItems[0].
|
|
665
|
+
return aItems[0].getKey();
|
|
753
666
|
}
|
|
754
667
|
|
|
755
668
|
return null;
|
|
@@ -761,20 +674,46 @@ sap.ui.define([
|
|
|
761
674
|
};
|
|
762
675
|
|
|
763
676
|
VariantManagement.prototype._addDeletedItem = function(oItem) {
|
|
764
|
-
|
|
677
|
+
var sKey = oItem.getKey();
|
|
678
|
+
if (this._aDeletedItems.indexOf(sKey) < 0) {
|
|
679
|
+
this._aDeletedItems.push(sKey);
|
|
680
|
+
}
|
|
765
681
|
};
|
|
766
682
|
|
|
767
683
|
VariantManagement.prototype._getDeletedItems = function() {
|
|
768
684
|
return this._aDeletedItems;
|
|
769
685
|
};
|
|
770
686
|
|
|
687
|
+
VariantManagement.prototype._clearRenamedItems = function() {
|
|
688
|
+
this._aRenamedItems = [];
|
|
689
|
+
};
|
|
690
|
+
|
|
691
|
+
VariantManagement.prototype._addRenamedItem = function(oItem) {
|
|
692
|
+
var sKey = oItem.getKey();
|
|
693
|
+
if (this._aRenamedItems.indexOf(sKey) < 0) {
|
|
694
|
+
this._aRenamedItems.push(sKey);
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
VariantManagement.prototype._removeRenamedItem = function(oItem) {
|
|
699
|
+
var sKey = oItem.getKey();
|
|
700
|
+
var nIdx = this._aRenamedItems.indexOf(sKey);
|
|
701
|
+
if ( nIdx >= 0) {
|
|
702
|
+
this._aRenamedItems.splice(nIdx, 1);
|
|
703
|
+
}
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
VariantManagement.prototype._getRenamedItems = function() {
|
|
707
|
+
return this._aRenamedItems;
|
|
708
|
+
};
|
|
709
|
+
|
|
771
710
|
|
|
772
711
|
VariantManagement.prototype._getItemByKey = function(sKey) {
|
|
773
712
|
var oItem = null;
|
|
774
713
|
var aItems = this._getItems();
|
|
775
714
|
if (aItems) {
|
|
776
715
|
aItems.some(function(oEntry) {
|
|
777
|
-
if (oEntry.
|
|
716
|
+
if (oEntry.getKey() === sKey) {
|
|
778
717
|
oItem = oEntry;
|
|
779
718
|
}
|
|
780
719
|
|
|
@@ -785,38 +724,6 @@ sap.ui.define([
|
|
|
785
724
|
return oItem;
|
|
786
725
|
};
|
|
787
726
|
|
|
788
|
-
VariantManagement.prototype._rebindControl = function() {
|
|
789
|
-
this.oVariantText.unbindProperty("text");
|
|
790
|
-
this.oVariantText.bindProperty("text", {
|
|
791
|
-
path: 'currentVariant',
|
|
792
|
-
model: this._sModelName,
|
|
793
|
-
formatter: function(sKey) {
|
|
794
|
-
var sText = "";
|
|
795
|
-
if (sKey) {
|
|
796
|
-
sText = this.getSelectedVariantText(sKey);
|
|
797
|
-
this._setInvisibleText(sText, this.getModified());
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
return sText;
|
|
801
|
-
}.bind(this)
|
|
802
|
-
});
|
|
803
|
-
|
|
804
|
-
this.oVariantModifiedText.unbindProperty("visible");
|
|
805
|
-
this.oVariantModifiedText.bindProperty("visible", {
|
|
806
|
-
path: "modified",
|
|
807
|
-
model: this._sModelName,
|
|
808
|
-
formatter: function(bValue) {
|
|
809
|
-
var sKey = this.getCurrentVariantKey();
|
|
810
|
-
|
|
811
|
-
if (sKey) {
|
|
812
|
-
this._setInvisibleText(this.getSelectedVariantText(sKey), bValue);
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
return ((bValue === null) || (bValue === undefined)) ? false : bValue;
|
|
816
|
-
}.bind(this)
|
|
817
|
-
});
|
|
818
|
-
};
|
|
819
|
-
|
|
820
727
|
|
|
821
728
|
VariantManagement.prototype._obtainControl = function(oEvent) {
|
|
822
729
|
if (oEvent && oEvent.target && oEvent.target.id) {
|
|
@@ -879,17 +786,17 @@ sap.ui.define([
|
|
|
879
786
|
if (!this.oErrorVariantPopOver) {
|
|
880
787
|
oVBox = new VBox({
|
|
881
788
|
fitContainer: true,
|
|
882
|
-
alignItems:
|
|
789
|
+
alignItems: FlexAlignItems.Center,
|
|
883
790
|
items: [
|
|
884
791
|
new Icon({
|
|
885
792
|
size: "4rem",
|
|
886
793
|
color: "lightgray",
|
|
887
794
|
src: "sap-icon://message-error"
|
|
888
795
|
}), new Title({
|
|
889
|
-
titleStyle:
|
|
796
|
+
titleStyle: TitleLevel.H2,
|
|
890
797
|
text: this._oRb.getText("VARIANT_MANAGEMENT_ERROR_TEXT1")
|
|
891
798
|
}), new Text({
|
|
892
|
-
textAlign:
|
|
799
|
+
textAlign: TextAlign.Center,
|
|
893
800
|
text: this._oRb.getText("VARIANT_MANAGEMENT_ERROR_TEXT2")
|
|
894
801
|
})
|
|
895
802
|
]
|
|
@@ -900,7 +807,7 @@ sap.ui.define([
|
|
|
900
807
|
this.oErrorVariantPopOver = new ResponsivePopover(this.getId() + "-errorpopover", {
|
|
901
808
|
title: {
|
|
902
809
|
path: "/popoverTitle",
|
|
903
|
-
model:
|
|
810
|
+
model: "$mVariants"
|
|
904
811
|
},
|
|
905
812
|
contentWidth: "400px",
|
|
906
813
|
placement: PlacementType.VerticalPreferredBottom,
|
|
@@ -964,11 +871,22 @@ sap.ui.define([
|
|
|
964
871
|
this._handleVariantSave();
|
|
965
872
|
}.bind(this),
|
|
966
873
|
visible: {
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
874
|
+
parts: [{
|
|
875
|
+
path: '$mVariants>/creationAllowed'
|
|
876
|
+
},{
|
|
877
|
+
path: '$mVariants>/modified'
|
|
878
|
+
},{
|
|
879
|
+
path: '$mVariants>/selectedKey'
|
|
971
880
|
}
|
|
881
|
+
],
|
|
882
|
+
formatter: function(bCreationAllowed, bModified, sSelectedKey) {
|
|
883
|
+
var bItemChangeable = false;
|
|
884
|
+
var oItem = this._getItemByKey(sSelectedKey);
|
|
885
|
+
if (oItem) {
|
|
886
|
+
bItemChangeable = oItem.getChangeable();
|
|
887
|
+
}
|
|
888
|
+
return bCreationAllowed && bModified && bItemChangeable;
|
|
889
|
+
}.bind(this)
|
|
972
890
|
},
|
|
973
891
|
type: ButtonType.Emphasized,
|
|
974
892
|
layoutData: new OverflowToolbarLayoutData({
|
|
@@ -985,15 +903,22 @@ sap.ui.define([
|
|
|
985
903
|
priority: OverflowToolbarPriority.Low
|
|
986
904
|
}),
|
|
987
905
|
visible: {
|
|
988
|
-
|
|
989
|
-
|
|
906
|
+
parts: [{
|
|
907
|
+
path: '$mVariants>/creationAllowed'
|
|
908
|
+
},{
|
|
909
|
+
path: '$mVariants>/showSaveAs'
|
|
910
|
+
}],
|
|
911
|
+
formatter: function(bCreationAllowed, bShowSaveAs) {
|
|
912
|
+
return bCreationAllowed && bShowSaveAs;
|
|
913
|
+
}
|
|
990
914
|
}
|
|
915
|
+
|
|
991
916
|
});
|
|
992
917
|
|
|
993
918
|
this.oVariantList = new SelectList(this.getId() + "-list", {
|
|
994
919
|
selectedKey: {
|
|
995
|
-
path:
|
|
996
|
-
model:
|
|
920
|
+
path: "/selectedKey",
|
|
921
|
+
model: "$mVariants"
|
|
997
922
|
},
|
|
998
923
|
itemPress: function(oEvent) {
|
|
999
924
|
var sSelectionKey = null;
|
|
@@ -1005,7 +930,7 @@ sap.ui.define([
|
|
|
1005
930
|
}
|
|
1006
931
|
if (sSelectionKey) {
|
|
1007
932
|
// this.setModified(false);
|
|
1008
|
-
this.
|
|
933
|
+
this.setSelectedKey(sSelectionKey);
|
|
1009
934
|
|
|
1010
935
|
this.fireSelect({
|
|
1011
936
|
key: sSelectionKey
|
|
@@ -1016,14 +941,16 @@ sap.ui.define([
|
|
|
1016
941
|
});
|
|
1017
942
|
this.oVariantList.setNoDataText(this._oRb.getText("VARIANT_MANAGEMENT_NODATA"));
|
|
1018
943
|
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
944
|
+
|
|
945
|
+
var oItemTemplate = new Item({
|
|
946
|
+
key: "{$mVariants>key}",
|
|
947
|
+
text: "{$mVariants>title}"
|
|
1022
948
|
});
|
|
1023
949
|
|
|
950
|
+
|
|
1024
951
|
this.oVariantList.bindAggregation("items", {
|
|
1025
|
-
path:
|
|
1026
|
-
model:
|
|
952
|
+
path: "/items",
|
|
953
|
+
model: "$mVariants",
|
|
1027
954
|
template: oItemTemplate
|
|
1028
955
|
});
|
|
1029
956
|
|
|
@@ -1048,21 +975,17 @@ sap.ui.define([
|
|
|
1048
975
|
}),
|
|
1049
976
|
showNavButton: false,
|
|
1050
977
|
showHeader: false
|
|
1051
|
-
// showFooter: {
|
|
1052
|
-
// path: "/editable",
|
|
1053
|
-
// model: VariantManagement.INNER_MODEL_NAME
|
|
1054
|
-
// }
|
|
1055
978
|
});
|
|
1056
979
|
|
|
1057
980
|
this.oVariantSelectionPage.bindProperty("showFooter", {
|
|
1058
|
-
path: "/
|
|
1059
|
-
model:
|
|
981
|
+
path: "/showFooter",
|
|
982
|
+
model: "$mVariants"
|
|
1060
983
|
});
|
|
1061
984
|
|
|
1062
985
|
this.oVariantPopOver = new ResponsivePopover(this.getId() + "-popover", {
|
|
1063
986
|
title: {
|
|
1064
987
|
path: "/popoverTitle",
|
|
1065
|
-
model:
|
|
988
|
+
model: "$mVariants"
|
|
1066
989
|
},
|
|
1067
990
|
titleAlignment: "Auto",
|
|
1068
991
|
contentWidth: "400px",
|
|
@@ -1094,29 +1017,22 @@ sap.ui.define([
|
|
|
1094
1017
|
// this.oVariantList.getBinding("items").filter(this._getFilters());
|
|
1095
1018
|
};
|
|
1096
1019
|
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
*/
|
|
1102
|
-
VariantManagement.prototype.showSaveButton = function(bShow) {
|
|
1103
|
-
if (bShow === false) {
|
|
1104
|
-
this.oVariantSaveAsBtn.setType(ButtonType.Emphasized);
|
|
1105
|
-
this.oVariantSaveBtn.setVisible(false);
|
|
1106
|
-
} else {
|
|
1020
|
+
|
|
1021
|
+
VariantManagement.prototype._determineEmphasizedFooterButton = function() {
|
|
1022
|
+
if (this.oVariantSaveBtn.getVisible()) {
|
|
1023
|
+
this.oVariantSaveBtn.setType(ButtonType.Emphasized);
|
|
1107
1024
|
this.oVariantSaveAsBtn.setType(ButtonType.Default);
|
|
1108
|
-
|
|
1025
|
+
} else {
|
|
1026
|
+
this.oVariantSaveAsBtn.setType(ButtonType.Emphasized);
|
|
1109
1027
|
}
|
|
1110
1028
|
};
|
|
1111
1029
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
return this
|
|
1030
|
+
VariantManagement.prototype.setModified = function(bValue) {
|
|
1031
|
+
this.setProperty("modified", bValue);
|
|
1032
|
+
return this;
|
|
1115
1033
|
};
|
|
1116
1034
|
|
|
1117
1035
|
VariantManagement.prototype._openVariantList = function() {
|
|
1118
|
-
var oItem;
|
|
1119
|
-
|
|
1120
1036
|
if (this.getInErrorState()) {
|
|
1121
1037
|
this._openInErrorState();
|
|
1122
1038
|
return;
|
|
@@ -1126,11 +1042,6 @@ sap.ui.define([
|
|
|
1126
1042
|
return;
|
|
1127
1043
|
}
|
|
1128
1044
|
|
|
1129
|
-
// proceed only if context is available
|
|
1130
|
-
// if (!this.oContext) {
|
|
1131
|
-
// return;
|
|
1132
|
-
// }
|
|
1133
|
-
|
|
1134
1045
|
this._createVariantList();
|
|
1135
1046
|
this._oSearchField.setValue("");
|
|
1136
1047
|
|
|
@@ -1138,13 +1049,11 @@ sap.ui.define([
|
|
|
1138
1049
|
|
|
1139
1050
|
this.oVariantSelectionPage.setShowSubHeader(this.oVariantList.getItems().length > 9);
|
|
1140
1051
|
|
|
1141
|
-
this.
|
|
1052
|
+
this._determineEmphasizedFooterButton();
|
|
1142
1053
|
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
this.showSaveButton(true);
|
|
1147
|
-
}
|
|
1054
|
+
var oSelectedItem = this.oVariantList.getSelectedItem();
|
|
1055
|
+
if (oSelectedItem) {
|
|
1056
|
+
this.oVariantPopOver.setInitialFocus(oSelectedItem.getId());
|
|
1148
1057
|
}
|
|
1149
1058
|
|
|
1150
1059
|
var oControlRef = this._oCtrlRef ? this._oCtrlRef : this.oVariantLayout;
|
|
@@ -1192,8 +1101,8 @@ sap.ui.define([
|
|
|
1192
1101
|
this.oDefault = new CheckBox(this.getId() + "-default", {
|
|
1193
1102
|
text: this._oRb.getText("VARIANT_MANAGEMENT_SETASDEFAULT"),
|
|
1194
1103
|
visible: {
|
|
1195
|
-
path: "/
|
|
1196
|
-
model:
|
|
1104
|
+
path: "/supportDefault",
|
|
1105
|
+
model: "$mVariants"
|
|
1197
1106
|
},
|
|
1198
1107
|
width: "100%"
|
|
1199
1108
|
});
|
|
@@ -1201,8 +1110,8 @@ sap.ui.define([
|
|
|
1201
1110
|
this.oPublic = new CheckBox(this.getId() + "-public", {
|
|
1202
1111
|
text: this._oRb.getText("VARIANT_MANAGEMENT_SETASPUBLIC"),
|
|
1203
1112
|
visible: {
|
|
1204
|
-
path: "/
|
|
1205
|
-
model:
|
|
1113
|
+
path: "/supportPublic",
|
|
1114
|
+
model: "$mVariants"
|
|
1206
1115
|
},
|
|
1207
1116
|
width: "100%"
|
|
1208
1117
|
});
|
|
@@ -1210,8 +1119,8 @@ sap.ui.define([
|
|
|
1210
1119
|
this.oExecuteOnSelect = new CheckBox(this.getId() + "-execute", {
|
|
1211
1120
|
text: this._oRb.getText("VARIANT_MANAGEMENT_EXECUTEONSELECT"),
|
|
1212
1121
|
visible: {
|
|
1213
|
-
path: "/
|
|
1214
|
-
model:
|
|
1122
|
+
path: "/supportApplyAutomatically",
|
|
1123
|
+
model: "$mVariants"
|
|
1215
1124
|
},
|
|
1216
1125
|
width: "100%"
|
|
1217
1126
|
});
|
|
@@ -1283,7 +1192,7 @@ sap.ui.define([
|
|
|
1283
1192
|
this._bSaveOngoing = false;
|
|
1284
1193
|
|
|
1285
1194
|
if (this._sStyleClass) {
|
|
1286
|
-
this.
|
|
1195
|
+
this.setSupportPublic(this._bShowPublic);
|
|
1287
1196
|
this.oSaveAsDialog.removeStyleClass(this._sStyleClass);
|
|
1288
1197
|
|
|
1289
1198
|
if (this._oRolesComponentContainer) {
|
|
@@ -1293,6 +1202,7 @@ sap.ui.define([
|
|
|
1293
1202
|
this._sStyleClass = undefined;
|
|
1294
1203
|
this._oRolesComponentContainer = null;
|
|
1295
1204
|
}
|
|
1205
|
+
|
|
1296
1206
|
}.bind(this),
|
|
1297
1207
|
beginButton: this.oSaveSave,
|
|
1298
1208
|
endButton: new Button(this.getId() + "-variantcancel", {
|
|
@@ -1411,10 +1321,10 @@ sap.ui.define([
|
|
|
1411
1321
|
VariantManagement.prototype._openRolesDialog = function(oItem, oTextControl) {
|
|
1412
1322
|
this._createRolesDialog();
|
|
1413
1323
|
|
|
1414
|
-
this._oCurrentContextsKey = oItem.
|
|
1324
|
+
this._oCurrentContextsKey = oItem.getKey();
|
|
1415
1325
|
this._oTextControl = oTextControl;
|
|
1416
1326
|
|
|
1417
|
-
this._setSelectedContexts(oItem.
|
|
1327
|
+
this._setSelectedContexts(oItem.getContexts());
|
|
1418
1328
|
|
|
1419
1329
|
this._oRolesDialog.open();
|
|
1420
1330
|
};
|
|
@@ -1428,7 +1338,7 @@ sap.ui.define([
|
|
|
1428
1338
|
|
|
1429
1339
|
var oItem = this._getItemByKey(sKey);
|
|
1430
1340
|
if (oItem) {
|
|
1431
|
-
oItem.
|
|
1341
|
+
oItem.setContexts(mContexts);
|
|
1432
1342
|
this._determineRolesSpecificText(mContexts, oTextControl);
|
|
1433
1343
|
}
|
|
1434
1344
|
} else {
|
|
@@ -1464,20 +1374,23 @@ sap.ui.define([
|
|
|
1464
1374
|
|
|
1465
1375
|
/**
|
|
1466
1376
|
* Opens the <i>Save As</i> dialog.
|
|
1467
|
-
* @param {string}
|
|
1377
|
+
* @param {string} sStyleClassName - style-class to be used
|
|
1468
1378
|
* @param {object} oRolesComponentContainer - component for roles handling
|
|
1469
1379
|
*/
|
|
1470
|
-
VariantManagement.prototype.
|
|
1380
|
+
VariantManagement.prototype.openSaveAsDialog = function (sStyleClassName, oRolesComponentContainer) {
|
|
1471
1381
|
this._openSaveAsDialog(true);
|
|
1472
|
-
this.oSaveAsDialog.addStyleClass(
|
|
1473
|
-
this._sStyleClass =
|
|
1382
|
+
this.oSaveAsDialog.addStyleClass(sStyleClassName);
|
|
1383
|
+
this._sStyleClass = sStyleClassName; // indicates that dialog is running in key user scenario
|
|
1474
1384
|
|
|
1475
|
-
this._bShowPublic = this.
|
|
1476
|
-
this.
|
|
1385
|
+
this._bShowPublic = this.getSupportPublic();
|
|
1386
|
+
this.setSupportPublic(false);
|
|
1477
1387
|
|
|
1478
1388
|
if (oRolesComponentContainer) {
|
|
1479
1389
|
Promise.all([oRolesComponentContainer]).then(function(vArgs) {
|
|
1480
1390
|
this._oRolesComponentContainer = vArgs[0];
|
|
1391
|
+
|
|
1392
|
+
this.setSupportContexts(!!this._oRolesComponentContainer );
|
|
1393
|
+
|
|
1481
1394
|
this._checkAndAddRolesContainerToSaveAsDialog();
|
|
1482
1395
|
|
|
1483
1396
|
this.oSaveAsDialog.open();
|
|
@@ -1487,10 +1400,13 @@ sap.ui.define([
|
|
|
1487
1400
|
}
|
|
1488
1401
|
};
|
|
1489
1402
|
|
|
1403
|
+
|
|
1490
1404
|
VariantManagement.prototype._openSaveAsDialog = function(bDoNotOpen) {
|
|
1491
1405
|
this._createSaveAsDialog();
|
|
1492
1406
|
|
|
1493
|
-
this.
|
|
1407
|
+
this.setSupportContexts(false);
|
|
1408
|
+
|
|
1409
|
+
this.oInputName.setValue(this.getSelectedVariantText(this.getSelectedKey()));
|
|
1494
1410
|
this.oInputName.setEnabled(true);
|
|
1495
1411
|
this.oInputName.setValueState(ValueState.None);
|
|
1496
1412
|
this.oInputName.setValueStateText(null);
|
|
@@ -1520,7 +1436,7 @@ sap.ui.define([
|
|
|
1520
1436
|
}
|
|
1521
1437
|
};
|
|
1522
1438
|
|
|
1523
|
-
VariantManagement.prototype._handleVariantSaveAs = function(sNewVariantName
|
|
1439
|
+
VariantManagement.prototype._handleVariantSaveAs = function(sNewVariantName) {
|
|
1524
1440
|
var sKey = null;
|
|
1525
1441
|
var sName = sNewVariantName.trim();
|
|
1526
1442
|
var sManualKey = this.oInputManualKey.getValue().trim();
|
|
@@ -1544,27 +1460,23 @@ sap.ui.define([
|
|
|
1544
1460
|
this.oSaveAsDialog.close();
|
|
1545
1461
|
}
|
|
1546
1462
|
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1463
|
+
if (this.oDefault.getSelected()) {
|
|
1464
|
+
this.setDefaultKey(this.oDefault.getSelected());
|
|
1465
|
+
}
|
|
1550
1466
|
|
|
1551
1467
|
this.setModified(false);
|
|
1552
1468
|
|
|
1553
|
-
if (bKeyUser) {
|
|
1554
|
-
return true;
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
1469
|
var oObj = {
|
|
1558
1470
|
key: sKey,
|
|
1559
1471
|
name: sName,
|
|
1560
1472
|
overwrite: false,
|
|
1561
1473
|
def: this.oDefault.getSelected(),
|
|
1562
1474
|
execute: this.oExecuteOnSelect.getSelected(),
|
|
1563
|
-
"public": this.
|
|
1564
|
-
contexts: this.
|
|
1475
|
+
"public": this.getSupportPublic() ? this.oPublic.getSelected() : undefined,
|
|
1476
|
+
contexts: this._getContextInfoChanges()
|
|
1565
1477
|
};
|
|
1566
1478
|
|
|
1567
|
-
if (
|
|
1479
|
+
if (this._getShowCreateTile() && this.oCreateTile) {
|
|
1568
1480
|
oObj.tile = this.oCreateTile.getSelected();
|
|
1569
1481
|
}
|
|
1570
1482
|
|
|
@@ -1580,18 +1492,18 @@ sap.ui.define([
|
|
|
1580
1492
|
return this._getSelectedContexts();
|
|
1581
1493
|
}
|
|
1582
1494
|
} catch (ex) {
|
|
1583
|
-
return
|
|
1495
|
+
return undefined;
|
|
1584
1496
|
}
|
|
1585
1497
|
}
|
|
1586
1498
|
|
|
1587
|
-
return
|
|
1499
|
+
return undefined;
|
|
1588
1500
|
};
|
|
1589
1501
|
|
|
1590
1502
|
VariantManagement.prototype._handleVariantSave = function() {
|
|
1591
|
-
var oItem = this._getItemByKey(this.
|
|
1503
|
+
var oItem = this._getItemByKey(this.getSelectedKey());
|
|
1592
1504
|
|
|
1593
1505
|
var bDefault = false;
|
|
1594
|
-
if (this.
|
|
1506
|
+
if (this.getDefaultKey() === oItem.getKey()) {
|
|
1595
1507
|
bDefault = true;
|
|
1596
1508
|
}
|
|
1597
1509
|
|
|
@@ -1600,9 +1512,9 @@ sap.ui.define([
|
|
|
1600
1512
|
}
|
|
1601
1513
|
|
|
1602
1514
|
this.fireSave({
|
|
1603
|
-
name: oItem.
|
|
1515
|
+
name: oItem.getTitle(),
|
|
1604
1516
|
overwrite: true,
|
|
1605
|
-
key: oItem.
|
|
1517
|
+
key: oItem.getKey(),
|
|
1606
1518
|
def: bDefault
|
|
1607
1519
|
});
|
|
1608
1520
|
|
|
@@ -1614,26 +1526,28 @@ sap.ui.define([
|
|
|
1614
1526
|
/**
|
|
1615
1527
|
* Opens the <i>Manage Views</i> dialog.
|
|
1616
1528
|
* @param {boolean} bCreateAlways - Indicates that if this is set to <code>true</code>, the former dialog will be destroyed before a new one is created
|
|
1617
|
-
* @param {string}
|
|
1529
|
+
* @param {string} sStyleClass - style-class to be used
|
|
1618
1530
|
* @param {object} oRolesComponentContainer - component for roles handling
|
|
1619
1531
|
*/
|
|
1620
|
-
VariantManagement.prototype.openManagementDialog = function(bCreateAlways,
|
|
1532
|
+
VariantManagement.prototype.openManagementDialog = function(bCreateAlways, sStyleClass, oRolesComponentContainer) {
|
|
1621
1533
|
if (bCreateAlways && this.oManagementDialog) {
|
|
1622
1534
|
this.oManagementDialog.destroy();
|
|
1623
1535
|
this.oManagementDialog = undefined;
|
|
1624
1536
|
}
|
|
1625
1537
|
|
|
1626
|
-
if (
|
|
1627
|
-
this._sStyleClass =
|
|
1628
|
-
this._bShowPublic = this.
|
|
1629
|
-
this.
|
|
1538
|
+
if (sStyleClass) {
|
|
1539
|
+
this._sStyleClass = sStyleClass;
|
|
1540
|
+
this._bShowPublic = this.getSupportPublic();
|
|
1541
|
+
this.setSupportPublic(false);
|
|
1542
|
+
|
|
1543
|
+
this.setSupportContexts(false);
|
|
1630
1544
|
}
|
|
1631
1545
|
|
|
1632
1546
|
if (oRolesComponentContainer) {
|
|
1633
1547
|
Promise.all([oRolesComponentContainer]).then(function(vArgs) {
|
|
1634
1548
|
this._oRolesComponentContainer = vArgs[0];
|
|
1635
1549
|
|
|
1636
|
-
this.
|
|
1550
|
+
this.setSupportContexts(!!this._oRolesComponentContainer);
|
|
1637
1551
|
this._openManagementDialog();
|
|
1638
1552
|
|
|
1639
1553
|
if (this._sStyleClass) {
|
|
@@ -1641,7 +1555,6 @@ sap.ui.define([
|
|
|
1641
1555
|
}
|
|
1642
1556
|
}.bind(this));
|
|
1643
1557
|
} else {
|
|
1644
|
-
this._setShowContexts(false);
|
|
1645
1558
|
this._openManagementDialog();
|
|
1646
1559
|
|
|
1647
1560
|
if (this._sStyleClass) {
|
|
@@ -1660,7 +1573,17 @@ sap.ui.define([
|
|
|
1660
1573
|
return;
|
|
1661
1574
|
}
|
|
1662
1575
|
|
|
1663
|
-
var sValue
|
|
1576
|
+
var sValue;
|
|
1577
|
+
if (parameters.query) {
|
|
1578
|
+
sValue = parameters.query;
|
|
1579
|
+
} else {
|
|
1580
|
+
sValue = parameters.newValue ? parameters.newValue : "";
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
this._triggerSearchInManageDialogByValue(sValue, oManagementTable);
|
|
1584
|
+
};
|
|
1585
|
+
|
|
1586
|
+
VariantManagement.prototype._triggerSearchInManageDialogByValue = function(sValue, oManagementTable) {
|
|
1664
1587
|
|
|
1665
1588
|
var aFilters = [
|
|
1666
1589
|
this._getVisibleFilter(), new Filter({
|
|
@@ -1698,8 +1621,8 @@ sap.ui.define([
|
|
|
1698
1621
|
new Column({
|
|
1699
1622
|
width: "3rem",
|
|
1700
1623
|
visible: {
|
|
1701
|
-
path:
|
|
1702
|
-
model:
|
|
1624
|
+
path: "/supportFavorites",
|
|
1625
|
+
model: "$mVariants"
|
|
1703
1626
|
}
|
|
1704
1627
|
}), new Column({
|
|
1705
1628
|
header: new Text({
|
|
@@ -1712,8 +1635,8 @@ sap.ui.define([
|
|
|
1712
1635
|
wrappingType: "Hyphenated"
|
|
1713
1636
|
}),
|
|
1714
1637
|
visible: {
|
|
1715
|
-
path: "/
|
|
1716
|
-
model:
|
|
1638
|
+
path: "/supportPublic",
|
|
1639
|
+
model: "$mVariants"
|
|
1717
1640
|
},
|
|
1718
1641
|
demandPopin: true,
|
|
1719
1642
|
popinDisplay: PopinDisplay.Inline,
|
|
@@ -1728,8 +1651,8 @@ sap.ui.define([
|
|
|
1728
1651
|
popinDisplay: PopinDisplay.Block,
|
|
1729
1652
|
minScreenWidth: ScreenSize.Tablet,
|
|
1730
1653
|
visible: {
|
|
1731
|
-
path: "/
|
|
1732
|
-
model:
|
|
1654
|
+
path: "/supportDefault",
|
|
1655
|
+
model: "$mVariants"
|
|
1733
1656
|
}
|
|
1734
1657
|
}), new Column({
|
|
1735
1658
|
header: new Text({
|
|
@@ -1741,8 +1664,8 @@ sap.ui.define([
|
|
|
1741
1664
|
popinDisplay: PopinDisplay.Block,
|
|
1742
1665
|
minScreenWidth: ScreenSize.Tablet,
|
|
1743
1666
|
visible: {
|
|
1744
|
-
path: "/
|
|
1745
|
-
model:
|
|
1667
|
+
path: "/supportApplyAutomatically",
|
|
1668
|
+
model: "$mVariants"
|
|
1746
1669
|
}
|
|
1747
1670
|
}), new Column({
|
|
1748
1671
|
header: new Text({
|
|
@@ -1754,8 +1677,8 @@ sap.ui.define([
|
|
|
1754
1677
|
popinDisplay: PopinDisplay.Inline,
|
|
1755
1678
|
minScreenWidth: ScreenSize.Tablet,
|
|
1756
1679
|
visible: {
|
|
1757
|
-
path: "/
|
|
1758
|
-
model:
|
|
1680
|
+
path: "/supportContexts",
|
|
1681
|
+
model: "$mVariants"
|
|
1759
1682
|
}
|
|
1760
1683
|
}), new Column({
|
|
1761
1684
|
header: new Text({
|
|
@@ -1778,6 +1701,7 @@ sap.ui.define([
|
|
|
1778
1701
|
type: ButtonType.Emphasized,
|
|
1779
1702
|
press: function() {
|
|
1780
1703
|
this._handleManageSavePressed();
|
|
1704
|
+
//this.oManagementDialog.close();
|
|
1781
1705
|
}.bind(this)
|
|
1782
1706
|
});
|
|
1783
1707
|
|
|
@@ -1785,8 +1709,10 @@ sap.ui.define([
|
|
|
1785
1709
|
text: this._oRb.getText("VARIANT_MANAGEMENT_CANCEL"),
|
|
1786
1710
|
press: function() {
|
|
1787
1711
|
this._resumeManagementTableBinding();
|
|
1788
|
-
this.oManagementDialog.close();
|
|
1789
1712
|
this._handleManageCancelPressed();
|
|
1713
|
+
if (this.oManagementDialog) { // can be deleted during manageCancel event
|
|
1714
|
+
this.oManagementDialog.close();
|
|
1715
|
+
}
|
|
1790
1716
|
}.bind(this)
|
|
1791
1717
|
});
|
|
1792
1718
|
|
|
@@ -1799,7 +1725,7 @@ sap.ui.define([
|
|
|
1799
1725
|
endButton: this.oManagementCancel,
|
|
1800
1726
|
afterClose: function() {
|
|
1801
1727
|
if (this._sStyleClass) {
|
|
1802
|
-
this.
|
|
1728
|
+
this.setSupportPublic(this._bShowPublic, true);
|
|
1803
1729
|
this.oManagementDialog.removeStyleClass(this._sStyleClass);
|
|
1804
1730
|
this._sStyleClass = undefined;
|
|
1805
1731
|
this._oRolesComponentContainer = null;
|
|
@@ -1821,6 +1747,10 @@ sap.ui.define([
|
|
|
1821
1747
|
this._triggerSearchInManageDialog(oEvent, this.oManagementTable);
|
|
1822
1748
|
}.bind(this));
|
|
1823
1749
|
|
|
1750
|
+
this._oSearchFieldOnMgmtDialog.attachSearch(function(oEvent) {
|
|
1751
|
+
this._triggerSearchInManageDialog(oEvent, this.oManagementTable);
|
|
1752
|
+
}.bind(this));
|
|
1753
|
+
|
|
1824
1754
|
var oSubHeader = new Bar(this.getId() + "-mgmHeaderSearch", {
|
|
1825
1755
|
contentMiddle: [
|
|
1826
1756
|
this._oSearchFieldOnMgmtDialog
|
|
@@ -1828,14 +1758,16 @@ sap.ui.define([
|
|
|
1828
1758
|
});
|
|
1829
1759
|
this.oManagementDialog.setSubHeader(oSubHeader);
|
|
1830
1760
|
|
|
1761
|
+
this.oManagementDialog.setInitialFocus(this._oSearchFieldOnMgmtDialog);
|
|
1762
|
+
|
|
1831
1763
|
if (this.oVariantLayout.$().closest(".sapUiSizeCompact").length > 0) {
|
|
1832
1764
|
this.oManagementDialog.addStyleClass("sapUiSizeCompact");
|
|
1833
1765
|
}
|
|
1834
1766
|
this.addDependent(this.oManagementDialog);
|
|
1835
1767
|
|
|
1836
1768
|
this.oManagementTable.bindAggregation("items", {
|
|
1837
|
-
path:
|
|
1838
|
-
model:
|
|
1769
|
+
path: "/items",
|
|
1770
|
+
model: "$mVariants",
|
|
1839
1771
|
factory: this._templateFactoryManagementDialog.bind(this),
|
|
1840
1772
|
filters: this._getVisibleFilter()
|
|
1841
1773
|
});
|
|
@@ -1855,7 +1787,6 @@ sap.ui.define([
|
|
|
1855
1787
|
VariantManagement.prototype._templateFactoryManagementDialog = function(sId, oContext) {
|
|
1856
1788
|
var sTooltip = null;
|
|
1857
1789
|
var oDeleteButton;
|
|
1858
|
-
var sBindingPath;
|
|
1859
1790
|
var oNameControl;
|
|
1860
1791
|
var oExecuteOnSelectCtrl;
|
|
1861
1792
|
var oRolesCell;
|
|
@@ -1864,24 +1795,24 @@ sap.ui.define([
|
|
|
1864
1795
|
return undefined;
|
|
1865
1796
|
}
|
|
1866
1797
|
|
|
1798
|
+
var sModelName = "$mVariants";
|
|
1799
|
+
|
|
1867
1800
|
var fLiveChange = function(oEvent) {
|
|
1868
|
-
|
|
1801
|
+
var oItem = oEvent.oSource.getBindingContext(sModelName).getObject();
|
|
1802
|
+
this._handleManageTitleChange(oEvent.oSource, oItem);
|
|
1869
1803
|
}.bind(this);
|
|
1870
1804
|
|
|
1871
1805
|
var fChange = function(oEvent) {
|
|
1872
|
-
|
|
1806
|
+
var oItem = oEvent.oSource.getBindingContext(sModelName).getObject();
|
|
1807
|
+
this._handleManageTitleChange(oEvent.oSource, oItem);
|
|
1873
1808
|
}.bind(this);
|
|
1874
1809
|
|
|
1875
1810
|
var fSelectRB = function(oEvent) {
|
|
1876
|
-
this._handleManageDefaultVariantChange(oEvent.oSource, oEvent.oSource.getBindingContext(
|
|
1877
|
-
}.bind(this);
|
|
1878
|
-
|
|
1879
|
-
var fSelectCB = function(oEvent) {
|
|
1880
|
-
this._handleManageExecuteOnSelectionChanged(oEvent.oSource.getBindingContext(this._sModelName).getObject());
|
|
1811
|
+
this._handleManageDefaultVariantChange(oEvent.oSource, oEvent.oSource.getBindingContext(sModelName).getObject(), oEvent.getParameters().selected);
|
|
1881
1812
|
}.bind(this);
|
|
1882
1813
|
|
|
1883
1814
|
var fPress = function(oEvent) {
|
|
1884
|
-
this._handleManageDeletePressed(oEvent.oSource.getBindingContext(
|
|
1815
|
+
this._handleManageDeletePressed(oEvent.oSource.getBindingContext(sModelName).getObject());
|
|
1885
1816
|
var oListItem = oEvent.oSource.getParent();
|
|
1886
1817
|
if (oListItem) {
|
|
1887
1818
|
oListItem.setVisible(false);
|
|
@@ -1891,59 +1822,57 @@ sap.ui.define([
|
|
|
1891
1822
|
}.bind(this);
|
|
1892
1823
|
|
|
1893
1824
|
var fSelectFav = function(oEvent) {
|
|
1894
|
-
this._handleManageFavoriteChanged(oEvent.oSource, oEvent.oSource.getBindingContext(
|
|
1825
|
+
this._handleManageFavoriteChanged(oEvent.oSource, oEvent.oSource.getBindingContext(sModelName).getObject());
|
|
1895
1826
|
}.bind(this);
|
|
1896
1827
|
|
|
1897
1828
|
var fRolesPressed = function(oEvent) {
|
|
1898
|
-
var oItem = oEvent.oSource.getBindingContext(
|
|
1829
|
+
var oItem = oEvent.oSource.getBindingContext(sModelName).getObject();
|
|
1899
1830
|
this._openRolesDialog(oItem, oEvent.oSource.getParent().getItems()[0]);
|
|
1900
1831
|
}.bind(this);
|
|
1901
1832
|
|
|
1902
|
-
|
|
1903
|
-
if (bRenameEnabled) {
|
|
1833
|
+
if (oItem.getRename()) {
|
|
1904
1834
|
oNameControl = new Input({
|
|
1905
1835
|
liveChange: fLiveChange,
|
|
1906
1836
|
change: fChange,
|
|
1907
|
-
value: '{' +
|
|
1837
|
+
value: '{' + sModelName + ">title}"
|
|
1908
1838
|
});
|
|
1839
|
+
|
|
1840
|
+
if (oItem.getTitle() !== oItem.getOriginalTitle()) {
|
|
1841
|
+
this._verifyVariantNameConstraints(oNameControl, oItem.getKey(), oItem.getTitle());
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
|
|
1909
1845
|
} else {
|
|
1910
1846
|
oNameControl = new ObjectIdentifier({
|
|
1911
|
-
title: '{' +
|
|
1847
|
+
title: '{' + sModelName + ">title}"
|
|
1912
1848
|
});
|
|
1913
1849
|
if (sTooltip) {
|
|
1914
1850
|
oNameControl.setTooltip(sTooltip);
|
|
1915
1851
|
}
|
|
1916
1852
|
}
|
|
1917
1853
|
|
|
1918
|
-
var bDeleteEnabled = this.isItemDeleteEnabled(oItem);
|
|
1919
|
-
var bDeleteVisible = this.isItemDeleteVisible(oItem);
|
|
1920
|
-
|
|
1921
1854
|
oDeleteButton = new Button({
|
|
1922
1855
|
icon: "sap-icon://decline",
|
|
1923
|
-
enabled:
|
|
1856
|
+
enabled: true,
|
|
1924
1857
|
type: ButtonType.Transparent,
|
|
1925
1858
|
press: fPress,
|
|
1926
1859
|
tooltip: this._oRb.getText("VARIANT_MANAGEMENT_DELETE"),
|
|
1927
|
-
visible:
|
|
1860
|
+
visible: oItem.getRemove()
|
|
1928
1861
|
});
|
|
1929
1862
|
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
this._assignColumnInfoForDeleteButton(oDeleteButton);
|
|
1933
|
-
|
|
1934
|
-
sBindingPath = this._getBindingPath();
|
|
1863
|
+
//this._assignColumnInfoForDeleteButton(oDeleteButton);
|
|
1935
1864
|
|
|
1936
1865
|
var oFavoriteIcon = new Icon({
|
|
1937
1866
|
src: {
|
|
1938
1867
|
path: "favorite",
|
|
1939
|
-
model:
|
|
1868
|
+
model: sModelName,
|
|
1940
1869
|
formatter: function(bFlagged) {
|
|
1941
1870
|
return bFlagged ? "sap-icon://favorite" : "sap-icon://unfavorite";
|
|
1942
1871
|
}
|
|
1943
1872
|
},
|
|
1944
1873
|
tooltip: {
|
|
1945
1874
|
path: 'favorite',
|
|
1946
|
-
model:
|
|
1875
|
+
model: sModelName,
|
|
1947
1876
|
formatter: function(bFlagged) {
|
|
1948
1877
|
return this._oRb.getText(bFlagged ? "VARIANT_MANAGEMENT_FAV_DEL_TOOLTIP" : "VARIANT_MANAGEMENT_FAV_ADD_TOOLTIP");
|
|
1949
1878
|
}.bind(this)
|
|
@@ -1951,37 +1880,35 @@ sap.ui.define([
|
|
|
1951
1880
|
press: fSelectFav
|
|
1952
1881
|
});
|
|
1953
1882
|
|
|
1954
|
-
if ((this.getStandardVariantKey() === oItem.
|
|
1883
|
+
if ((this.getStandardVariantKey() === oItem.getKey()) || (this.getDefaultKey() === oItem.getKey())) {
|
|
1955
1884
|
oFavoriteIcon.addStyleClass("sapMVarMngmtFavNonInteractiveColor");
|
|
1956
1885
|
} else {
|
|
1957
1886
|
oFavoriteIcon.addStyleClass("sapMVarMngmtFavColor");
|
|
1958
1887
|
}
|
|
1959
1888
|
|
|
1960
|
-
if (this.getDisplayTextForExecuteOnSelectionForStandardVariant() && (this.getStandardVariantKey() === oItem.
|
|
1889
|
+
if (this.getDisplayTextForExecuteOnSelectionForStandardVariant() && (this.getStandardVariantKey() === oItem.getKey())) {
|
|
1961
1890
|
oExecuteOnSelectCtrl = new CheckBox(this.getId() + "-manage-exe-0",{
|
|
1962
1891
|
wrapping: true,
|
|
1963
|
-
text: this.getDisplayTextForExecuteOnSelectionForStandardVariant(),
|
|
1964
|
-
|
|
1965
|
-
selected: '{' +
|
|
1892
|
+
//text: this.getDisplayTextForExecuteOnSelectionForStandardVariant(),
|
|
1893
|
+
text: '{' + sModelName + ">/displayTextForExecuteOnSelectionForStandardVariant}",
|
|
1894
|
+
selected: '{' + sModelName + ">executeOnSelect}"
|
|
1966
1895
|
});
|
|
1967
|
-
} else if (this.getStandardVariantKey() === oItem.
|
|
1896
|
+
} else if (this.getStandardVariantKey() === oItem.getKey()) {
|
|
1968
1897
|
oExecuteOnSelectCtrl = new CheckBox(this.getId() + "-manage-exe-0",{
|
|
1969
1898
|
text: "",
|
|
1970
|
-
|
|
1971
|
-
selected: '{' + this._sModelName + ">executeOnSelect}"
|
|
1899
|
+
selected: '{' + sModelName + ">executeOnSelect}"
|
|
1972
1900
|
});
|
|
1973
1901
|
} else {
|
|
1974
1902
|
oExecuteOnSelectCtrl = new CheckBox({
|
|
1975
1903
|
text: "",
|
|
1976
|
-
|
|
1977
|
-
selected: '{' + this._sModelName + ">executeOnSelect}"
|
|
1904
|
+
selected: '{' + sModelName + ">executeOnSelect}"
|
|
1978
1905
|
});
|
|
1979
1906
|
}
|
|
1980
1907
|
|
|
1981
1908
|
// roles
|
|
1982
|
-
if (this._sStyleClass && (oItem.
|
|
1909
|
+
if (this._sStyleClass && (oItem.getKey() !== this.getStandardVariantKey())) {
|
|
1983
1910
|
var oText = new Text({ wrapping: false });
|
|
1984
|
-
this._determineRolesSpecificText(oItem.
|
|
1911
|
+
this._determineRolesSpecificText(oItem.getContexts(), oText);
|
|
1985
1912
|
var oIcon = new Icon({
|
|
1986
1913
|
src: "sap-icon://edit",
|
|
1987
1914
|
press: fRolesPressed
|
|
@@ -2000,7 +1927,7 @@ sap.ui.define([
|
|
|
2000
1927
|
oFavoriteIcon, oNameControl, new Text({
|
|
2001
1928
|
text: {
|
|
2002
1929
|
path: "sharing",
|
|
2003
|
-
model:
|
|
1930
|
+
model: sModelName,
|
|
2004
1931
|
formatter: function(sValue) {
|
|
2005
1932
|
return this._oRb.getText(sValue === "private" ? "VARIANT_MANAGEMENT_PRIVATE" : "VARIANT_MANAGEMENT_PUBLIC");
|
|
2006
1933
|
}.bind(this)
|
|
@@ -2010,17 +1937,17 @@ sap.ui.define([
|
|
|
2010
1937
|
groupName: this.getId(),
|
|
2011
1938
|
select: fSelectRB,
|
|
2012
1939
|
selected: {
|
|
2013
|
-
path:
|
|
2014
|
-
model:
|
|
1940
|
+
path: "/defaultKey",
|
|
1941
|
+
model: sModelName,
|
|
2015
1942
|
formatter: function(sKey) {
|
|
2016
|
-
return oItem.
|
|
1943
|
+
return oItem.getKey() === sKey;
|
|
2017
1944
|
}
|
|
2018
1945
|
}
|
|
2019
1946
|
}), oExecuteOnSelectCtrl, oRolesCell, new Text({
|
|
2020
|
-
text: '{' +
|
|
1947
|
+
text: '{' + sModelName + ">author}",
|
|
2021
1948
|
textAlign: "Begin"
|
|
2022
1949
|
}), oDeleteButton, new Text({
|
|
2023
|
-
text: '{' +
|
|
1950
|
+
text: '{' + sModelName + ">key}"
|
|
2024
1951
|
})
|
|
2025
1952
|
]
|
|
2026
1953
|
});
|
|
@@ -2036,19 +1963,25 @@ sap.ui.define([
|
|
|
2036
1963
|
this._suspendManagementTableBinding();
|
|
2037
1964
|
|
|
2038
1965
|
this._clearDeletedItems();
|
|
2039
|
-
|
|
1966
|
+
this._clearRenamedItems();
|
|
1967
|
+
this._sDefaultKey = this.getDefaultKey();
|
|
1968
|
+
this._sOriginalDefaultKey = this._sDefaultKey;
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
//this.oManagementSave.setEnabled(false);
|
|
2040
1972
|
this._oSearchFieldOnMgmtDialog.setValue("");
|
|
2041
1973
|
|
|
2042
|
-
// Ideally, this should be done only once in <code>
|
|
1974
|
+
// Ideally, this should be done only once in <code>_createManagementDialog</code>. However, the binding does not recognize a change if filtering is involved.
|
|
2043
1975
|
// After a deletion on the UI, the item is filtered out <code>.visible=false</code>. The real deletion will occur only when <i>OK</i> is pressed.
|
|
2044
1976
|
// Since the filtered items and the result after the real deletion are identical, no change is detected. Based on this, the context on the table is
|
|
2045
1977
|
// not invalidated....
|
|
2046
1978
|
// WA: Always do the binding while opening the dialog.
|
|
2047
1979
|
if (this._bDeleteOccured) {
|
|
2048
1980
|
this._bDeleteOccured = false;
|
|
1981
|
+
|
|
2049
1982
|
this.oManagementTable.bindAggregation("items", {
|
|
2050
|
-
path: "
|
|
2051
|
-
model:
|
|
1983
|
+
path: "/items",
|
|
1984
|
+
model: "$mVariants",
|
|
2052
1985
|
factory: this._templateFactoryManagementDialog.bind(this),
|
|
2053
1986
|
filters: this._getVisibleFilter()
|
|
2054
1987
|
});
|
|
@@ -2057,26 +1990,12 @@ sap.ui.define([
|
|
|
2057
1990
|
this.oManagementDialog.open();
|
|
2058
1991
|
};
|
|
2059
1992
|
|
|
2060
|
-
VariantManagement.prototype._assignColumnInfoForDeleteButton = function(oDeleteButton) {
|
|
2061
|
-
if (!this._oInvisibleDeleteColumnName) {
|
|
2062
|
-
this._oInvisibleDeleteColumnName = new InvisibleText({
|
|
2063
|
-
text: this._oRb.getText("VARIANT_MANAGEMENT_ACTION_COLUMN")
|
|
2064
|
-
});
|
|
2065
|
-
|
|
2066
|
-
this.oManagementDialog.addContent(this._oInvisibleDeleteColumnName);
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
if (this._oInvisibleDeleteColumnName) {
|
|
2070
|
-
oDeleteButton.addAriaLabelledBy(this._oInvisibleDeleteColumnName);
|
|
2071
|
-
}
|
|
2072
|
-
};
|
|
2073
|
-
|
|
2074
1993
|
VariantManagement.prototype._toggleIconActivityState = function(oIcon, oItem, bToInActive) {
|
|
2075
1994
|
if (!oIcon) {
|
|
2076
1995
|
return;
|
|
2077
1996
|
}
|
|
2078
1997
|
|
|
2079
|
-
if (oItem.
|
|
1998
|
+
if (oItem.getKey() === this.getStandardVariantKey()) {
|
|
2080
1999
|
return;
|
|
2081
2000
|
}
|
|
2082
2001
|
|
|
@@ -2089,19 +2008,26 @@ sap.ui.define([
|
|
|
2089
2008
|
}
|
|
2090
2009
|
};
|
|
2091
2010
|
|
|
2011
|
+
|
|
2012
|
+
VariantManagement.prototype._handleManageTitleChange = function(oInput, oItem) {
|
|
2013
|
+
this._checkVariantNameConstraints(oInput, oItem.getKey());
|
|
2014
|
+
|
|
2015
|
+
this._addRenamedItem(oItem);
|
|
2016
|
+
};
|
|
2017
|
+
|
|
2092
2018
|
VariantManagement.prototype._handleManageDefaultVariantChange = function(oRadioButton, oItem, bSelected) {
|
|
2093
|
-
var sKey = oItem.
|
|
2019
|
+
var sKey = oItem.getKey();
|
|
2094
2020
|
|
|
2095
2021
|
if (oRadioButton) {
|
|
2096
2022
|
var oIcon = oRadioButton.getParent().getCells()[VariantManagement.COLUMN_FAV_IDX];
|
|
2097
2023
|
|
|
2098
2024
|
if (bSelected) {
|
|
2099
|
-
if (this.
|
|
2100
|
-
oItem.
|
|
2025
|
+
if (this.getSupportFavorites() && !oItem.getFavorite()) {
|
|
2026
|
+
oItem.setFavorite(true);
|
|
2101
2027
|
this._setFavoriteIcon(oIcon, true);
|
|
2102
2028
|
}
|
|
2103
2029
|
|
|
2104
|
-
this.
|
|
2030
|
+
this.setDefaultKey(sKey);
|
|
2105
2031
|
}
|
|
2106
2032
|
|
|
2107
2033
|
this._toggleIconActivityState(oIcon, oItem, bSelected);
|
|
@@ -2109,51 +2035,69 @@ sap.ui.define([
|
|
|
2109
2035
|
};
|
|
2110
2036
|
|
|
2111
2037
|
VariantManagement.prototype._handleManageCancelPressed = function() {
|
|
2112
|
-
var
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
oItem
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
oItem.
|
|
2122
|
-
|
|
2038
|
+
var sDefaultKey = this._sDefaultKey;
|
|
2039
|
+
// this._getDeletedItems().forEach(function(sKey) {
|
|
2040
|
+
// var oItem = this._getItemByKey(sKey);
|
|
2041
|
+
// if (oItem) {
|
|
2042
|
+
// oItem.setVisible(true);
|
|
2043
|
+
// }
|
|
2044
|
+
// });
|
|
2045
|
+
|
|
2046
|
+
this.getItems().forEach(function(oItem) {
|
|
2047
|
+
if (oItem.getVisible()) {
|
|
2048
|
+
oItem.setTitle(oItem.getOriginalTitle());
|
|
2049
|
+
oItem.setFavorite(oItem.getOriginalFavorite());
|
|
2050
|
+
oItem.setExecuteOnSelect(oItem.getOriginalExecuteOnSelect());
|
|
2051
|
+
oItem.setContexts(oItem.getOriginalContexts());
|
|
2052
|
+
} else {
|
|
2053
|
+
oItem.setVisible(true);
|
|
2054
|
+
}
|
|
2123
2055
|
});
|
|
2124
2056
|
|
|
2125
|
-
|
|
2126
|
-
if (
|
|
2127
|
-
this.
|
|
2057
|
+
sDefaultKey = this._sOriginalDefaultKey;
|
|
2058
|
+
if (sDefaultKey !== this.getDefaultKey()) {
|
|
2059
|
+
this.setDefaultKey(sDefaultKey);
|
|
2128
2060
|
}
|
|
2129
2061
|
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2062
|
+
this._clearRenamedItems();
|
|
2063
|
+
this._clearDeletedItems();
|
|
2064
|
+
|
|
2065
|
+
// if (this._oManagedObjectModel) {
|
|
2066
|
+
// this._oManagedObjectModel.checkUpdate();
|
|
2067
|
+
// }
|
|
2068
|
+
|
|
2069
|
+
this.fireManageCancel();
|
|
2070
|
+
|
|
2071
|
+
//fireCancel may have deleted the ManageViews dialog
|
|
2072
|
+
// if (this.oManagementDialog) {
|
|
2073
|
+
// this.oManagementTable.getBinding("items").filter(this._getVisibleFilter());
|
|
2074
|
+
// }
|
|
2134
2075
|
};
|
|
2135
2076
|
|
|
2136
2077
|
VariantManagement.prototype._handleManageFavoriteChanged = function(oIcon, oItem) {
|
|
2137
2078
|
// if (!this._anyInErrorState(this.oManagementTable)) {
|
|
2138
2079
|
// this.oManagementSave.setEnabled(true);
|
|
2139
2080
|
// }
|
|
2140
|
-
if (this.getStandardVariantKey() === oItem.
|
|
2081
|
+
if (this.getStandardVariantKey() === oItem.getKey()) {
|
|
2141
2082
|
return;
|
|
2142
2083
|
}
|
|
2143
2084
|
|
|
2144
|
-
if ((this.
|
|
2085
|
+
if ((this.getDefaultKey() === oItem.getKey()) && oItem.getFavorite()) {
|
|
2145
2086
|
return;
|
|
2146
2087
|
}
|
|
2147
2088
|
|
|
2148
|
-
oItem.
|
|
2149
|
-
this._setFavoriteIcon(oIcon, oItem.
|
|
2089
|
+
oItem.setFavorite(!oItem.getFavorite());
|
|
2090
|
+
this._setFavoriteIcon(oIcon, oItem.getFavorite);
|
|
2150
2091
|
};
|
|
2151
2092
|
|
|
2152
2093
|
VariantManagement.prototype._getRowForKey = function(sKey) {
|
|
2153
2094
|
var oRowForKey = null;
|
|
2154
2095
|
if (this.oManagementTable) {
|
|
2155
2096
|
this.oManagementTable.getItems().some(function(oRow) {
|
|
2156
|
-
|
|
2097
|
+
var oColumnItem = oRow.getCells()[0].getParent();
|
|
2098
|
+
var oItem = this.getModel("$mVariants").getObject(oColumnItem.getBindingContextPath());
|
|
2099
|
+
//if (sKey === oRow.getCells()[0].getBindingContext().getObject().key) {
|
|
2100
|
+
if (sKey === oItem.getKey()) {
|
|
2157
2101
|
oRowForKey = oRow;
|
|
2158
2102
|
}
|
|
2159
2103
|
|
|
@@ -2165,49 +2109,93 @@ sap.ui.define([
|
|
|
2165
2109
|
};
|
|
2166
2110
|
|
|
2167
2111
|
VariantManagement.prototype._handleManageDeletePressed = function(oItem) {
|
|
2168
|
-
var
|
|
2169
|
-
var sKey = oItem.key;
|
|
2112
|
+
var sKey = oItem.getKey();
|
|
2170
2113
|
|
|
2171
2114
|
// do not allow the deletion of the standard
|
|
2172
2115
|
if (this.getStandardVariantKey() === sKey) {
|
|
2173
2116
|
return;
|
|
2174
2117
|
}
|
|
2175
2118
|
|
|
2176
|
-
oItem.
|
|
2119
|
+
oItem.setVisible(false);
|
|
2177
2120
|
this._addDeletedItem(oItem);
|
|
2178
2121
|
|
|
2179
|
-
if (
|
|
2180
|
-
this.
|
|
2181
|
-
if (this.
|
|
2122
|
+
if (sKey === this.getDefaultKey()) {
|
|
2123
|
+
this.setDefaultKey(this.getStandardVariantKey());
|
|
2124
|
+
if (this.getSupportFavorites()) {
|
|
2182
2125
|
var oNewDefaultItem = this._getItemByKey(this.getStandardVariantKey());
|
|
2183
|
-
if (oNewDefaultItem && !oNewDefaultItem.
|
|
2126
|
+
if (oNewDefaultItem && !oNewDefaultItem.getFavorite()) {
|
|
2184
2127
|
var oRow = this._getRowForKey(this.getStandardVariantKey());
|
|
2185
2128
|
if (oRow) {
|
|
2186
|
-
oNewDefaultItem.
|
|
2129
|
+
oNewDefaultItem.setFavorite(true);
|
|
2187
2130
|
this._setFavoriteIcon(oRow.getCells()[VariantManagement.COLUMN_FAV_IDX], true);
|
|
2188
2131
|
}
|
|
2189
2132
|
}
|
|
2190
2133
|
}
|
|
2191
2134
|
}
|
|
2192
2135
|
|
|
2193
|
-
oModel = this.getModel(
|
|
2194
|
-
if (oModel) {
|
|
2195
|
-
oModel.checkUpdate();
|
|
2196
|
-
}
|
|
2136
|
+
// var oModel = this.oManagementTable.getModel("$mVariants");
|
|
2137
|
+
// if (oModel) {
|
|
2138
|
+
// oModel.checkUpdate();
|
|
2139
|
+
// }
|
|
2140
|
+
|
|
2141
|
+
this.oManagementTable.getBinding("items").filter(this._getVisibleFilter());
|
|
2197
2142
|
|
|
2198
2143
|
this.oManagementCancel.focus();
|
|
2199
2144
|
};
|
|
2200
2145
|
|
|
2201
|
-
VariantManagement.prototype.
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2146
|
+
VariantManagement.prototype._collectManageData = function() {
|
|
2147
|
+
|
|
2148
|
+
var oVariantInfo = {};
|
|
2149
|
+
|
|
2150
|
+
var sDefault = this.getDefaultKey();
|
|
2151
|
+
if (sDefault !== this._sOriginalDefaultKey){
|
|
2152
|
+
oVariantInfo.def = sDefault;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
this.getItems().forEach(function(oItem) {
|
|
2156
|
+
|
|
2157
|
+
if (!oItem.getVisible()) {
|
|
2158
|
+
if (!oVariantInfo.deleted) {
|
|
2159
|
+
oVariantInfo.deleted = [];
|
|
2160
|
+
}
|
|
2161
|
+
oVariantInfo.deleted.push(oItem.getKey());
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
if (oItem.getVisible() && (oItem.getFavorite() !== oItem.getOriginalFavorite())) {
|
|
2165
|
+
if (!oVariantInfo.fav) {
|
|
2166
|
+
oVariantInfo.fav = [];
|
|
2167
|
+
}
|
|
2168
|
+
oVariantInfo.fav.push({ key: oItem.getKey(), visible: oItem.getFavorite()});
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
if (oItem.getVisible() && (oItem.getTitle() !== oItem.getOriginalTitle())) {
|
|
2172
|
+
if (!oVariantInfo.renamed) {
|
|
2173
|
+
oVariantInfo.renamed = [];
|
|
2174
|
+
}
|
|
2175
|
+
oVariantInfo.renamed.push({ key: oItem.getKey(), name: oItem.getTitle()});
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
if (oItem.getVisible() && (oItem.getExecuteOnSelect() !== oItem.getOriginalExecuteOnSelect())) {
|
|
2179
|
+
if (!oVariantInfo.exe) {
|
|
2180
|
+
oVariantInfo.exe = [];
|
|
2181
|
+
}
|
|
2182
|
+
oVariantInfo.exe.push({ key: oItem.getKey(), exe: oItem.getExecuteOnSelect()});
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
if (oItem.getVisible() && this._hasContextsChanged(oItem)) {
|
|
2186
|
+
if (!oVariantInfo.contexts) {
|
|
2187
|
+
oVariantInfo.contexts = [];
|
|
2188
|
+
}
|
|
2189
|
+
oVariantInfo.contexts.push({ key: oItem.getKey(), contexts: oItem.getContexts()});
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
}.bind(this));
|
|
2193
|
+
|
|
2194
|
+
return oVariantInfo;
|
|
2205
2195
|
};
|
|
2206
2196
|
|
|
2207
|
-
VariantManagement.prototype.
|
|
2208
|
-
|
|
2209
|
-
// this.oManagementSave.setEnabled(true);
|
|
2210
|
-
// }
|
|
2197
|
+
VariantManagement.prototype._hasContextsChanged = function(oItem) {
|
|
2198
|
+
return (JSON.stringify(oItem.getContexts()) !== JSON.stringify(oItem.getOriginalContexts()));
|
|
2211
2199
|
};
|
|
2212
2200
|
|
|
2213
2201
|
VariantManagement.prototype._handleManageSavePressed = function() {
|
|
@@ -2215,12 +2203,14 @@ sap.ui.define([
|
|
|
2215
2203
|
return;
|
|
2216
2204
|
}
|
|
2217
2205
|
|
|
2218
|
-
this.
|
|
2219
|
-
|
|
2206
|
+
this.oManagementDialog.close();
|
|
2207
|
+
|
|
2208
|
+
this._getDeletedItems().some(function(sItemKey) {
|
|
2209
|
+
if (sItemKey === this.getSelectedKey()) {
|
|
2220
2210
|
var sKey = this.getStandardVariantKey();
|
|
2221
2211
|
|
|
2222
2212
|
this.setModified(false);
|
|
2223
|
-
this.
|
|
2213
|
+
this.setSelectedKey(sKey);
|
|
2224
2214
|
|
|
2225
2215
|
this.fireSelect({
|
|
2226
2216
|
key: sKey
|
|
@@ -2231,12 +2221,19 @@ sap.ui.define([
|
|
|
2231
2221
|
return false;
|
|
2232
2222
|
}.bind(this));
|
|
2233
2223
|
|
|
2234
|
-
this.
|
|
2224
|
+
if (this._getRenamedItems().indexOf(this.getSelectedKey()) >= 0) {
|
|
2225
|
+
var oBinding = this.oVariantText.getBinding("text");
|
|
2226
|
+
if (oBinding) {
|
|
2227
|
+
oBinding.checkUpdate(true);
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2235
2230
|
|
|
2236
|
-
|
|
2231
|
+
this.fireManage(this._collectManageData());
|
|
2237
2232
|
|
|
2238
|
-
|
|
2239
|
-
this.oManagementDialog
|
|
2233
|
+
// the manage views dialog may be deleted.
|
|
2234
|
+
if (this.oManagementDialog) {
|
|
2235
|
+
this._resumeManagementTableBinding();
|
|
2236
|
+
}
|
|
2240
2237
|
};
|
|
2241
2238
|
|
|
2242
2239
|
VariantManagement.prototype._resumeManagementTableBinding = function() {
|
|
@@ -2257,14 +2254,28 @@ sap.ui.define([
|
|
|
2257
2254
|
}
|
|
2258
2255
|
};
|
|
2259
2256
|
|
|
2260
|
-
VariantManagement.prototype.
|
|
2261
|
-
|
|
2257
|
+
VariantManagement.prototype._focusOnFirstInputInErrorState = function(oManagementTable) {
|
|
2258
|
+
if (oManagementTable) {
|
|
2259
|
+
oManagementTable.getItems().some(function(oItem) {
|
|
2260
|
+
var oInput = oItem.getCells()[VariantManagement.COLUMN_NAME_IDX];
|
|
2261
|
+
if (oInput && oInput.getValueState && (oInput.getValueState() === ValueState.Error)) {
|
|
2262
|
+
oInput.getDomRef().scrollIntoView();
|
|
2263
|
+
oInput.focus();
|
|
2264
|
+
return true;
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
return false;
|
|
2268
|
+
});
|
|
2269
|
+
}
|
|
2270
|
+
};
|
|
2271
|
+
|
|
2272
|
+
|
|
2273
|
+
VariantManagement.prototype._anyInErrorStateManageTable = function(oManagementTable) {
|
|
2262
2274
|
var oInput;
|
|
2263
2275
|
var bInError = false;
|
|
2264
2276
|
|
|
2265
2277
|
if (oManagementTable) {
|
|
2266
|
-
|
|
2267
|
-
aItems.some(function(oItem) {
|
|
2278
|
+
oManagementTable.getItems().some(function(oItem) {
|
|
2268
2279
|
oInput = oItem.getCells()[VariantManagement.COLUMN_NAME_IDX];
|
|
2269
2280
|
if (oInput && oInput.getValueState && (oInput.getValueState() === ValueState.Error)) {
|
|
2270
2281
|
bInError = true;
|
|
@@ -2276,6 +2287,42 @@ sap.ui.define([
|
|
|
2276
2287
|
return bInError;
|
|
2277
2288
|
};
|
|
2278
2289
|
|
|
2290
|
+
VariantManagement.prototype._anyInErrorState = function(oManagementTable) {
|
|
2291
|
+
if (this._anyInErrorStateManageTable(oManagementTable)) {
|
|
2292
|
+
return true;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
var aRenamedKeys = this._getRenamedItems();
|
|
2296
|
+
|
|
2297
|
+
for (var i = aRenamedKeys.length - 1; i >= 0; i--) {
|
|
2298
|
+
var oItem = this._getItemByKey(aRenamedKeys[i]);
|
|
2299
|
+
if (oItem) {
|
|
2300
|
+
if (oItem.getTitle() === oItem.getOriginalTitle()) {
|
|
2301
|
+
this._removeRenamedItem(oItem);
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
var bError = false;
|
|
2307
|
+
this._getRenamedItems().some(function(sKey, nIdx) {
|
|
2308
|
+
var oItem = this._getItemByKey(sKey);
|
|
2309
|
+
if (oItem) {
|
|
2310
|
+
bError = this._checkIsDuplicateInModel(oItem.getTitle(), sKey);
|
|
2311
|
+
}
|
|
2312
|
+
return bError;
|
|
2313
|
+
|
|
2314
|
+
}.bind(this));
|
|
2315
|
+
|
|
2316
|
+
if (bError) {
|
|
2317
|
+
this._oSearchFieldOnMgmtDialog.setValue("");
|
|
2318
|
+
this._triggerSearchInManageDialogByValue("", oManagementTable);
|
|
2319
|
+
|
|
2320
|
+
this._focusOnFirstInputInErrorState(oManagementTable);
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
return bError;
|
|
2324
|
+
};
|
|
2325
|
+
|
|
2279
2326
|
// UTILS
|
|
2280
2327
|
|
|
2281
2328
|
VariantManagement.prototype._getFilters = function(oFilter) {
|
|
@@ -2287,7 +2334,7 @@ sap.ui.define([
|
|
|
2287
2334
|
|
|
2288
2335
|
aFilters.push(this._getVisibleFilter());
|
|
2289
2336
|
|
|
2290
|
-
if (this.
|
|
2337
|
+
if (this.getSupportFavorites()) {
|
|
2291
2338
|
aFilters.push(this._getFilterFavorites());
|
|
2292
2339
|
}
|
|
2293
2340
|
|
|
@@ -2311,12 +2358,12 @@ sap.ui.define([
|
|
|
2311
2358
|
};
|
|
2312
2359
|
|
|
2313
2360
|
|
|
2314
|
-
VariantManagement.prototype._verifyVariantNameConstraints = function(oInputField, sKey) {
|
|
2361
|
+
VariantManagement.prototype._verifyVariantNameConstraints = function(oInputField, sKey, sTitle) {
|
|
2315
2362
|
if (!oInputField) {
|
|
2316
2363
|
return;
|
|
2317
2364
|
}
|
|
2318
2365
|
|
|
2319
|
-
var sValue = oInputField.getValue();
|
|
2366
|
+
var sValue = sTitle || oInputField.getValue();
|
|
2320
2367
|
sValue = sValue.trim();
|
|
2321
2368
|
|
|
2322
2369
|
if (!this._checkIsDuplicate(sValue, sKey)) {
|
|
@@ -2339,7 +2386,13 @@ sap.ui.define([
|
|
|
2339
2386
|
}
|
|
2340
2387
|
} else {
|
|
2341
2388
|
oInputField.setValueState(ValueState.Error);
|
|
2342
|
-
|
|
2389
|
+
|
|
2390
|
+
if (this._oSearchFieldOnMgmtDialog && this._oSearchFieldOnMgmtDialog.getValue()) {
|
|
2391
|
+
oInputField.setValueStateText(this._oRb.getText("VARIANT_MANAGEMENT_ERROR_DUPLICATE_SAVE"));
|
|
2392
|
+
} else {
|
|
2393
|
+
oInputField.setValueStateText(this._oRb.getText("VARIANT_MANAGEMENT_ERROR_DUPLICATE"));
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2343
2396
|
}
|
|
2344
2397
|
};
|
|
2345
2398
|
|
|
@@ -2358,11 +2411,11 @@ sap.ui.define([
|
|
|
2358
2411
|
if (this.oManagementTable) {
|
|
2359
2412
|
aItems = this.oManagementTable.getItems();
|
|
2360
2413
|
aItems.some(function(oItem) {
|
|
2361
|
-
var oObject = oItem.getBindingContext(
|
|
2362
|
-
if (oObject && oObject.
|
|
2414
|
+
var oObject = oItem.getBindingContext("$mVariants").getObject();
|
|
2415
|
+
if (oObject && oObject.getVisible()) {
|
|
2363
2416
|
var oInput = oItem.getCells()[VariantManagement.COLUMN_NAME_IDX];
|
|
2364
2417
|
if (oInput && oInput.getValueState && (oInput.getValueState() === ValueState.Error)) {
|
|
2365
|
-
this._verifyVariantNameConstraints(oInput, oObject.
|
|
2418
|
+
this._verifyVariantNameConstraints(oInput, oObject.getKey());
|
|
2366
2419
|
if (oInput.getValueState() === ValueState.Error) {
|
|
2367
2420
|
bInError = true;
|
|
2368
2421
|
}
|
|
@@ -2378,7 +2431,10 @@ sap.ui.define([
|
|
|
2378
2431
|
|
|
2379
2432
|
VariantManagement.prototype._checkIsDuplicate = function(sValue, sKey) {
|
|
2380
2433
|
if (this.oManagementDialog && this.oManagementDialog.isOpen()) {
|
|
2381
|
-
|
|
2434
|
+
var bResult = this._checkIsDuplicateInManageTable(sValue, sKey);
|
|
2435
|
+
if (this._oSearchFieldOnMgmtDialog && this._oSearchFieldOnMgmtDialog.getValue() && bResult) {
|
|
2436
|
+
return bResult;
|
|
2437
|
+
}
|
|
2382
2438
|
}
|
|
2383
2439
|
|
|
2384
2440
|
return this._checkIsDuplicateInModel(sValue, sKey);
|
|
@@ -2389,8 +2445,8 @@ sap.ui.define([
|
|
|
2389
2445
|
var aItems = this._getItems();
|
|
2390
2446
|
var sLowerCaseValue = sValue.toLowerCase();
|
|
2391
2447
|
aItems.some(function(oItem) {
|
|
2392
|
-
if (oItem.
|
|
2393
|
-
if (sKey && (sKey === oItem.
|
|
2448
|
+
if (oItem.getTitle().toLowerCase() === sLowerCaseValue) {
|
|
2449
|
+
if (sKey && (sKey === oItem.getKey())) {
|
|
2394
2450
|
return false;
|
|
2395
2451
|
}
|
|
2396
2452
|
bDublicate = true;
|
|
@@ -2411,11 +2467,11 @@ sap.ui.define([
|
|
|
2411
2467
|
aItems = this.oManagementTable.getItems();
|
|
2412
2468
|
aItems.some(function(oItem) {
|
|
2413
2469
|
var sTitleLowerCase;
|
|
2414
|
-
var oObject = oItem.getBindingContext(
|
|
2415
|
-
if (oObject && oObject.
|
|
2470
|
+
var oObject = oItem.getBindingContext("$mVariants").getObject();
|
|
2471
|
+
if (oObject && oObject.getVisible()) {
|
|
2416
2472
|
var oInput = oItem.getCells()[VariantManagement.COLUMN_NAME_IDX];
|
|
2417
2473
|
|
|
2418
|
-
if (oInput && (oObject.
|
|
2474
|
+
if (oInput && (oObject.getKey() !== sKey)) {
|
|
2419
2475
|
if (oInput.isA("sap.m.Input")) {
|
|
2420
2476
|
sTitleLowerCase = oInput.getValue().toLowerCase();
|
|
2421
2477
|
} else {
|
|
@@ -2427,7 +2483,7 @@ sap.ui.define([
|
|
|
2427
2483
|
}
|
|
2428
2484
|
}
|
|
2429
2485
|
return bInError;
|
|
2430
|
-
}
|
|
2486
|
+
});
|
|
2431
2487
|
}
|
|
2432
2488
|
|
|
2433
2489
|
return bInError;
|
|
@@ -2437,7 +2493,11 @@ sap.ui.define([
|
|
|
2437
2493
|
VariantManagement.prototype.exit = function() {
|
|
2438
2494
|
var oModel;
|
|
2439
2495
|
|
|
2440
|
-
|
|
2496
|
+
Control.prototype.exit.apply(this, arguments);
|
|
2497
|
+
this._clearDeletedItems();
|
|
2498
|
+
this._clearRenamedItems();
|
|
2499
|
+
|
|
2500
|
+
if (this.oVariantInvisibleText && !this.oVariantInvisibleText._bIsBeingDestroyed) {
|
|
2441
2501
|
this.oVariantInvisibleText.destroy(true);
|
|
2442
2502
|
this.oVariantInvisibleText = undefined;
|
|
2443
2503
|
}
|
|
@@ -2471,18 +2531,21 @@ sap.ui.define([
|
|
|
2471
2531
|
this.oVariantPopoverTrigger = undefined;
|
|
2472
2532
|
this._oSearchField = undefined;
|
|
2473
2533
|
this._oSearchFieldOnMgmtDialog = undefined;
|
|
2534
|
+
this._sDefaultKey = undefined;
|
|
2474
2535
|
|
|
2475
2536
|
oModel = this.getModel(VariantManagement.INNER_MODEL_NAME);
|
|
2476
2537
|
if (oModel) {
|
|
2477
2538
|
oModel.destroy();
|
|
2478
2539
|
}
|
|
2540
|
+
if (this._oManagedObjectModel) {
|
|
2541
|
+
this._oManagedObjectModel.destroy();
|
|
2542
|
+
this._oManagedObjectModel = undefined;
|
|
2543
|
+
}
|
|
2479
2544
|
|
|
2480
2545
|
this._oRolesComponentContainer = null;
|
|
2481
|
-
this._sStyleClass = null;
|
|
2482
2546
|
|
|
2483
|
-
this._fRegisteredApplyAutomaticallyOnStandardVariant = null;
|
|
2484
2547
|
|
|
2485
|
-
if (this._oRolesDialog) {
|
|
2548
|
+
if (this._oRolesDialog && !this._oRolesDialog._bIsBeingDestroyed) {
|
|
2486
2549
|
this._oRolesDialog.destroy();
|
|
2487
2550
|
this._oRolesDialog = null;
|
|
2488
2551
|
}
|