Commit b0e57139 authored by Carsten  Rose's avatar Carsten Rose
Browse files

HTML.md, PROTOCOL.md: added description for 'Typeahead'

parent 9510c9fa
......@@ -37,3 +37,31 @@ call to `api/load.php` upon change.
### id="close-button"
### id="delete-button"
### id="form-new-button"
## 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.
......@@ -207,6 +207,20 @@ The format of redirect information is outlined below
: Used to provide an URL when `"redirect"` is set to `"url"`. It
should be disregarded unless `"redirect"` is set to `"url"`.
### Typeahead dict Response
{
...
[
{
"key": "<key value>",
"value": <display value>
},
...
],
...
}
## API Endpoints
......@@ -321,6 +335,22 @@ Server Response
: The response contains a [Minimal Response].
[Redirection Response] may be included.
### Typeahead
The Client initiates Typeahead actions via a GET request. A JSON key/value dict will we be send back as response.
The Client GET request contains a 'sip' and the already typed value as 'query' paramter.
Request URL
: api/typeahead.php
Request Method
: GET
URL Parameters
: `sip`, `query`
Server Response
: The response contains at least a [Minimal Response]. In addition, a [Typeahead dict],
## Glossary
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment