| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- /**
- * DevExtreme (ui/toolbar/ui.toolbar.strategy.action_sheet.js)
- * Version: 19.1.16
- * Build date: Tue Oct 18 2022
- *
- * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
- * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
- */
- "use strict";
- var ToolbarStrategy = require("./ui.toolbar.strategy");
- var extend = require("../../core/utils/extend").extend;
- var ActionSheet = require("../action_sheet");
- var ActionSheetStrategy = ToolbarStrategy.inherit({
- NAME: "actionSheet",
- _getMenuItemTemplate: function() {
- return this._toolbar._getTemplate("actionSheetItem")
- },
- render: function() {
- if (!this._hasVisibleMenuItems()) {
- return
- }
- this.callBase()
- },
- _menuWidgetClass: function() {
- return ActionSheet
- },
- _menuContainer: function() {
- return this._toolbar.$element()
- },
- _widgetOptions: function() {
- return extend({}, this.callBase(), {
- target: this._$button,
- showTitle: false
- })
- },
- _menuButtonOptions: function() {
- return extend({}, this.callBase(), {
- icon: "overflow"
- })
- },
- _toggleMenu: function() {
- this.callBase.apply(this, arguments);
- this._menu.toggle(this._menuShown);
- this._menuShown = false
- }
- });
- module.exports = ActionSheetStrategy;
|