DrillDownAction_override.js 913 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Viewer
  5. *| (C) Copyright IBM Corp. 2001, 2012
  6. *|
  7. *| US Government Users Restricted Rights - Use, duplication or
  8. *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9. *|
  10. *+------------------------------------------------------------------------+
  11. */
  12. /**
  13. * Override the updateMenu method since Mobile wants to hide the drill down
  14. * menu item when the current selection doesn't support drill down
  15. */
  16. DrillDownAction.prototype.updateMenu = function(jsonSpec) {
  17. var drillMgr = this.getCognosViewer().getDrillMgr();
  18. if(drillMgr && drillMgr.canDrillDown() == false) {
  19. jsonSpec.visible = false;
  20. }
  21. else {
  22. jsonSpec.visible = true;
  23. DrillContextMenuHelper.updateDrillMenuItems(jsonSpec, this.m_oCV, this.m_sAction);
  24. }
  25. return jsonSpec;
  26. };