DrillUpAction.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. * DrillUpAction - implements drill up in cognos viewer
  14. */
  15. function DrillUpAction()
  16. {
  17. this.m_sAction = "DrillUp";
  18. }
  19. DrillUpAction.prototype = new DrillAction();
  20. DrillUpAction.prototype.updateMenu = function(jsonSpec) {
  21. return jsonSpec;
  22. };
  23. DrillUpAction.prototype.execute = function() {
  24. var oCV = this.getCognosViewer();
  25. var drillMgr = oCV.getDrillMgr();
  26. if(drillMgr.canDrillUp() == false) {
  27. // add error handling
  28. return;
  29. }
  30. var drillParams = drillMgr.rvBuildXMLDrillParameters("drillUp", this.m_userSelectedDrillItem);
  31. var refQuery = drillMgr.getRefQuery();
  32. if (oCV.envParams["cv.containerApp"] == "AA")
  33. {
  34. oCV.m_viewerFragment.raiseAADrillUpEvent();
  35. }
  36. this.submitDrillRequest(drillParams, "up", refQuery);
  37. };