'use strict'; /* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| IBM Cognos Products: Content Explorer *| (C) Copyright IBM Corp. 2016, 2017 *| *| US Government Users Restricted Rights - Use, duplication or disclosure *| restricted by GSA ADP Schedule Contract with IBM Corp. *+------------------------------------------------------------------------+ */ define(['../../lib/@waca/baglass/js/baglass/app/plugins/Button'], function (BaseClass) { var UndoRedoButton = BaseClass.extend({ /** * Method to determine whether the button can be enabled or not */ canEnable: function canEnable() /*controller*/{ return true; }, onRender: function onRender(context) { this._toggleState(context.target.plugin); }, onStateChange: function onStateChange(controller) { this._toggleState(this, controller); }, _toggleState: function _toggleState(plugin, controller) { if (plugin) { if (controller && this.canEnable(controller)) { plugin.enable(); } else { plugin.disable(); } } } }); return UndoRedoButton; }); //# sourceMappingURL=UndoRedoButton.js.map