%META:TOPICPARENT{name="OATDOCIndex"}%
---+ quickedit.js
Provides edit-in-place functionality.
%TOC%
---++ Functions
---+++ OAT.QuickEdit.assign(element, type, [options])
Marks element as QuickEdit, i.e., when user clicks it, it
transforms into input. type specifies input type:
* QuickEdit.STRING => input
* QuickEdit.SELECT => select.
If QuickEdit.SELECT type is chosen, values are specified as
an array in options.
---++ Constants
---+++ OAT.QuickEdit.STRING
string value
---+++ OAT.QuickEdit.SELECT
predefined values from the select element
---++ Example
var text = OAT.Dom.create("span");
text.innerHTML = "hello";
OAT.QuickEdit.assign(text, OAT.QuickEdit.SELECT, ["hello","hi","goodbye"]);
CategoryDocumentation CategoryOAT CategoryOpenSource