Undo for Component Users

Documentation for a historical release of Infusion: 1.3
Please view the Infusion Documentation site for the latest documentation.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Undo for Component Users

Options

The undo decorator can be customized by providing options in the componentDecorators object:

Name

Description

Values

Default

Name

Description

Values

Default

selectors

Javascript object containing selectors for various fragments of the Undo decorator

The object can contain any subset of the following keys:
  undoContainer
  undoControl
  redoContainer
  redoControl
Any values not provided will revert to the default.

selectors: { undoContainer: ".flc-undo-undoContainer", undoControl: ".flc-undo-undoControl", redoContainer: ".flc-undo-redoContainer", redoControl: ".flc-undo-redoControl" }

renderer

a function that renders the markup for the undo controls

 

function defaultRenderer(that, targetContainer) { var markup = "<span class='flc-undo'>" + "<span class='flc-undo-undoContainer'>[<a href='#' class='flc-undo-undoControl'>undo</a>]</span>" + "<span class='flc-undo-redoContainer'>[<a href='#' class='flc-undo-redoControl'>redo</a>]</span>" + "</span>"; var markupNode = $(markup); targetContainer.append(markupNode); return markupNode; }

Dependencies

The Undo dependencies can be met by including the minified InfusionAll.js file in the header of the HTML file:

<script type="text/javascript" src="InfusionAll.js"></script>

Alternatively, the individual file requirements (in addition to those of the component) are:

<... other dependencies ...> <script type="text/javascript" src="components/undo/js/Undo.js"></script>