UndoActionHandler.js 848 B

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. /*
  3. *+------------------------------------------------------------------------+
  4. *| Licensed Materials - Property of IBM
  5. *| IBM Cognos Products: Content Explorer
  6. *| (C) Copyright IBM Corp. 2015, 2017
  7. *|
  8. *| US Government Users Restricted Rights - Use, duplication or disclosure
  9. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  10. *+------------------------------------------------------------------------+
  11. */
  12. define(['../UndoRedoButton'], function (BaseClass) {
  13. var Button = BaseClass.extend({
  14. onPress: function onPress(context) {
  15. var api = context.glassContext.appController.getCurrentContentView().getDashboardApi();
  16. if (api) {
  17. api.undo();
  18. }
  19. },
  20. canEnable: function canEnable(controller) {
  21. return controller.canUndo();
  22. }
  23. });
  24. return Button;
  25. });
  26. //# sourceMappingURL=UndoActionHandler.js.map