123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- 'use strict';
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2017, 2018
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['../../lib/@waca/dashboard-common/dist/glass/controllers/BaseSlideoutActionHandler', '../nls/StringResources'], function (BaseSlideoutActionHandler, StringResources) {
- 'use strict';
- var ActionHandler = BaseSlideoutActionHandler.extend({
- getExtraCustomSpec: function getExtraCustomSpec(context) {
- var options = {
- id: 'dashboardPanel',
- reuseSlideout: true,
- width: '400px',
- position: 'left',
- resizable: {
- min: 300
- },
- pinning: {
- isPinned: true,
- 'float': false,
- display: false
- },
- content: {
- module: 'dashboard-analytics/dataSources/views/DataSourcePanel'
- },
- enableTabLooping: false
- };
- if (context && context.target && context.target.plugin) {
- var itemSpec = context.target.plugin.itemSpec;
- if (itemSpec && (itemSpec.title || itemSpec.label)) {
- options.label = itemSpec.title || itemSpec.label;
- }
- }
- return options;
- },
- onShowCallback: function onShowCallback(context, slideout) {
- ActionHandler.inherited('onShowCallback', this, arguments);
- if (slideout) {
- slideout.$el.addClass('datasetSlideout');
- }
- },
- getCoachMarkSpec: function getCoachMarkSpec(context) {
- var spec = context.target.coachMark;
- var boardView = context.glassContext.appController.getCurrentContentView();
- var isStory = boardView.getDashboardApi().getApplicationName() === 'story';
- spec.title = StringResources.get('addDataCoachMarkTitle');
- spec.contents = isStory ? StringResources.get('addDataStoryCoachMarkContents') : StringResources.get('addDataDashboardCoachMarkContents');
- return spec;
- }
- });
- return ActionHandler;
- });
- //# sourceMappingURL=SourceActionHandler.js.map
|