EditAnnotationAction.js 899 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. * EditAnnotationAction - implements editing an existing annotation in cognos viewer
  14. */
  15. function EditAnnotationAction() {}
  16. EditAnnotationAction.prototype = new AnnotationAction();
  17. EditAnnotationAction.prototype.executeAction = function(viewer, widget, selection)
  18. {
  19. if (viewer && widget && selection) {
  20. var cellRef = selection.getCellRef();
  21. var ctxId = viewer.findCtx(cellRef);
  22. window.setTimeout(function () { widget.getAnnotationHelper().editComment(ctxId); },0);
  23. }
  24. };