DisabledActionHandler.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. 'use strict';
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  4. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  5. /*
  6. * Licensed Materials - Property of IBM
  7. * IBM Cognos Products: Dashboard
  8. * (C) Copyright IBM Corp. 2019
  9. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  10. */
  11. define(['../../../lib/@waca/baglass/js/baglass/app/plugins/Button'], function (BaseClass) {
  12. /**
  13. * Action which allows a plugin button to be seen, but is disabled
  14. */
  15. var DisabledActionHandler = function (_BaseClass) {
  16. _inherits(DisabledActionHandler, _BaseClass);
  17. function DisabledActionHandler() {
  18. _classCallCheck(this, DisabledActionHandler);
  19. return _possibleConstructorReturn(this, _BaseClass.apply(this, arguments));
  20. }
  21. DisabledActionHandler.prototype.onRender = function onRender(context) {
  22. context.target.plugin.disable();
  23. };
  24. return DisabledActionHandler;
  25. }(BaseClass);
  26. return DisabledActionHandler;
  27. });
  28. //# sourceMappingURL=DisabledActionHandler.js.map