DrillUpAction.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Viewer
  5. *| (C) Copyright IBM Corp. 2001, 2011
  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. * DrillUpAction - implements drill up in cognos viewer
  14. */
  15. function DrillUpAction()
  16. {
  17. this.m_sAction = "DrillUp";
  18. this.m_drillOption = "drillUp";
  19. }
  20. DrillUpAction.prototype = new DrillUpDownAction();
  21. DrillUpAction.prototype.getHoverClassName = function() { return "dl"; };
  22. DrillUpAction.prototype.getUndoHint = function()
  23. {
  24. return RV_RES.RV_DRILL_UP;
  25. };
  26. DrillUpAction.prototype.updateMenu = function(jsonSpec)
  27. {
  28. jsonSpec.visible = this.ifContainsInteractiveDataContainer();
  29. if (! jsonSpec.visible)
  30. {
  31. return jsonSpec;
  32. }
  33. this.updateDrillabilityFromSelections();
  34. if (!this.canDrillUp()) {
  35. jsonSpec.disabled = true;
  36. } else {
  37. jsonSpec.disabled = false;
  38. DrillContextMenuHelper.updateDrillMenuItems(jsonSpec, this.m_oCV, this.m_sAction);
  39. }
  40. return jsonSpec;
  41. };