12345678910111213141516171819202122232425262728293031323334353637 |
- /*
- * Licensed Materials - Property of IBM
- *
- * IBM Cognos Products: SHARE
- *
- * (C) Copyright IBM Corp. 2015
- *
- * US Government Users Restricted Rights - Use, duplication or disclosure
- * restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['bi/glass/app/plugins/MenuActionInterface', 'bi/sharecommon/utils/translator',
- 'bi/schedule/app/appControler'], function(view, t, controler) {
- 'use strict';
- var SubscriptionButtonView = view.extend({
- onSelectItem: function(context) {
- var id = context.target.itemId;
- var idTokens = id.split('.');
- var key = idTokens[idTokens.length-1];
- if (key === "subscribe_mgmt") {
- controler.showSubscriptionManagementPane(context.glassContext);
-
- }
- },
- isItemVisible: function(context) {
- var id = context.target.itemId;
- var idTokens = id.split('.');
- var key = idTokens[idTokens.length-1];
- if (key === "subscribe_mgmt") {
- return true;
- }
- else {
- return false;
- }
- }
- });
- return SubscriptionButtonView;
- });
|