123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- function UndoableClientActionBase() {}
- UndoableClientActionBase.prototype = new CognosViewerAction();
- UndoableClientActionBase.prototype.setContainerId = function(containerId)
- {
- this.m_sContainerId = containerId;
- };
- UndoableClientActionBase.prototype.doRedo = function(containerId)
- {
- this.setContainerId(containerId)
- this.execute();
- };
- UndoableClientActionBase.prototype.doUndo = function(containerId)
- {
- factory = this.getCognosViewer().getActionFactory();
- var unfreezeAction = factory.load(this.getUndoClass());
- unfreezeAction.setContainerId(containerId);
- unfreezeAction.execute();
- };
- UndoableClientActionBase.prototype.getSelectedContainerId = function()
- {
- var selectedObjects = this.m_oCV.getSelectionController().getAllSelectedObjects();
- if (selectedObjects && selectedObjects.length) {
- var lid=selectedObjects[0].getLayoutElementId();
- if (lid) {
- return this.removeNamespace(lid);
- }
- }
- return null;
- };
|