discourse/discourse — pull request #2405 by ligthyear (2014-06-01 14:59:59+00:00)
Title: AdminUI: Use Select2.js for SiteSetting Lists – adds Autocomplete and DnD-Sorting

This PR rebases the list-sitesetting component on top of Select2.js for better autocompletion and sorting support. For the later it uses the already included html5sorting library. Additionally sitesettings can now also contain a choices-list that is shown as autocomplete (preventing typos) and are automatically merged if extended by plugins. This has been added for post_menu, top_menu and share_links.

To extend this, a plugin just provides a site_settings.yml file with the following:

```yaml
basic:
post_menu:
choices:
- sharedEdit
```

Some screenshots:

Autocomplete:
![screen shot 2014-06-01 at 16 47 50](https://cloud.githubusercontent.com/assets/40496/3141879/4b7660c6-e99d-11e3-8ef6-2f9773dbc2d6.png)

Drag and Drop with placeholder element for positioning:

![screen shot 2014-06-01 at 16 48 06](https://cloud.githubusercontent.com/assets/40496/3141882/5d909ff6-e99d-11e3-8b58-9288090de443.png)