NewWidgetAnnotationAction.js 829 B

1234567891011121314151617181920212223242526
  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. * NewWidgetAnnotationAction - implements adding new annotations to the cognos viewer widget
  14. */
  15. function NewWidgetAnnotationAction() {}
  16. NewWidgetAnnotationAction.prototype = new AnnotationAction();
  17. NewWidgetAnnotationAction.prototype.execute = function()
  18. {
  19. var viewer = this.getCognosViewer();
  20. var widget = viewer.getViewerWidget();
  21. if (widget) {
  22. widget.getAnnotationHelper().addWidgetComment();
  23. }
  24. };