Inline Edits With PHP/AJAX: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
(Created page with "== Markup == === Editable container === * Give the container a class to be used as a selector for the inline edits. Something like `status-cell`, `in-stock-cell`, `access-ce...")
 
No edit summary
Line 3: Line 3:
=== Editable container ===
=== Editable container ===


* Give the container a class to be used as a selector for the inline edits. Something like `status-cell`, `in-stock-cell`, `access-cell`, etc.
* Add a `<nowiki><td></nowiki>` or `<nowiki><div></nowiki>` container as a container for the inline edits.
** The container's content is changed to accommodate the edits, but not the container itself.
** Assign the container a class that will serve as a selector for inline edits. Something like `status-cell`, `in-stock-cell`, `access-cell`, etc.
** The container has a `data-id` attribute with the parent record's id as its value.

Revision as of 12:38, 6 September 2014

Markup

Editable container

  • Add a `<td> or <div> container as a container for the inline edits.
    • The container's content is changed to accommodate the edits, but not the container itself.
    • Assign the container a class that will serve as a selector for inline edits. Something like status-cell, in-stock-cell, access-cell, etc.
    • The container has a data-id` attribute with the parent record's id as its value.