Class: client

ort.client(obj)

new client(obj)

Accepts ort.clientData for writing into a DOM tree.
Parameters:
Name Type Description
obj ort.clientData | Array.<ort.clientData> The object(s) to write.
Source:

Methods

fill(e, custom)

Write the ort.clientData into the given HTMLElement in the DOM tree. If constructed with an array, the first element is used. Elements within (and including) "e" having the following classes are manipulated as follows:
  • client-name-enum-select: sets the select attribute for <option> values matching name under the element
  • client-name-value-checked: sets the checked attribute under the element matching the input
  • client-name-text: replace contents with name data
  • client-name-value: replace value attribute with name data
  • client-dob-enum-select: sets the select attribute for <option> values matching dob under the element
  • client-dob-value-checked: sets the checked attribute under the element matching the input
  • client-dob-text: replace contents with dob data
  • client-dob-value: replace value attribute with dob data
  • client-dob-date-value: set the element's value to the ISO-8601 date format of the data
  • client-id-enum-select: sets the select attribute for <option> values matching id under the element
  • client-id-value-checked: sets the checked attribute under the element matching the input
  • client-id-text: replace contents with id data
  • client-id-value: replace value attribute with id data
Parameters:
Name Type Description
e HTMLElement The DOM element.
custom ort.DataCallbacks The optional dictionary of functions keyed by structure and field name (e.g., foo structure, bar field would be foo-bar). The value is a function for custom handling that accepts the "e" value, the name of the structure-field, and the value of the structure and field. You may also specify an array of functions instead of a singleton. These callbacks are invoked after the generic classes are filled.
Source:

fillArray(e, custom)

Like ort.client#fill but for an array of ort.clientData. If the data is not an array, it is remapped as an array of one. This will save the first element within "e", remove all children of "e", then repeatedly clone the saved element and re-append it, filling in the cloned subtree with the array (inclusive of the subtree root). If the input array is empty or null, "e" is hidden by using the hide class. Otherwise, the hide class is removed.
Parameters:
Name Type Description
e HTMLElement The DOM element.
custom ort.DataCallbacks The optional custom handler dictionary (see ort.client#fill).
Source:

fillArrayByClass(e, name, custom)

Like ort.client#fillArray but instead of accepting a single element to fill, filling all elements by class name beneath the given root (non-inclusive).
Parameters:
Name Type Description
e HTMLElement The DOM element.
name String The name of the class into which to fill.
custom ort.DataCallbacks The optional custom handler dictionary (see ort.client#fill for details).
Source:

fillArrayOrHide(e, tohide, o, custom)

Like ort.client#fillArray, but hiding an element if the array is empty or null.
Parameters:
Name Type Description
e HTMLElement | null The DOM element.
tohide HTMLElement | null The DOM element to hide.
o ort.clientData | Array.<ort.clientData> | null The array (or object) to fill.
custom ort.DataCallbacks The optional custom handler dictionary (see ort.client#fill).
Source:

fillArrayOrShow(e, toshow, o, custom)

Like ort.client#fillArray, but showing an element if the array is empty or null.
Parameters:
Name Type Description
e HTMLElement | null The DOM element.
toshow HTMLElement | null The DOM element to show.
o ort.clientData | Array.<ort.clientData> | null The array (or object) to fill.
custom ort.DataCallbacks The optional custom handler dictionary (see ort.client#fill).
Source:

fillByClass(e, name, custom)

Like ort.client#fill but instead of accepting a single element to fill, filling into all elements (non-inclusive) matching the given class name beneath (non-inclusive) the given root.
Parameters:
Name Type Description
e HTMLElement The DOM element.
name String The name of the class into which to fill.
custom ort.DataCallbacks The optional custom handler dictionary (see ort.client#fill for details).
Source:

fillInner(e, custom)

Like ort.client#fill but not including the root element "e".
Parameters:
Name Type Description
e HTMLElement The DOM element.
custom ort.DataCallbacks The optional custom handler dictionary (see ort.client#fill for details).
Source:

fillInnerByClass(e, name, custom)

Like ort.client#fillByClass but inclusive the root and targets by class.
Parameters:
Name Type Description
e HTMLElement The DOM element.
name String The name of the class into which to fill.
custom ort.DataCallbacks The optional custom handler dictionary (see ort.client#fill for details).
Source: