HTML.md 1.61 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# HTML

This document explains the HTML markup used by QFQ.

## Hooks

Hooks are used on by the Client to gather information required for
asynchronous requests and to add predefined event handlers to HTML Elements.


### form.data-toggle="validator"

Adding the attribute `data-toggle="validator"` to a `<form>` element,
enables the Bootstrap Validator on that HTML Form.


### .data-sip

Asynchronous requests require to pass a SID to the Server. Elements
triggering an asynchronous request, may gather the SIP from the
`data-sip` attribute assigned to the HTML Form Element.


### .class="record-delete"

HTML Form Buttons having the class `record-delete` set, will get an
`onclick` handler attached by `QfqNS.QfqRecordList`. Each `<button>`
also requires an `data-sip` attribute.


### .data-load=""

HTML Form Elements having the attribute `data-load`, will trigger a
call to `api/load.php` upon change.

### id="save-button"
### id="close-button"
### id="delete-button"
### id="form-new-button"
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

## Typeahead

Typeahead capable text input elements will be defined by the following attributes:
 
### .class='qfq-typeahead'

### .data-typeahead-sip

The SIP will store: 

Use with SQL: `typeAheadSql`

Use with LDAP:
* `typeAheadLdapServer`
* `typeAheadLdapBaseDn`
* `typeAheadLdapSearch`
* `typeAheadLdapValuePrintf`
* `typeAheadLdapKeyPrintf`
 
### .data-typeahead-limit

* Defines the limit of entries shown on the client. Default on client is 5. The server will always send a value. The server default is 20.

### .data-typeahead-minlength

* Defines the string minlegth, typed by the user, before the first lookup is started. Default is 2.