// Licensed Materials - Property of IBM // IBM Cognos Products: rs // (C) Copyright IBM Corp. 2015, 2020 // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. define(['bi/glass/app/plugins/MenuActionInterface'], function(MenuActionInterface) { var CreateReportMenu = MenuActionInterface.extend({ onSelectItem: function(context) { var v_sMenuItem = context.target.itemId; console.log("CreateReportMenu, " + v_sMenuItem + ", selected"); console.log("CREATE TEMPLATE SELECTED."); context.glassContext.openAppView( 'authoring', { content: { // TODO // provide and id for glass to cache // HACK until we get we work out the proper id id: Date.now().toString(), } }); }, isItemVisible: function(context){ console.log("rsAppRunMenu.isItemVisible"); if (!context.glassContext.hasCapability('canUseReportStudio')) { return false; } return true; } }); return CreateReportMenu; });