Section | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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 |
---|
...
|
...
|
...
Default
...
selectors
...
Supported Events
The Inline Edit component
...
The object can contain any subset of the following keys:
text
editContainer
edit
Any values not provided will revert to the default.
...
selectors: {
text: ".text",
editContainer: ".editContainer",
edit: ".edit"
}
...
styles
...
Javascript object containing CSS style names that will be applied to the Inline Edit component.
...
The object can contain any subset of the following keys:
invitation
focus
Any values not provided will revert to the default.
...
styles: {
invitation: "invitation",
focus: "focus"
}
...
paddings
...
Javascript object containing pixed values that will configure the size of the edit field.
...
The object can contain any subset of the following keys:
add
minimum
Any values not provided will revert to the default.
...
paddings: {
add: 10,
minimum: 80
}
...
finishedEditing
...
A function that will be called each time the Inline Edit component leaves edit mode. This function can be used to communicate changes in the field to the server, or to take any other action desired by the implementor.
...
a function
...
finishedEditing: function () {
}
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.fires the following events (for more information about events in the Fluid Framework, see Events for Component Users):
Include Page | ||||
---|---|---|---|---|
|
Include Page | ||||
---|---|---|---|---|
|
Include Page | ||||||
---|---|---|---|---|---|---|
|
...
Skinning
This component can be skinned "out of the box" when you include the component's CSS files. Just be sure to put the following in your document:
Code Block | ||||
---|---|---|---|---|
| ||||
<link rel="stylesheet" type="text/css" href="components/inlineEdit/css/InlineEdit.css" />
|
...
Dependencies
The Inline Edit dependencies can be met by including the minified InfusionAll.js
file in the header of the HTML file:
Code Block | ||||
---|---|---|---|---|
| ||||
<script type="text/javascript" src="InfusionAll.js"></script>
|
Alternatively, the individual file requirements are:
Include Page | ||||||
---|---|---|---|---|---|---|
|