• Topic
  • Discussion
  • OATWikiWeb.OATDOCquickedit(Last) -- Owiki? , 2016-08-19 14:58:52 Edit owiki 2016-08-19 14:58:52

    quickedit.js

    Provides edit-in-place functionality.

    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"]);
    

    Referenced by...