GitHub user mike-jumper opened a pull request: https://github.com/apache/guacamole-client/pull/302
GUACAMOLE-470: Provide predefined values for "color-scheme" parameter. This change defines option semantics for `TEXT` fields using the [`<datalist>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist), leveraging this to provide the same predefined option values for the `color-scheme` parameter which were removed via #289 and #296. Browsers vary in how exactly the field is rendered, but generally provide a text field with autocomplete and a drop-down menu of choices: ![color-scheme-field-en](https://user-images.githubusercontent.com/4632905/41323162-b713cf7e-6e61-11e8-9620-86448cd56352.png) ![color-scheme-field-zh](https://user-images.githubusercontent.com/4632905/41323213-0558bf50-6e62-11e8-80e7-c781fd49a83b.png) As not all browsers fully support `<datalist>` (with Safari lacking support entirely), this change also adds https://github.com/mfranzke/datalist-polyfill as a dependency, which is the polyfill recommended by the MDN documentation for `<datalist>`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/mike-jumper/guacamole-client restore-color-scheme Alternatively you can review and apply these changes as the patch at: https://github.com/apache/guacamole-client/pull/302.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #302 ---- commit a8bb6fe96640ee7c06d02112cd48aea9e5b7c5e2 Author: Michael Jumper <mjumper@...> Date: 2018-06-12T19:09:40Z GUACAMOLE-470: Make getFieldOption() available to all field types. commit 426a7919b3a3b4db94354da455354f48ce69f4e8 Author: Michael Jumper <mjumper@...> Date: 2018-06-12T19:37:07Z GUACAMOLE-470: Allow TEXT fields to be associated with predefined sets of known-good values. commit 3ae152fa35b07800ca5edbe42d14e869298fc252 Author: Michael Jumper <mjumper@...> Date: 2018-06-12T20:06:01Z GUACAMOLE-470: Add polyfill for <datalist> element (not supported by Safari). commit 74230f005f2193e9e2fc2c93a52faa5c0e2ae870 Author: Michael Jumper <mjumper@...> Date: 2018-06-12T18:52:41Z GUACAMOLE-470: Define "color-scheme" parameter as TEXT field with some pre-defined options. commit 2bc71866a8e56e2a4926ce433efb54abe7283be3 Author: Michael Jumper <mjumper@...> Date: 2018-06-12T20:35:35Z GUACAMOLE-470: Restore ENUM "color-scheme" parameter for SSH and Telnet. This reverts commit 4e610f2d1bda0ef073b8b9190fa2135d427f30cb. commit 73c3107e915fdeff5c406200639bb9ebb1378ff0 Author: Michael Jumper <mjumper@...> Date: 2018-06-12T20:49:18Z GUACAMOLE-470: Restore translations for "color-scheme" enum values. This reverts commit 06f98afcf5446c7d83cef0aaca109b57c523f960. commit e5a8442a2ac14590d342d528079d7e159c9d19ee Author: Michael Jumper <mjumper@...> Date: 2018-06-12T23:29:55Z GUACAMOLE-470: Use NPM webjar for datalist-polyfill, as Webjars' "bowergithub" version is broken (missing version number in path causes sanity checks in WebjarsServlet to refuse to serve the file). ---- ---