Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add select2 library (v4.0.12) to better handle options in warn and xfd
chosen (https://harvesthq.github.io/chosen/, https://github.com/harvesthq/chosen), which has been in use since wikimedia-gadgets#580 (xfd) and wikimedia-gadgets#641 (warn), has been causing some consistent CSS issues in the warn modules (wikimedia-gadgets#665), and has recently been deprecated: harvesthq/chosen@91041bc. select2 (https://select2.org/, https://github.com/select2/select2) is an alternative to chosen that resolves those issues and is better maintained, albeit larger even without using the full version. select2, however, is not part of MediaWiki's core ResourceLoader modules (T53443), so have to upload it ourselves as a gadget, as we once did for moment (67e24a5). We could technically use the [Toolserver CDN](https://tools.wmflabs.org/cdnjs/) but that is potentially prone to occasional unreliability and is not whitelisted by the CSP (https://phabricator.wikimedia.org/T223840); that's still in 'report only' mode but users will have to opt-themselves out so it's not long-term reliable (https://phabricator.wikimedia.org/T208188). Uploading it as a gadget avoids all that and makes use of the advantages of the ResourceLoader. Uploaded under the terms of the MIT license: The MIT License (MIT) Copyright (c) 2012-2017 Kevin Brown, Igor Vaynberg, and Select2 contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Loading branch information