GlobalCalculationActionHandler.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. 'use strict';
  2. /*
  3. *+------------------------------------------------------------------------+
  4. *| Licensed Materials - Property of IBM
  5. *| IBM Cognos Products: CA
  6. *| (C) Copyright IBM Corp. 2017
  7. *| US Government Users Restricted Rights - Use, duplication or disclosure
  8. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  9. *+------------------------------------------------------------------------+
  10. */
  11. define(['../../lib/@waca/core-client/js/core-client/ui/core/Class', '../utils/ShapingUIUtils'], function (Class, ShapingUIUtils) {
  12. 'use strict';
  13. var GlobalCalculationAction = Class.extend({
  14. /**
  15. * Determine when we show/hide the menu item
  16. */
  17. isItemVisible: function isItemVisible() {
  18. return true;
  19. },
  20. /**
  21. * Default action handler
  22. */
  23. onSelectItem: function onSelectItem(options) {
  24. options.target.activeObject.dataSource.getModule().then(function (module) {
  25. ShapingUIUtils.renderCalculationDialog(module);
  26. });
  27. }
  28. });
  29. return GlobalCalculationAction;
  30. });
  31. //# sourceMappingURL=GlobalCalculationActionHandler.js.map