12345678910111213141516171819202122232425262728293031323334353637383940 |
- 'use strict';
- /*
- *+------------------------------------------------------------------------+
- *| Licensed Materials - Property of IBM
- *| IBM Cognos Products: Content Explorer
- *| (C) Copyright IBM Corp. 2015, 2017
- *|
- *| US Government Users Restricted Rights - Use, duplication or disclosure
- *| restricted by GSA ADP Schedule Contract with IBM Corp.
- *+------------------------------------------------------------------------+
- */
- define(['jquery', 'bi/admin/common/ui/GeminiToggleMenuBar', 'bi/commons/utils/Utils'], function ($, GeminiToggleMenuBar, Utils) {
- var ToggleMenuBar = null;
- /**
- * Represents a drop down menu that can be added to an app bar
- */
- ToggleMenuBar = GeminiToggleMenuBar.extend({
- events: {
- 'clicktap .dropdown-toggle': '_handleClick',
- 'clicktap .dropdown-menuitem': '_handleClick',
- 'keydown': '_handleKeyboard'
- },
- render: function render() {
- ToggleMenuBar.inherited('render', this, arguments);
- if (this.icon) {
- if (this.iconRightAlign) {
- this.$toggle.append(this.$iconImage);
- }
- if (this.bSVG) {
- Utils.setIcon(this.$iconImage, this.icon);
- }
- }
- }
- });
- return ToggleMenuBar;
- });
|