Classes (0) | Namespaces (0) |
Properties (0) | Static properties (0) |
Methods (0) | Static methods (3) |
Events (0) |
Properties (0) | Static properties (0) |
Methods (0) | Static methods (3) |
Events (0) |
Editor makes very few assumptions about how its form will actually be
displayed to the end user (where in the DOM, interaction etc), instead
focusing on providing form interaction controls only. To actually display
a form in the browser we need to use a display controller, and then select
which one we want to use at initialisation time using the display
option. For example a display controller could display the form in a
lightbox (as the default display controller does), it could completely
empty the document and put only the form in place, ir could work with
DataTables to use fnOpen
/ fnClose
to show the form in a "details" row
and so on.
Editor has two built-in display controllers ('lightbox' and 'envelope'),
but others can readily be created and installed for use as plug-ins. When
creating a display controller plug-in you must implement the methods
in this control. Additionally when closing the display internally you
must trigger a requestClose
event which Editor will listen
for and act upon (this allows Editor to ask the user if they are sure
they want to close the form, for example).
Hide the form (remove it form the visual display in the document)
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | dte | object | The DataTables Editor instance that has requested the action - this allows access to the Editor API if required. | ||
2 | fn | function | Optional | Callback function that is to be executed when the form has been hidden. Note that this parameter is optional. |
Initialisation method, called by Editor when itself, initialises.
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | dte | object | The DataTables Editor instance that has requested the action - this allows access to the Editor API if required. |
The object that Editor will use to run the 'open' and 'close' methods against. If static methods are used then just return the object that holds the init, open and close methods, however, this allows the display to be created with a 'new' instance of an object is the display controller calls for that.
Display the form (add it to the visual display in the document)
Name | Type | Attributes | Default | Description | |
---|---|---|---|---|---|
1 | dte | object | The DataTables Editor instance that has requested the action - this allows access to the Editor API if required. | ||
2 | append | element | The DOM node that contains the form to be displayed | ||
3 | fn | function | Optional | Callback function that is to be executed when the form has been displayed. Note that this parameter is optional. |