1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 'use strict';
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /*
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: Storytelling
- * (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(['gemini/app/util/ErrorUtils'], function (ErrorUtils) {
- var ActionHandler = function () {
- function ActionHandler() {
- _classCallCheck(this, ActionHandler);
- }
- ActionHandler.prototype.onSelectItem = function onSelectItem(context) {
- var glassContext = context.glassContext;
- var instrumentationSvc = glassContext.getCoreSvc('.Instrumentation');
- if (instrumentationSvc.enabled) {
- instrumentationSvc.track({
- type: 'Created Object',
- objectType: 'Story',
- action: 'created',
- milestoneName: 'created_Story' //action_objectType
- });
- }
- glassContext.appController.openAppView('createStory');
- };
- /**
- * Determine whether to show the menu item
- */
- ActionHandler.prototype.isItemVisible = function isItemVisible(context) {
- return ErrorUtils.hasCapability(context.glassContext, 'canAuthorDashboard');
- };
- return ActionHandler;
- }();
- return ActionHandler;
- });
- //# sourceMappingURL=NewStoryActionHandler.js.map
|