123456789101112131415161718192021222324252627282930313233343536373839 |
- 'use strict';
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2018, 2020
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['../../../../lib/@waca/core-client/js/core-client/ui/core/Class', 'jquery', 'doT', 'text!./ExpandEdges.html', '../../../../app/nls/StringResources'], function (Class, $, dot, Template, stringResources) {
- var ExpandAction = Class.extend({
- init: function init(controller) {
- this.controller = controller;
- },
- newSelection: function newSelection(nodes) {
- var iconsFeature = this.controller.dashboardApi.getFeature('Icons');
- var expandIcon = iconsFeature.getIcon('maximize');
- var html = dot.template(Template)({
- expandIcon: expandIcon.id
- });
- // Only show the expand action for widgets that are maximizable.
- $(nodes).filter('.maximizable').append(html).find('.expandHandle').attr('title', stringResources.get('expandHandle')).on('primaryaction', this.onExpand.bind(this));
- },
- onExpand: function onExpand(event) {
- var node = $(event.target).closest('.maximizable');
- if (node.length) {
- var n = node[0];
- if (n._layout) {
- n._layout.onMaximize();
- }
- }
- }
- });
- return ExpandAction;
- });
- //# sourceMappingURL=ExpandAction.js.map
|