ScheduleManagementButtonView.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. "use strict";
  2. /*
  3. * Licensed Materials - Property of IBM
  4. *
  5. * IBM Cognos Products: ADMIN
  6. *
  7. * (C) Copyright IBM Corp. 2017
  8. *
  9. * US Government Users Restricted Rights - Use, duplication or disclosure
  10. * restricted by GSA ADP Schedule Contract with IBM Corp.
  11. */
  12. define(['bi/glass/app/plugins/MenuActionInterface'], function (view) {
  13. 'use strict';
  14. var SchedueButtonView = view.extend({
  15. SUBSCRIPTION_SLIDEOUT_PANE_WIDTH: '400px',
  16. onSelectItem: function onSelectItem(context) {
  17. var id = context.target.itemId;
  18. var idTokens = id.split('.');
  19. var key = idTokens[idTokens.length - 1];
  20. if (key === "schedule_mgmt") {
  21. this._showScheduleManagementPane(context.glassContext);
  22. }
  23. },
  24. _showScheduleManagementPane: function _showScheduleManagementPane(glassContext) {
  25. var context = {
  26. id: "subscribe_mgmt",
  27. content: {}
  28. };
  29. glassContext.appController.openAppView('schedule_mgmt', context);
  30. },
  31. isItemVisible: function isItemVisible(context) {
  32. var id = context.target.itemId;
  33. var idTokens = id.split('.');
  34. var key = idTokens[idTokens.length - 1];
  35. if (key === "schedule_mgmt") {
  36. return true;
  37. } else {
  38. return false;
  39. }
  40. }
  41. });
  42. return SchedueButtonView;
  43. });