Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Creating Multiple Inline Edits
...
fluid.inlineEdits(componentContainer, options);
...
|
Parameters
componentContainer
The componentContainer
parameter is a selector, a single-element jQuery, or a DOM element specifying the root DOM node of the Inline Edit markup.
Anchor | ||||
---|---|---|---|---|
|
options
The options
parameter is an optional collection of name-value pairs that configure data structure that configures the Inline Edit component(s), as described below in the fluid:Options section.
...
Anchor | ||||
---|---|---|---|---|
|
Supported Events
The Inline Edit component fires the following events :
Event | Type | Description | Parameters | Default Listener |
---|---|---|---|---|
| default |
| | none |
| "preventable" |
| none | none |
| default |
| none | none |
| "preventable" |
| | none |
| default |
| | none |
Functions
...
fluid.inlineEdit.edit();
Switches the component into edit mode.
...
fluid.inlineEdit.finish();
Switches the component out of edit mode into display mode, updating the displayed text with the current content of the edit field. Calls the finishedEditing
function provided in the options
, if it exists.
...
fluid.inlineEdit.render(source);
Prompts the component to render itself.
...
fluid.inlineEdit.tooltipEnabled();
Returns a boolean indicating whether or not the tooltip is enabled.
...
fluid.inlineEdit.updateModel(newValue, source);
Updates the component's internal representation of the text to a new value. The component will be re-rendered.
...
Options
The following options to the creator functions can be used to customize the behaviour of the Inline Edit component:
...
(for more information about events in the Fluid Framework, see Events for Component Users):
Include Page | ||||
---|---|---|---|---|
|
Include Page | ||||
---|---|---|---|---|
|
Include Page | ||||||
---|---|---|---|---|---|---|
|
The options for the creation of multiple Inline Edits are the same as those for the creation of a single Inline Edit, with the addition of a selector for identifying the editable elements. The default selector is defined as follows:
...
...
Skinning
This component can be skinned "out of the box" when you include our the component's CSS skin files. Just be sure to put the following in you your document:
Code Block | ||||
---|---|---|---|---|
| ||||
<link rel="stylesheet" type="text/css" href="css/fluid.layout.css" /> <link rel="stylesheet" type="text/css" href="css/fluid.states.css" /> <link rel="stylesheet" type="text/css" href="css/fluid.theme.mistcomponents/inlineEdit/css/InlineEdit.css" /> <link rel="stylesheet" type="text/css" href="css/fluid.theme.hc.css" /> |
and to attatch a class attribute that represents the skin you want to the components container, such as:
...
<div id="inlineEditContainer" class="fl-theme-mist">
...
</div>
...
...
Dependencies
The Inline Edit dependencies can be met by including the minified Fluid-allInfusionAll.js
file in the header of the HTML file:
Code Block | ||||
---|---|---|---|---|
| ||||
<script type="text/javascript" src="Fluid-allInfusionAll.js"></script> |
Alternatively, the individual file requirements are:
Include Page |
---|
...
|