diff --git a/doc/HTML.md b/doc/HTML.md index d7d3266f03759c60187b40e35e44d6675f1b4863..2fd09e25523f921b14765800f42a4def042834dc 100644 --- a/doc/HTML.md +++ b/doc/HTML.md @@ -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. + diff --git a/doc/PROTOCOL.md b/doc/PROTOCOL.md index 2cd25c77d334e05dec0b645e1df1e19d39830cd2..2f788733ae86197a660ada4c5a6df95946958096 100644 --- a/doc/PROTOCOL.md +++ b/doc/PROTOCOL.md @@ -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