DrillDownAction.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. * DrillDownAction - implements drill down in cognos viewer
  14. */
  15. function DrillDownAction()
  16. {
  17. this.m_sAction = "DrillDown";
  18. //TODO make it so that we can use m_sAction instead of a separate parameter
  19. this.m_drillOption = "drillDown";
  20. }
  21. DrillDownAction.prototype = new DrillUpDownAction();
  22. DrillDownAction.prototype.getUndoHint = function()
  23. {
  24. return RV_RES.RV_DRILL_DOWN;
  25. };
  26. DrillDownAction.prototype.getHoverClassName = function() { return "dl"; };
  27. DrillDownAction.prototype.updateMenu = function(jsonSpec)
  28. {
  29. jsonSpec.visible = this.ifContainsInteractiveDataContainer();
  30. if (! jsonSpec.visible)
  31. {
  32. return jsonSpec;
  33. }
  34. this.updateDrillabilityFromSelections();
  35. if (!this.canDrillDown()) {
  36. jsonSpec.disabled = true;
  37. } else {
  38. jsonSpec.disabled = false;
  39. DrillContextMenuHelper.updateDrillMenuItems(jsonSpec, this.m_oCV, this.m_sAction);
  40. }
  41. return jsonSpec;
  42. };