SourceMemberPropertiesAction.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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', '../../DynamicFileLoader'], function (Class, DynamicFileLoader) {
  12. 'use strict';
  13. var SourceMemberPropertiesAction = Class.extend({
  14. /**
  15. * Determine when we show/hide the menu item
  16. */
  17. isItemVisible: function isItemVisible(options) {
  18. return options.target.activeObject.viewId !== 'modelGridGlobal';
  19. },
  20. /**
  21. * Default action handler
  22. */
  23. onSelectItem: function onSelectItem(options) {
  24. var activeObj = options.target.activeObject;
  25. var context = activeObj.context;
  26. var selection = activeObj.data.selection;
  27. if (context && selection) {
  28. return DynamicFileLoader.load(['dashboard-analytics/dataSources/dialogs/SourceMemberPropertiesDialog']).then(function (modules) {
  29. // TEMP HACK : Change dashboard-common dialog blocker z-index for now. Look at the defect for details
  30. // https://bajazz05.canlab.ibm.com:9750/ccm/web/projects/Business%20Intelligence#action=com.ibm.team.workitem.viewWorkItem&id=231964
  31. var propertiesDialog = new modules[0]({
  32. 'context': context,
  33. 'selection': selection,
  34. 'zindex': 9999
  35. });
  36. propertiesDialog.open();
  37. return propertiesDialog;
  38. });
  39. }
  40. }
  41. });
  42. return SourceMemberPropertiesAction;
  43. });
  44. //# sourceMappingURL=SourceMemberPropertiesAction.js.map