diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index aec68009..00000000 --- a/docs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -_site -dist diff --git a/docs/README.md b/docs/README.md index 3358e731..6f123214 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,67 +1,12 @@ Select2 Documentation ===================== -[This repository][select2-docs-source] holds the latest documentation for +[This repository][select2-docs-source] holds a redirect to the latest documentation for [Select2][select2]. -What is this? -------------- -The documentation is automatically extracted from the `docs` directory at the -[Select2 source repository][select2-source]. This is done periodically by -the maintainers of Select2. - -How can I fix an issue in these docs? +How can I fix an issue in the docs? ------------------------------------- -If you are reading this from the source repository, within the `docs` directory, -then you're already in the right place. You can fork the source repository, -commit your changes, and then make a pull request and it will be reviewed. +Submit a pull request at [select2-new-docs][the new documentation repository]. -**If you are reading this from the -[documentation repository][select2-docs-source], you are in the wrong place.** -Pull requests made directly to the documentation repository will be ignored and -eventually closed, so don't do that. - -How can I build these docs manually? ------------------------------------- - -### Requirements - -##### Ruby and Jekyll - -Jekyll is a static site builder written in Ruby. You will need **the latest version** of [Jekyll][jekyll] installed to build the Select2 documentation. - -First, [make sure that you have a Ruby environment set up][jekyll-quickstart]. Then, to install Jekyll: - -`gem install jekyll bundler` - -To upgrade Jekyll: - -`gem update jekyll` - -##### npm and Grunt - -Select2 uses [Grunt][grunt], which is an npm package, as a task runner. To run the build task, you will need to first [install the latest version of npm and Node.js][nodejs] as well as the [Grunt CLI][grunt-cli]. - -### Building the docs with Grunt - -This assumes that you have already cloned the Select2 repo to your local development environment. In the [main Select2 repository][select2-source], you will first need to install the npm dependencies locally: - -``` -npm install -``` - -Then, you can build and launch the documentation by running - -```bash -grunt docs -``` - -This will start up the documentation on port 4000 ([http://localhost:4000](http://localhost:4000)). - -[jekyll]: http://jekyllrb.com/ -[jekyll-quickstart]: https://jekyllrb.com/docs/quickstart/ -[grunt]: https://gruntjs.com -[grunt-cli]: https://gruntjs.com/getting-started -[nodejs]: https://nodejs.org/en/download/ -[select2]: https://select2.github.io +[select2]: https://select2.org [select2-docs-source]: https://github.com/select2/select2.github.io -[select2-source]: https://github.com/select2/select2 +[select2-new-docs]: https://github.com/select2/docs \ No newline at end of file diff --git a/docs/_includes/examples/basics.html b/docs/_includes/examples/basics.html deleted file mode 100644 index da618db7..00000000 --- a/docs/_includes/examples/basics.html +++ /dev/null @@ -1,97 +0,0 @@ -
- -

The basics

- -

Single select boxes

- -

- Select2 can take a regular select box like this... -

- -

- -

- -

- and turn it into this... -

- -
-

- -

-
- -{% highlight html linenos %} - - - -{% endhighlight %} - -

Multiple select boxes

- -

- Select2 also supports multi-value select boxes. The select below is declared with the multiple attribute. -

- -
-

- -

-
- -{% highlight html linenos %} - - - -{% endhighlight %} - -

Select boxes with labels

- -

- You can, and should, use a <label> with Select2, just like any other <select> element. -

- -
-

- -

-

- -

-
- -{% highlight html linenos %} - - - -{% endhighlight %} -
\ No newline at end of file diff --git a/docs/_includes/examples/data.html b/docs/_includes/examples/data.html deleted file mode 100644 index 4b55a760..00000000 --- a/docs/_includes/examples/data.html +++ /dev/null @@ -1,123 +0,0 @@ -
- -

- Data sources -

- -

In addition to handling options from a standard <select>, Select2 can also retrieve the results from other data sources.

- -

Loading array data

- -

- Select2 provides a way to load the data from a local array. - You can provide initial selections with array data by providing the - option tag for the selected values, similar to how it would be done for - a standard select. -

- -
-

- -

-

- -

-
- -{% highlight html linenos %} - - - - - -{% endhighlight %} - -

Loading remote data

- -

- Select2 comes with AJAX support built in, using jQuery's AJAX methods. - In this example, we can search for repositories using GitHub's API. -

- -

- -

- -

- When using Select2 with remote data, the HTML required for the - select is the same as any other Select2. If you need to - provide default selections, you just need to include an - option for each selection that contains the value and text - that should be displayed. -

- -{% highlight html linenos %} - -{% endhighlight %} - -

- You can configure how Select2 searches for remote data using the - ajax option. More information on the individual options - that Select2 handles can be found in the - options documentation for ajax. -

- -{% highlight js linenos %} -$(".js-data-example-ajax").select2({ - ajax: { - url: "https://api.github.com/search/repositories", - dataType: 'json', - delay: 250, - data: function (params) { - return { - q: params.term, // search term - page: params.page - }; - }, - processResults: function (data, params) { - // parse the results into the format expected by Select2 - // since we are using custom formatting functions we do not need to - // alter the remote JSON data, except to indicate that infinite - // scrolling can be used - params.page = params.page || 1; - - return { - results: data.items, - pagination: { - more: (params.page * 30) < data.total_count - } - }; - }, - cache: true - }, - escapeMarkup: function (markup) { return markup; }, // let our custom formatter work - minimumInputLength: 1, - templateResult: formatRepo, // omitted for brevity, see the source of this page - templateSelection: formatRepoSelection // omitted for brevity, see the source of this page -}); -{% endhighlight %} - -

- Select2 will pass any options in the ajax object to - jQuery's $.ajax function, or the transport - function you specify. -

-
diff --git a/docs/_includes/examples/disabled-mode.html b/docs/_includes/examples/disabled-mode.html deleted file mode 100644 index 309a2c2b..00000000 --- a/docs/_includes/examples/disabled-mode.html +++ /dev/null @@ -1,43 +0,0 @@ -
- -

Disabled mode

- -

- Select2 will respond to the disabled attribute on - <select> elements. You can also initialize Select2 - with disabled: true to get the same effect. -

- -
-

- -

- -

- -

-
- - -
-
- -

-
-
-
-
diff --git a/docs/_includes/examples/disabled-results.html b/docs/_includes/examples/disabled-results.html deleted file mode 100644 index b695a3b6..00000000 --- a/docs/_includes/examples/disabled-results.html +++ /dev/null @@ -1,29 +0,0 @@ -
- -

Disabled results

- -

- Select2 will correctly handle disabled results, both with data coming - from a standard select (when the disabled attribute is set) - and from remote sources, where the object has - disabled: true set. -

- -
-

- -

-
- -{% highlight html linenos %} - -{% endhighlight %} -
diff --git a/docs/_includes/examples/hide-search.html b/docs/_includes/examples/hide-search.html deleted file mode 100644 index 0203c1a7..00000000 --- a/docs/_includes/examples/hide-search.html +++ /dev/null @@ -1,22 +0,0 @@ -
- -

Hiding the search box

- -

- Select2 allows you to hide the search box depending on the number of - options which are displayed. In this example, we use the value - Infinity to tell Select2 to never display the search box. -

- -
-

- -

-
- -{% highlight js linenos %} -$(".js-example-basic-hide-search").select2({ - minimumResultsForSearch: Infinity -}); -{% endhighlight %} -
diff --git a/docs/_includes/examples/localization-rtl-diacritics.html b/docs/_includes/examples/localization-rtl-diacritics.html deleted file mode 100644 index 8b881586..00000000 --- a/docs/_includes/examples/localization-rtl-diacritics.html +++ /dev/null @@ -1,82 +0,0 @@ -
-

- Localization, RTL and diacritics support -

- -

Multiple languages

- -

- Select2 supports displaying the messages in different languages, as well - as providing your own - custom messages - that can be displayed. -

- -

- The language does not have to be defined when Select2 is being - initialized, but instead can be defined in the [lang] - attribute of any parent elements as [lang="es"]. -

- -
-

- -

-
- -{% highlight js linenos %} -$(".js-example-language").select2({ - language: "es" -}); -{% endhighlight %} - -

RTL support

- -

- Select2 will work on RTL websites if the dir attribute is - set on the <select> or any parents of it. You can also - initialize Select2 with dir: "rtl" set. -

- -
-

- -

-
- -{% highlight js linenos %} -$(".js-example-rtl").select2({ - dir: "rtl" -}); -{% endhighlight %} - -

Diacritics support

- -

- Select2's default matcher will ignore diacritics, making it easier for - users to filter results in international selects. Type "aero" into the - select below. -

- -
-

- -

-
- -{% highlight js linenos %} -$(".js-example-diacritics").select2(); -{% endhighlight %} -
diff --git a/docs/_includes/examples/matcher.html b/docs/_includes/examples/matcher.html deleted file mode 100644 index fbdcf1f2..00000000 --- a/docs/_includes/examples/matcher.html +++ /dev/null @@ -1,39 +0,0 @@ -
-

Customizing how results are matched

- -

- Unlike other dropdowns on this page, this one matches options only if - the term appears in the beginning of the string as opposed to anywhere: -

- -

- This custom matcher uses a - compatibility module that is - only bundled in the - full version of Select2. You also - have the option of using a - more complex matcher. -

- -
-

- -

-
- -{% highlight js linenos %} -function matchStart (term, text) { - if (text.toUpperCase().indexOf(term.toUpperCase()) == 0) { - return true; - } - - return false; -} - -$.fn.select2.amd.require(['select2/compat/matcher'], function (oldMatcher) { - $(".js-example-matcher-start").select2({ - matcher: oldMatcher(matchStart) - }) -}); -{% endhighlight %} -
diff --git a/docs/_includes/examples/multiple-max.html b/docs/_includes/examples/multiple-max.html deleted file mode 100644 index 6ec0056e..00000000 --- a/docs/_includes/examples/multiple-max.html +++ /dev/null @@ -1,24 +0,0 @@ -
-

- Limiting the number of selections -

- -

- Select2 multi-value select boxes can set restrictions regarding the - maximum number of options selected. The select below is declared with - the multiple attribute with maximumSelectionLength - in the select2 options. -

- -
-

- -

-
- -{% highlight js linenos %} -$(".js-example-basic-multiple-limit").select2({ - maximumSelectionLength: 2 -}); -{% endhighlight %} -
diff --git a/docs/_includes/examples/placeholders.html b/docs/_includes/examples/placeholders.html deleted file mode 100644 index 1b6afda9..00000000 --- a/docs/_includes/examples/placeholders.html +++ /dev/null @@ -1,36 +0,0 @@ -
-

Placeholders

- -

- A placeholder value can be defined and will be displayed until a - selection is made. Select2 uses the placeholder attribute - on multiple select boxes, which requires IE 10+. You can support it in - older versions with - the Placeholders.js polyfill. -

- -
-

- -

-

- -

-
- -

-
-
-
-
diff --git a/docs/_includes/examples/programmatic-control.html b/docs/_includes/examples/programmatic-control.html deleted file mode 100644 index 375eaa42..00000000 --- a/docs/_includes/examples/programmatic-control.html +++ /dev/null @@ -1,155 +0,0 @@ -
-

- Programmatic control -

- -

DOM events

- -

- Select2 will trigger some events on the original select element, - allowing you to integrate it with other components. You can find more - information on events - on the options page. -

- -

- change is fired whenever an option is selected or removed. -

- -

- select2:open is fired whenever the dropdown is opened. - select2:opening is fired before this and can be prevented. -

- -

- select2:close is fired whenever the dropdown is closed. - select2:closing is fired before this and can be prevented. -

- -

- select2:select is fired whenever a result is selected. - select2:selecting is fired before this and can be prevented. -

- -

- select2:unselect is fired whenever a result is unselected. - select2:unselecting is fired before this and can be prevented. -

- -
-

- -

-

- -

-
- -
- -
- -

-
-
-
-  

Programmatic access

- -

- Select2 supports methods that allow programmatic control of the - component. -

- -
- -

- -

- - - -

- -

- -
- - -
- -
- -

-
-
-
-
diff --git a/docs/_includes/examples/tags.html b/docs/_includes/examples/tags.html deleted file mode 100644 index b5356fd1..00000000 --- a/docs/_includes/examples/tags.html +++ /dev/null @@ -1,47 +0,0 @@ -
-

Tagging support

- -

- In addition to the dropdown menu of options, Select2 can also allow free-text responses. This feature is called "tagging". To enable free-text responses, set the tags option to true: -

- -
-

- -

-
- -{% highlight js linenos %} -$(".js-example-tags").select2({ - tags: true -}) -{% endhighlight %} - -

- Note that when tagging is enabled the user can select from the pre-existing options or create a new option by picking the first choice, which is what the user has typed into the search box so far. -

- -

Tagging with multi-value select boxes

- -

- Tagging can also be used in multi-value select boxes. In the example below, we set the multiple="multiple" attribute on a Select2 control that also has tags: true enabled: -

- -
-

- -

-
- -

- Try entering a value that isn't listed in the dropdown - you'll be able to add it as a new option! -

-
diff --git a/docs/_includes/examples/themes-templating-responsive-design.html b/docs/_includes/examples/themes-templating-responsive-design.html deleted file mode 100644 index 08c686e8..00000000 --- a/docs/_includes/examples/themes-templating-responsive-design.html +++ /dev/null @@ -1,105 +0,0 @@ -
- -

- Themes, templating and responsive design -

- -

Theme support

- -

- Select2 supports custom themes using the - theme option - so you can style Select2 to match the rest of your application. -

- -

- These are using the classic theme, which matches the old - look of Select2. -

- -
-

- -

-

- -

-
- -{% highlight js linenos %} -$(".js-example-theme-single").select2({ - theme: "classic" -}); - -$(".js-example-theme-multiple").select2({ - theme: "classic" -}); -{% endhighlight %} - -

Templating

- -

- Various display options of the Select2 component can be changed: - You can access the <option> element - (or <optgroup>) and any attributes on those elements - using .element. -

- -

- Templating is primarily controlled by the - templateResult - and templateSelection - options. -

- -
-

- -

-
- -{% highlight js linenos %} -function formatState (state) { - if (!state.id) { return state.text; } - var $state = $( - ' ' + state.text + '' - ); - return $state; -}; - -$(".js-example-templating").select2({ - templateResult: formatState, - templateSelection: formatState -}); -{% endhighlight %} - -

Responsive design - Percent width

- -

- Select2's width can be set to a percentage of its parent to support - responsive design. The two Select2 boxes below are styled to 50% and 75% - width respectively. -

- -
-

- -

-

- -

-
- -{% highlight html linenos %} - - -{% endhighlight %} - -
- Select2 will do its best to resolve the percent width specified via a - CSS class, but it is not always possible. The best way to ensure that - Select2 is using a percent based width is to inline the - style declaration into the tag. -
-
diff --git a/docs/_includes/examples/tokenizer.html b/docs/_includes/examples/tokenizer.html deleted file mode 100644 index 6fa04ca6..00000000 --- a/docs/_includes/examples/tokenizer.html +++ /dev/null @@ -1,32 +0,0 @@ -
-

Automatic tokenization

- -

- Select2 supports ability to add choices automatically as the user is - typing into the search field. Try typing in the search field below and - entering a space or a comma. -

- -

- The separators that should be used when tokenizing can be specified - using the tokenSeparators - options. -

- -
-

- -

-
- -{% highlight js linenos %} -$(".js-example-tokenizer").select2({ - tags: true, - tokenSeparators: [',', ' '] -}) -{% endhighlight %} -
diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html deleted file mode 100644 index 1198d5af..00000000 --- a/docs/_includes/footer.html +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/docs/_includes/ga.html b/docs/_includes/ga.html deleted file mode 100644 index 5ed52285..00000000 --- a/docs/_includes/ga.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/docs/_includes/head.html b/docs/_includes/head.html deleted file mode 100644 index 84270cfc..00000000 --- a/docs/_includes/head.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - {{ page.title }} - - - - - - - - - - - - - diff --git a/docs/_includes/js-source-states.html b/docs/_includes/js-source-states.html deleted file mode 100644 index 34876bee..00000000 --- a/docs/_includes/js-source-states.html +++ /dev/null @@ -1,62 +0,0 @@ - diff --git a/docs/_includes/nav/announcements-4.0.html b/docs/_includes/nav/announcements-4.0.html deleted file mode 100644 index 733e2c47..00000000 --- a/docs/_includes/nav/announcements-4.0.html +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/docs/_includes/nav/examples.html b/docs/_includes/nav/examples.html deleted file mode 100644 index a74f5810..00000000 --- a/docs/_includes/nav/examples.html +++ /dev/null @@ -1,96 +0,0 @@ - diff --git a/docs/_includes/nav/options-old.html b/docs/_includes/nav/options-old.html deleted file mode 100644 index b03d3d07..00000000 --- a/docs/_includes/nav/options-old.html +++ /dev/null @@ -1,55 +0,0 @@ - diff --git a/docs/_includes/nav/options.html b/docs/_includes/nav/options.html deleted file mode 100644 index 783eafb7..00000000 --- a/docs/_includes/nav/options.html +++ /dev/null @@ -1,80 +0,0 @@ - diff --git a/docs/_includes/navigation.html b/docs/_includes/navigation.html deleted file mode 100644 index d694fa1f..00000000 --- a/docs/_includes/navigation.html +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/docs/_includes/notice-previous.html b/docs/_includes/notice-previous.html deleted file mode 100644 index 9a444cfc..00000000 --- a/docs/_includes/notice-previous.html +++ /dev/null @@ -1,7 +0,0 @@ -
-
- Looking for the Select2 3.5.2 docs? - We have moved them to a new location - while we push forward with Select2 4.0. -
-
diff --git a/docs/_includes/options-old/adapters.html b/docs/_includes/options-old/adapters.html deleted file mode 100644 index c0807ede..00000000 --- a/docs/_includes/options-old/adapters.html +++ /dev/null @@ -1,209 +0,0 @@ -
- - -

- Select2 allows plugins to add additional functionality through the core - adapters. You can change almost anything involving the way Select2 works - to the way Select2 interacts with the page by modifying the core adapters. - Most third-party plugins should provide decorators (used to wrap adapters) - and custom adapters that you can use. -

- -

- Each adapter contains a set of methods which will must always be defined. - Along with the global methods that all adapters must implement, these - methods must be implemented. -

- -

- All adapters -

- -

- All adapters must implement a set of methods that Select2 will use to - display them and bind any internal events. -

- -
-// The basic HTML that should be rendered by Select2. A jQuery or DOM element
-// should be returned, which will automatically be placed by Select2 within the
-// DOM.
-//
-// @returns A jQuery or DOM element that contains any elements that must be
-//   rendered by Select2.
-Adapter.render = function () {
-  return $jq;
-};
-
-// Bind to any Select2 or DOM events.
-//
-// @param container The Select2 object that is bound to the jQuery element.  You
-//   can listen to Select2 events with `on` and trigger Select2 events using the
-//   `trigger` method.
-// @param $container The jQuery DOM node that all default adapters will be
-//   rendered within.
-Adapter.bind = function (container, $container) { };
-
-// Position the DOM element within the Select2 DOM container, or in another
-// place. This allows adapters to be located outside of the Select2 DOM,
-// such as at the end of the document or in a specific place within the Select2
-// DOM node.
-//
-// Note: This method is not called on data adapters.
-//
-// @param $rendered The rendered DOM element that was returned from the call to
-//   `render`. This may have been modified by Select2, but the root element
-//   will always be the same.
-// @param $defaultContainer The default container that Select2 will typically
-//   place the rendered DOM element within. For most adapters, this is the
-//   Select2 DOM element.
-Adapter.position = function ($rendered, $defaultContainer) { };
-
-// Destroy any events or DOM elements that have been created.
-// This is called when `select2("destroy")` is called on an element.
-Adapter.destroy = function () { };
-
- -

- Container (selection) -

- -

- The selection is what is shown to the user as a replacement of the - standard <select> box. It controls the display of the - selection option(s), as well anything else that needs to be embedded - within the container, such as a search box. -

- -
-
Key
-
- selectionAdapter -
- -
Default
-
- SingleSelection or - MultipleSelection -
- -
Base
-
- BaseSelection -
-
- -
-// Update the selected data.
-//
-// @param data An array of data objects that have been generated by the data
-//   adapter. If no objects should be selected, an empty array will be passed.
-//
-// Note: An array will always be passed into this method, even if Select2 is
-// attached to a source which only accepts a single selection.
-SelectionAdapter.update = function (data) { };
-
- -

- Data set -

- -

- The data set is what Select2 uses to generate the possible results that - can be selected, as well as the currently selected results. -

- -
-
Key
-
- dataAdapter -
- -
Default
-
- SelectAdapter -
- -
Base
-
- BaseAdapter -
-
- -
-// Get the currently selected options. This is called when trying to get the
-// initial selection for Select2, as well as when Select2 needs to determine
-// what options within the results are selected.
-//
-// @param callback A function that should be called when the current selection
-//   has been retrieved. The first parameter to the function should be an array
-//   of data objects.
-DataAdapter.current = function (callback) {
-  callback(currentData);
-}
-
-// Get a set of options that are filtered based on the parameters that have
-// been passed on in.
-//
-// @param params An object containing any number of parameters that the query
-//   could be affected by. Only the core parameters will be documented.
-// @param params.term A user-supplied term. This is typically the value of the
-//   search box, if one exists, but can also be an empty string or null value.
-// @param params.page The specific page that should be loaded. This is typically
-//   provided when working with remote data sets, which rely on pagination to
-//   determine what objects should be displayed.
-// @param callback The function that should be called with the queried results.
-DataAdapter.query = function (params, callback) {
-  callback(queryiedData);
-}
-
- - - -

- The dropdown adapter defines the main container that the dropdown should - be held in. It does not define any extra methods that can be used - for decorators, but it is common for decorators to attach to the - render and position methods to alter how the - dropdown is altered and positioned. -

- -
-
Key
-
- dropdownAdapter -
- -
Default
-
- DropdownAdapter -
-
- -

- Results -

- -

- The results adapter controls the list of results that the user can select - from. While the results adapter does not define any additional methods - that must be implemented, it makes extensive use of the Select2 event - system for controlling the display of results and messages. -

- -
-
Key
-
- resultsAdapter -
- -
Default
-
- ResultsAdapter -
-
-
diff --git a/docs/_includes/options-old/backwards-compatibility.html b/docs/_includes/options-old/backwards-compatibility.html deleted file mode 100644 index 4bdd9372..00000000 --- a/docs/_includes/options-old/backwards-compatibility.html +++ /dev/null @@ -1,200 +0,0 @@ -
- - -

- Select2 offers limited backwards compatibility with the previously 3.5.x - release line, allowing people more efficiently transfer across releases - and get the latest features. For many of the larger changes, such as the - change in how custom data adapters work, compatibility modules were - created that will be used to assist in the upgrade process. It is not - recommended to rely on these compatibility modules, as they will not - always exist, but they make upgrading easier for major changes. -

- -

- The compatibility modules are only included in the - full builds of - Select2. These files end in .full.js, and the - compatibility modules are prefixed with select2/compat. -

- -

- Simplified function for matching data objects -

- -

- Added in Select2 4.0.0. - This method was added to make upgrading easier from earlier versions of - Select2. -

- -

- During the Select2 4.0.0 release, the - matcher function was changed to allow for more complex - matching of nested objects. -

- -
-
-
-
Key
-
- matcher -
- -
Value
-
- A function taking a search term and the data object - text. -
-
-
- -
-
-
Adapter
-
- oldMatcher -
-
-
-
- -

- The custom matcher example provides a - guide for how to use this in your own application. For those upgrading - from older versions of Select2, you just need to wrap your old - matcher with this function to maintain compatibility. -

- -

- Old initial selections with initSelection -

- -

- Deprecated in Select2 4.0. - This has been replaced by another option and is only available in the - full builds of - Select2. -

- -

- In the past, Select2 required an option called initSelection - that was defined whenever a custom data source was being used, allowing - for the initial selection for the component to be determined. This has - been replaced by the current method on the - data adapter. -

- -
-
-
-
Key
-
- initSelection -
- -
Value
-
- A function taking a callback -
-
-
- -
-
-
Adapter
-
- DataAdapter -
- -
Decorator
-
- InitSelection -
-
-
-
- -

- Querying old data with query -

- -

- Deprecated in Select2 4.0. - This has been replaced by another option and is only available in the - full builds of - Select2. -

- -

- In the past, Select2 supported an option called query that - allowed for a custom data source to be used. This option has been replaced - by the query method on the - data adapter and takes a very similar set of - parameters. -

- -
-
-
-
Key
-
- query -
- -
Value
-
- A function taking params (including a callback) -
-
-
- -
-
-
Adapter
-
- DataAdapter -
- -
Decorator
-
- Query -
-
-
-
- -

- Compatibility with <input type="text" /> -

- -

- Deprecated in Select2 4.0. - It is now encouraged to use the <select> tag instead. -

- -

- In past versions of Select2, a <select> element could - only be used with a limited subset of options. An - <input type="hidden" /> was required instead, which did - not allow for a graceful fallback for users who did not have JavaScript - enabled. Select2 now supports the <select> element for - all options, so it is no longer required to use <input /> - elements with Select2. -

- -
-
Adapter
-
- DataAdapter -
- -
Decorator
-
- InputData -
-
-
diff --git a/docs/_includes/options-old/core-options.html b/docs/_includes/options-old/core-options.html deleted file mode 100644 index c32ca56f..00000000 --- a/docs/_includes/options-old/core-options.html +++ /dev/null @@ -1,790 +0,0 @@ -
-

Core options

- -

- Select2 supports a small subset of options in every build that is - generated. Each option typically has a decorator that is required that - wraps an adapter, adding support for the option. This is only required - when a custom adapter is being used, as Select2 will build the required - adapters by default. -

- -

- Select2 will automatically apply decorators to any adapters which have not - been manually overridden. The only time you need to decorate adapters is - when you are using third-party adapters not provided by Select2, or you - are using features not provided in the Select2 core. You can apply a - decorator to an adapter using the - Utils.Decorate method provided with - Select2. -

- -
-$.fn.select2.amd.require(
-    ["select2/utils", "select2/selection/single", "select2/selection/placeholder"],
-    function (Utils, SingleSelection, Placeholder) {
-  var CustomSelectionAdapter = Utils.Decorate(SingleSelection, Placeholder);
-});
-
- -

- All core options that use decorators or adapters will clearly state it - in the "Decorator" or "Adapter" part of the documentation. Decorators are - typically only compatible with a specific type of adapter, so make sure to - note what adapter is given. -

- -

- Declaring configuration in the data-* attributes -

- -

- It is recommended that you declare your configuration options for Select2 - when initializing Select2. You can also define your configuration options - by using the HTML5 data-* attributes, which will override - any options set when initializing Select2 and any defaults. -

- -

- This means that if you declare your <select> tag as... -

- -
-<select data-tags="true" data-placeholder="Select an option"></select>
-
- -

- Will be interpreted the same as initializing Select2 as... -

- -
-$("select").select2({
-  tags: "true",
-  placeholder: "Select an option"
-});
-
- -

- You can also define nested configurations, which are typically needed for - options such as AJAX. Each level of nesting should be separated by two - dashes (--) instead of one. Due to - a jQuery bug, - nested options using data-* attributes - do not work in jQuery 1.x. -

- -
-<select data-ajax--url="http://example.org/api/test" data-ajax--cache="true"></select>
-
- -

- Which will be interpreted the same as initializing Select2 with... -

- -
-$("select").select2({
-  ajax: {
-    url: "http://example.org/api/test",
-    cache: "true"
-  }
-});
-
- -

- The value of the option is subject to jQuery's - parsing rules for - HTML5 data attributes. -

- -

- AMD compatibility -

- -

- You can find more information on how to integrate Select2 with your - existing AMD-based project by - viewing the 4.0 release notes. - Select2 automatically loads some modules when the adapters are being - automatically constructed, so those who are using Select2 with a custom - AMD build using their own system may need to specify the paths that are - generated to the Select2 modules. -

- -
-
-
-
Key
-
- amdBase -
- -
Default
-
- select2/ -
-
-
-
-
-
Key
-
- amdLanguageBase -
- -
Default
-
- select2/i18n/ -
-
-
-
- -

- Displaying selections -

- -

- Select2 provides options that allow you to directly affect how the - container that holds the current selection is displayed. -

- -

- Placeholders -

- -

- Select2 can display a placeholder for a single-value select that will - replace an option, or be shown when no options are selected for - multiple-value selects. You can find an example on the - example page. -

- -
-
-
-
Key
-
- placeholder -
- -
Value
-
string or object
-
- -
- -
-
Adapter
-
- SelectionAdapter -
- -
Decorator
-
- Placeholder - and - HidePlaceholder -
-
-
- -
-
- Heads up! - Because browsers assume that the first option in - single-value select boxes is selected, you should add an empty - <option></option> tag that the placeholder - should use or it may not work. -
-
-
- -

- If the value is a string, the placeholder will be - displayed when a blank option is used as the placeholder. - The value will be the message to show to users as the - placeholders. -

- -
-placeholder: "Select a repository"
-
- -

- If the value is an object, the object should be - compatible with Select2's internal objects. The id should - be the id to look for when determining if the placeholder should be - displayed. The text should be the placeholder to display - when that option is selected. -

- -
-placeholder: {
-  id: "-1",
-  text: "Select a repository"
-}
-
- -
- You should pass in an object when you are using a - framework that creates its own placeholder option. The - id should be the same as the value - attribute on the option. -
- -

- You can allow a selected option to be cleared back to the placeholder by - enabling the allowClear option. -

- -
-
-
-
Key
-
allowClear
- -
Value
-
boolean
-
-
- -
-
-
Adapter
-
- SelectionAdapter -
- -
Decorator
-
- AllowClear -
-
-
-
- -

- This will display an "x" that the user can click to clear the current - selection. It is designed to be used for cases where a single selection - can be made. -

- -

- Multiple selections -

- -

- Select2 can display either a single selection or multiple selections. -

- -
-
Key
-
multiple
- -
Value
-
boolean (true or false)
-
- -

- This option will determine what the SelectAdapter (used by - default) should use to set the value of the underlying select - element. It will also determine if the MultipleSelection - adapter should be used. -

- -

- Container width -

- -

- Select2 will try to match the width of the original element as closely as - possible. Sometimes this isn't perfect, which is what you can tell Select2 - how to determine the width. -

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
"element" - Uses javascript to calculate the width of the source element. -
"style" - Copies the value of the width style attribute set on the source element. -
"resolve" - Tries to use style to determine the width, falling back to element. -
Anything else - The value of the width option is directly set as the width of the container. -
-
-
-
-
Key
-
width
- -
Value
-
string
-
-
-
- -

- Internationalization (Language support) -

- -

- Messages will be displayed to users when necessary, such as when no - search results were found or more characters need to be entered in order - for a search to be made. These messages have been - translated into many languages - by contributors to Select2, but you can also provide your own - translations. -

- -
-
-
-
Key
-
language
- -
Value
-
object or string
-
- -
- -
-
Module
-
- Translation -
-
-
- -
-

- Heads up! When using translations provided by Select2, - you must make sure to include the translation file in your page after - Select2. -

-
-
- -

- When a string is passed in as the language, Select2 will try to resolve - it into a language file. This allows you to specify your own language - files, which must be defined as an AMD module. If the language file - cannot be found, Select2 will assume it is a language code controlled by - Select2, and it will try to load the translations for that language - instead. -

- -

- You can include your own translations by providing an object similar to - the one below. -

- -
-language: {
-  // You can find all of the options in the language files provided in the
-  // build. They all must be functions that return the string that should be
-  // displayed.
-  inputTooShort: function () {
-    return "You must enter more characters...";
-  }
-}
-
- -

- Templating results and selections -

- -

- By default, Select2 will display the option text within the list of - results and when the option has been selected. Select2 comes with options - that allow you to further customize the display of results and selections, - allowing you to display them however you want. -

- -

- Customizing the display of selections -

- -

- When an option is displayed after it has been selected, it is passed - through a formatting function that determines what is displayed. By - default, the function only returns the text key of the data - object. -

- -
-
Key
-
templateSelection
- -
Value
-
A function taking a selection object
-
- -
- Anything rendered as a selection is templated. - This includes placeholders and pre-existing selections that are displayed, - so you must ensure that your templating functions can support them. -
- -

- The templateSelection function should return a string - containing the text to be displayed, or an object (such as a jQuery - object) that contains the data that should be displayed. -

- -

- Strings are assumed to contain only text and will be - passed through the escapeMarkup function, which strips any - HTML markup. -

- -

- - Anything else will be passed - directly to jQuery.fn.append - and will be handled directly by jQuery. Any markup, such as - HTML, returned will not be escaped and it is up to you to escape any - malicious input provided by users. -

- -

- Customizing the display of results -

- -

- When an option is displayed after it has been selected, it is passed - through a formatting function that determines what is displayed. By - default, the function only returns the text key of the data - object. -

- -
-
Key
-
templateResult
- -
Value
-
A function taking a result object
-
- -
- Anything rendered in the results is templated. - This includes results such as the "Searching..." and "Loading more..." - text which will periodically be displayed, which allows you to add more - advanced formatting to these automatically generated options. -
- -

- The templateResult function should return a string - containing the text to be displayed, or an object (such as a jQuery - object) that contains the data that should be displayed. It can also - return null, which will prevent the option from being - displayed in the results list. -

- -

- Strings are assumed to contain only text and will be - passed through the escapeMarkup function, which strips any - HTML markup. -

- -

- - Anything else will be passed - directly to jQuery.fn.append - and will be handled directly by jQuery. Any markup, such as - HTML, returned will not be escaped and it is up to you to escape any - malicious input provided by users. -

- -

- Returning and displaying results -

- -

- Select2 can work on many different data sets ranging from local options, - the same way that a <select> typically works, from - remote options where a server generates the results that users can select - from. -

- -

- Array -

- -

- Select2 allows creating the results based on an array of data objects that - is included when initializing Select2. -

- -
-
-
-
Key
-
data
- -
Value
-
array of objects
-
-
- -
-
-
Adapter
-
- ArrayAdapter -
-
-
-
- -

- The objects that the users can select from should be passed as an array - with each object containing id and text - properties. -

- -

- AJAX -

- -

- Select2 allows searching for results from remote data sources using AJAX - requests. -

- -
-
-
-
Key
-
ajax
- -
Value
-
object
-
-
- -
-
-
Adapter
-
- AjaxAdapter -
-
-
-
- -

- All options passed to this option will be directly passed to the - $.ajax function that executes AJAX requests. There are a few - custom options that Select2 will intercept, allowing you to customize the - request as it is being made. - -

-ajax: {
-  // The number of milliseconds to wait for the user to stop typing before
-  // issuing the ajax request.
-  delay: 250,
-  // You can craft a custom url based on the parameters that are passed into the
-  // request. This is useful if you are using a framework which has
-  // JavaScript-based functions for generating the urls to make requests to.
-  //
-  // @param params The object containing the parameters used to generate the
-  //   request.
-  // @returns The url that the request should be made to.
-  url: function (params) {
-    return UrlGenerator.Random();
-  },
-  // You can pass custom data into the request based on the parameters used to
-  // make the request. For `GET` requests, the default method, these are the
-  // query parameters that are appended to the url. For `POST` requests, this
-  // is the form data that will be passed into the request. For other requests,
-  // the data returned from here should be customized based on what jQuery and
-  // your server are expecting.
-  //
-  // @param params The object containing the parameters used to generate the
-  //   request.
-  // @returns Data to be directly passed into the request.
-  data: function (params) {
-    var queryParameters = {
-      q: params.term
-    }
-
-    return queryParameters;
-  },
-  // You can modify the results that are returned from the server, allowing you
-  // to make last-minute changes to the data, or find the correct part of the
-  // response to pass to Select2. Keep in mind that results should be passed as
-  // an array of objects.
-  //
-  // @param data The data as it is returned directly by jQuery.
-  // @returns An object containing the results data as well as any required
-  //   metadata that is used by plugins. The object should contain an array of
-  //   data objects as the `results` key.
-  processResults: function (data) {
-    return {
-      results: data
-    };
-  },
-  // You can use a custom AJAX transport function if you do not want to use the
-  // default one provided by jQuery.
-  //
-  // @param params The object containing the parameters used to generate the
-  //   request.
-  // @param success A callback function that takes `data`, the results from the
-  //   request.
-  // @param failure A callback function that indicates that the request could
-  //   not be completed.
-  // @returns An object that has an `abort` function that can be called to abort
-  //   the request if needed.
-  transport: function (params, success, failure) {
-    var $request = $.ajax(params);
-
-    $request.then(success);
-    $request.fail(failure);
-
-    return $request;
-  }
-}
-
-

- -

- Tags -

- -

- Users can create their own options based on the text that they have - entered. -

- -
-
-
-
Key
-
tags
- -
Value
-
boolean / array of objects
-
-
- -
-
-
Adapter
-
- DataAdapter -
- -
Decorator
-
- Tags -
-
-
-
- -

- If the tags option is passed into Select2, if a user types - anything into the search box which doesn't already exist, it will be - displayed at the top and the user will be able to select it. -

- -

- For backwards compatibility, if an array of objects is - passed in with the tags option, the options will be - automatically created and the user will be able to select from them. - This is the same as how array data - works, and has similar limitations. -

- -

- Change how options are matched when searching -

- -

- When users filter down the results by entering search terms into the - search box, Select2 uses an internal "matcher" to match search terms to - results. When a remote data set is used, Select2 expects that the - returned results have already been filtered. -

- -
-
Key
-
- matcher -
- -
Value
-
- A function taking search params and the - data object. -
-
- -

- Select2 will pass the individual data objects that have been passed back - from the data adapter into the matcher individually to - determine if they should be displayed. Only the first-level objects will - be passed in, so if you are working with nested data, you need to - match those individually. -

- -
-matcher: function (params, data) {
-  // If there are no search terms, return all of the data
-  if ($.trim(params.term) === '') {
-    return data;
-  }
-
-  // `params.term` should be the term that is used for searching
-  // `data.text` is the text that is displayed for the data object
-  if (data.text.indexOf(params.term) > -1) {
-    var modifiedData = $.extend({}, data, true);
-    modifiedData.text += ' (matched)';
-
-    // You can return modified objects from here
-    // This includes matching the `children` how you want in nested data sets
-    return modifiedData;
-  }
-
-  // Return `null` if the term should not be displayed
-  return null;
-}
-
- -

- This allows for more advanced matching when working with nested objects, - allowing you to handle them however you want. For those who are not - looking to implement highly customized matching, but instead are just - looking to change the matching algorithm for the text, a - compatibility modules has been created to - make it easier. -

-
diff --git a/docs/_includes/options-old/dropdown.html b/docs/_includes/options-old/dropdown.html deleted file mode 100644 index 87629077..00000000 --- a/docs/_includes/options-old/dropdown.html +++ /dev/null @@ -1,308 +0,0 @@ -
- - -

- Select2 allows you to change the way that the dropdown works, allowing you - to do anything from attach it to a different location in the document or - add a search box. -

- - - -

- By default, Select2 will attach the dropdown to the end of the body and - will absolutely position it to appear below the selection container. -

- -
-
-
-
Key
-
dropdownParent
- -
Value
-
jQuery element or DOM node
- -
- -
Adapter
-
- DropdownAdapter -
- -
Decorator
-
- AttachBody -
-
-
- -
-
- Heads up! - This will cause DOM events to be raised outside of the standard - Select2 DOM container. This can cause issues with - third-party components such as modals. -
-
-
- -

- When the dropdown is attached to the body, you are not limited to just - displaying the dropdown below the container. Select2 will display above - the container if there is not enough space below the container, but there - is enough space above it. You are also not limited to displaying the - dropdown within the parent container, which means Select2 will render - correctly inside of modals and other small containers. -

- - - -

- Select2 can place the dropdown directly after the selection container, so - it will appear in the same location within the DOM as the rest of Select2. -

- -
-
-
-
Adapter
-
- DropdownAdapter -
- -
Decorator
-
- AttachContainer -
-
-
- -
-
- Check your build. This module is only included in the - full builds of - Select2. -
-
-
- -
- - Harvest Chosen - migrators! - - If you are migrating to Select2 from Chosen, this option will cause - Select2 to position the dropdown in a similar way. -
- - - -

- Users can filter down the results by typing a search term into a box that - is displayed at the top of the dropdown. -

- -
-
Adapter
-
- DropdownAdapter -
- -
Decorator
-
- DropdownSearch -
-
- -

- A search box is added to the top of the dropdown automatically for select - boxes where only a single option can be selected. -

- - - -

- Sometimes when working with large data sets, it is more efficient to start - filtering the results when the search term is a certain length. This is - very common when working with remote data sets, as allows for only - significant search terms to be used. -

- -
-
-
-
Key
-
minimumInputLength
- -
Value
-
integer
-
-
- -
-
-
Adapter
-
- DataAdapter -
- -
Decorator
-
- MinimumInputLength -
-
-
-
- - - -

- In some cases, search terms need to be limited to a certain range. Select2 - allows you to limit the length of the search term such that it does not - exceed a certain length. -

- -
-
-
-
Key
-
maximumInputLength
- -
Value
-
integer
-
-
- -
-
-
Adapter
-
- DataAdapter -
- -
Decorator
-
- MaximumInputLength -
-
-
-
- - - -

- When working with smaller data sets, the search box can take up more space - that is necessary, as there are not enough results for filtering to be - effective. Select2 allows you to only display the search box when the - number of search results reaches a certain threshold. -

- -
-
-
-
Key
-
minimumResultsForSearch
- -
Value
-
integer
-
-
- -
-
-
Adapter
-
- DropdownAdapter -
- -
Decorator
-
- MinimumResultsForSearch -
-
-
-
- - - -

- When users close the dropdown, the last highlighted option can be - automatically selected. This is commonly used in combination with - tagging and placeholders - and other situations where the user is required to select an option, or - they need to be able to quickly select multiple options. -

- -
-
Adapter
-
- ResultsAdapter -
- -
Decorator
-
- SelectOnClose -
-
- -

- Close the dropdown when a result is selected -

- -

- Select2 will automatically close the dropdown when an element is selected, - similar to what is done with a normal select box. This behavior can be - changed though to keep the dropdown open when results are selected, - allowing for multiple options to be selected quickly. -

- -
-
-
-
Key
-
closeOnSelect
- -
Default
-
true
-
-
- -
-
-
Adapter
-
- DropdownAdapter -
- -
Decorator
-
- CloseOnSelect -
-
-
-
- -

- If this decorator is not used (or closeOnSelect is set to - false), the dropdown will not automatically close when a - result is selected. The dropdown will also never close if the - ctrl key is held down when the result is selected. -

-
diff --git a/docs/_includes/options-old/events.html b/docs/_includes/options-old/events.html deleted file mode 100644 index bf4f39a9..00000000 --- a/docs/_includes/options-old/events.html +++ /dev/null @@ -1,50 +0,0 @@ -
- - -

- Select2 has an internal event system that is used to notify parts of the - component that state has changed, as well as an adapter that allows some - of these events to be relayed to the outside word. -

- -
-
Adapter
-
- SelectionAdapter -
- -
Decorator
-
- EventRelay -
-
- -

- Public events -

- -

- All public events are relayed using the jQuery event system, and they are - triggered on the <select> element that Select2 is - attached to. You can attach to them using the - .on method provided - by jQuery. -

- -

- Internal events -

- -

- Select2 triggers internal events using its own internal event system, - which allows adapters to communicate with each other. These events are not - accessible through the jQuery event system. -

- -

- You can find more information on the public events triggered by individual - adapters in the individual adapter documentation. -

-
diff --git a/docs/_includes/options-old/setting-default-options.html b/docs/_includes/options-old/setting-default-options.html deleted file mode 100644 index f2c74f60..00000000 --- a/docs/_includes/options-old/setting-default-options.html +++ /dev/null @@ -1,37 +0,0 @@ -
-

Setting default options

- -

- In some cases, you need to set the default options for all instances of - Select2 in your web application. This is especially useful when you are - migrating from past versions of Select2, or you are using non-standard - options like custom AMD builds. Select2 exposes the - default options through $.fn.select2.defaults, which allows - you to set them globally. -

- -

- When setting options globally, any past defaults that have been set will - be overriden. Default options are only used when an option is requested - that has not been set during initialization. -

- -

- You can set default options by calling - $.fn.select2.defaults.set("key", "value"). The key that is - set should take the same format as keys set using - HTML data-* attributes which - means that two dashes (--) will be replaced by a level of - nesting, and a single dash (-) will convert it to a camelCase - string. -

- -
-$.fn.select2.defaults.set("theme", "classic");
-
- -

- You can reset the default options by calling - $.fn.select2.defaults.reset(). -

-
diff --git a/docs/_includes/options/compatibility.html b/docs/_includes/options/compatibility.html deleted file mode 100644 index a7f6197e..00000000 --- a/docs/_includes/options/compatibility.html +++ /dev/null @@ -1,10 +0,0 @@ -
-

- Backwards compatibility -

- - {% include options/compatibility/matcher.html %} - {% include options/compatibility/initial-selection.html %} - {% include options/compatibility/query-function.html %} - {% include options/compatibility/text-input.html %} -
\ No newline at end of file diff --git a/docs/_includes/options/compatibility/initial-selection.html b/docs/_includes/options/compatibility/initial-selection.html deleted file mode 100644 index 62fd0933..00000000 --- a/docs/_includes/options/compatibility/initial-selection.html +++ /dev/null @@ -1,50 +0,0 @@ -
-

- Old initial selections with initSelection -

- -

- Deprecated in Select2 4.0. - This has been replaced by another option and is only available in the - full builds of - Select2. -

- -

- In the past, Select2 required an option called initSelection - that was defined whenever a custom data source was being used, allowing - for the initial selection for the component to be determined. This has - been replaced by the current method on the - data adapter. -

- -
-
-
-
Key
-
- initSelection -
- -
Value
-
- A function taking a callback -
-
-
- -
-
-
Adapter
-
- DataAdapter -
- -
Decorator
-
- InitSelection -
-
-
-
-
\ No newline at end of file diff --git a/docs/_includes/options/compatibility/introduction.html b/docs/_includes/options/compatibility/introduction.html deleted file mode 100644 index 0e82aabe..00000000 --- a/docs/_includes/options/compatibility/introduction.html +++ /dev/null @@ -1,18 +0,0 @@ -
-

- Select2 offers limited backwards compatibility with the previously 3.5.x - release line, allowing people more efficiently transfer across releases - and get the latest features. For many of the larger changes, such as the - change in how custom data adapters work, compatibility modules were - created that will be used to assist in the upgrade process. It is not - recommended to rely on these compatibility modules, as they will not - always exist, but they make upgrading easier for major changes. -

- -

- The compatibility modules are only included in the - full builds of - Select2. These files end in .full.js, and the - compatibility modules are prefixed with select2/compat. -

-
\ No newline at end of file diff --git a/docs/_includes/options/compatibility/matcher.html b/docs/_includes/options/compatibility/matcher.html deleted file mode 100644 index 150f72c1..00000000 --- a/docs/_includes/options/compatibility/matcher.html +++ /dev/null @@ -1,50 +0,0 @@ -
-

- Simplified function for matching data objects -

- -

- Added in Select2 4.0.0. - This method was added to make upgrading easier from earlier versions of - Select2. -

- -

- During the Select2 4.0.0 release, the - matcher function was changed to allow for more complex - matching of nested objects. -

- -
-
-
-
Key
-
- matcher -
- -
Value
-
- A function taking a search term and the data object - text. -
-
-
- -
-
-
Adapter
-
- oldMatcher -
-
-
-
- -

- The custom matcher example provides a - guide for how to use this in your own application. For those upgrading - from older versions of Select2, you just need to wrap your old - matcher with this function to maintain compatibility. -

-
\ No newline at end of file diff --git a/docs/_includes/options/compatibility/query-function.html b/docs/_includes/options/compatibility/query-function.html deleted file mode 100644 index f5f557de..00000000 --- a/docs/_includes/options/compatibility/query-function.html +++ /dev/null @@ -1,50 +0,0 @@ -
-

- Querying old data with query -

- -

- Deprecated in Select2 4.0. - This has been replaced by another option and is only available in the - full builds of - Select2. -

- -

- In the past, Select2 supported an option called query that - allowed for a custom data source to be used. This option has been replaced - by the query method on the - data adapter and takes a very similar set of - parameters. -

- -
-
-
-
Key
-
- query -
- -
Value
-
- A function taking params (including a callback) -
-
-
- -
-
-
Adapter
-
- DataAdapter -
- -
Decorator
-
- Query -
-
-
-
-
\ No newline at end of file diff --git a/docs/_includes/options/compatibility/text-input.html b/docs/_includes/options/compatibility/text-input.html deleted file mode 100644 index 4cea8c86..00000000 --- a/docs/_includes/options/compatibility/text-input.html +++ /dev/null @@ -1,32 +0,0 @@ -
-

- Compatibility with <input type="text" /> -

- -

- Deprecated in Select2 4.0. - It is now encouraged to use the <select> tag instead. -

- -

- In past versions of Select2, a <select> element could - only be used with a limited subset of options. An - <input type="hidden" /> was required instead, which did - not allow for a graceful fallback for users who did not have JavaScript - enabled. Select2 now supports the <select> element for - all options, so it is no longer required to use <input /> - elements with Select2. -

- -
-
Adapter
-
- DataAdapter -
- -
Decorator
-
- InputData -
-
-
\ No newline at end of file diff --git a/docs/_includes/options/core.html b/docs/_includes/options/core.html deleted file mode 100644 index df834804..00000000 --- a/docs/_includes/options/core.html +++ /dev/null @@ -1,9 +0,0 @@ -
-

- Core options -

- - {% include options/core/options.html %} - {% include options/core/data-attributes.html %} - {% include options/core/amd-support.html %} -
\ No newline at end of file diff --git a/docs/_includes/options/core/amd-support.html b/docs/_includes/options/core/amd-support.html deleted file mode 100644 index 2475b013..00000000 --- a/docs/_includes/options/core/amd-support.html +++ /dev/null @@ -1,46 +0,0 @@ -
-

- Can I use Select2 with my AMD or CommonJS loader? -

- -

- Select2 should work with most AMD- or CommonJS-compliant module loaders, including RequireJS and almond. Select2 ships with a modified version of the UMD jQuery template that supports both CommonJS and AMD environments. -

- -

- How do I tell Select2 where to look for modules? -

- -

- For most AMD and CommonJS setups, the location of the data files used by Select2 will be automatically determined and handled without you needing to do anything. -

- -

- If you are using Select2 in a build environment where preexisting module names are changed during a build step, Select2 may not be able to find optional dependencies or language files. You can manually set the prefixes to use for these files using the amdBase and amdLanguageBase options. -

- -{% highlight js linenos %} -$.fn.select2.defaults.set('amdBase', 'select2/'); -$.fn.select2.defaults.set('amdLanguageBase', 'select2/i18n/'); -{% endhighlight %} - -

- Select2 is being placed before jQuery in my JavaScript file -

- -

- Due to a bug in older versions of the r.js build tool, Select2 was sometimes placed before jQuery in then compiled build file. Because of this, Select2 will trigger an error because it won't be able to find or load jQuery. -

- -

- By upgrading to version 2.1.18 or higher of the r.js build tool, you will be able to fix the issue. -

- -

- Should I point to the files in dist or src? -

- -

- Select2 internally uses AMD and the r.js build tool to build the files located in the dist folder. These are built using the files in the src folder, so you can just point your modules to the Select2 source and load in jquery.select2 or select2/core when you want to use Select2. The files located in the dist folder are also AMD-compatible, so you can point to that file if you want to load in all of the default Select2 modules. -

-
diff --git a/docs/_includes/options/core/data-attributes.html b/docs/_includes/options/core/data-attributes.html deleted file mode 100644 index db6078d9..00000000 --- a/docs/_includes/options/core/data-attributes.html +++ /dev/null @@ -1,76 +0,0 @@ -
-

- Can I declare my configuration within the HTML? -

- -

- It is recommended that you declare your configuration options for Select2 - when initializing Select2. You can also define your configuration options - by using the HTML5 data-* attributes, which will override - any options set when initializing Select2 and any defaults. -

- -

- How should camelCase options be written? -

- -

- HTML data attributes are case-insensitive, so any options which contain capital letters will be parsed as if they were all lowercase. Because Select2 has many options which are camelCase, where words are separated by uppercase letters, you must write these options out with dashes instead. So an option that would normally be called allowClear should instead be defined as allow-clear. -

- -

- This means that if you declare your <select> tag as... -

- -{% highlight html linenos %} - -{% endhighlight %} - -

- Will be interpreted the same as initializing Select2 as... -

- -{% highlight js linenos %} -$("select").select2({ - tags: "true", - placeholder: "Select an option", - allowClear: true -}); -{% endhighlight %} - -

- Are options with nested configurations supported? -

- -

- You can also define nested configurations, which are typically needed for - options such as AJAX. Each level of nesting should be separated by two - dashes (--) instead of one. Due to - a jQuery bug, - nested options using data-* attributes - do not work in jQuery 1.x. -

- -{% highlight html linenos %} - -{% endhighlight %} - -

- Which will be interpreted the same as initializing Select2 with... -

- -{% highlight js linenos %} -$("select").select2({ - ajax: { - url: "http://example.org/api/test", - cache: true - } -}); -{% endhighlight %} - -

- The value of the option is subject to jQuery's - parsing rules for - HTML5 data attributes. -

-
\ No newline at end of file diff --git a/docs/_includes/options/core/options.html b/docs/_includes/options/core/options.html deleted file mode 100644 index 5ff3f44d..00000000 --- a/docs/_includes/options/core/options.html +++ /dev/null @@ -1,80 +0,0 @@ -
-

- How should Select2 be initialized? -

- -

- Select2 will register itself as a jQuery function if you use any of the distribution builds, so you can call .select2() on any jQuery element where you would like to initialize Select2. -

- -{% highlight js linenos %} -$('select').select2(); -{% endhighlight %} - -

- You can optionally pass an object containing all of the options that you would like to initialize Select2 with. -

- -{% highlight js linenos %} -$('select').select2({ - placeholder: 'Select an option' -}); -{% endhighlight %} - -

- Can default options be set for all dropdowns? -

- -

- In some cases, you need to set the default options for all instances of - Select2 in your web application. This is especially useful when you are - migrating from past versions of Select2, or you are using non-standard - options like custom AMD builds. Select2 exposes the - default options through $.fn.select2.defaults, which allows - you to set them globally. -

- -

- When setting options globally, any past defaults that have been set will - be overridden. Default options are only used when an option is requested - that has not been set during initialization. -

- -

- You can set default options by calling - $.fn.select2.defaults.set("key", "value"). -

- -{% highlight js linenos %} -$.fn.select2.defaults.set("theme", "classic"); -{% endhighlight %} - -

- How can I set a default value for a nested option? -

- -

- The key that is - set should take the same format as keys set using - HTML data-* attributes which - means that two dashes (--) will be replaced by a level of - nesting, and a single dash (-) will convert it to a camelCase - string. -

- -{% highlight js linenos %} -$.fn.select2.defaults.set("ajax--cache", false); -{% endhighlight %} - -

- How can I reset all of the global default options? -

- -

- You can reset the default options to their initial values by calling -

- -{% highlight js linenos %} -$.fn.select2.defaults.reset(); -{% endhighlight %} -
diff --git a/docs/_includes/options/data.html b/docs/_includes/options/data.html deleted file mode 100644 index 4e53fbeb..00000000 --- a/docs/_includes/options/data.html +++ /dev/null @@ -1,10 +0,0 @@ -
-

- Data adapters -

- - {% include options/data/select.html %} - {% include options/data/array.html %} - {% include options/data/ajax.html %} - {% include options/data/selection-access.html %} -
\ No newline at end of file diff --git a/docs/_includes/options/data/ajax.html b/docs/_includes/options/data/ajax.html deleted file mode 100644 index efc65e3e..00000000 --- a/docs/_includes/options/data/ajax.html +++ /dev/null @@ -1,213 +0,0 @@ -
-

- Can Select2 be connected to a remote data source? -

- -

- Select2 supports connecting to a remote data source using the ajax option. -

- -

- How can I set the initially selected options when using AJAX? -

- -

- You can refer to the following Stack Overflow answer if you want to set the initial value for AJAX requests: Select2 4.0.0 initial value with AJAX -

- -

- What should the results returned to Select2 look like? -

- -

- The data returned by the data provider or by processResults should be a JSON object containing an array of objects keyed by the results key. -

-

- Each object should contain, at a minimum, an id and a text property. The text property will be displayed by default, unless you are using templateResult and templateSelection to customize the way options and selections are rendered. -

-

- The response object may also contain pagination data, if you would like to use the "infinite scroll" feature. See "What properties are required on the objects passed in to the array?" for more information. A complete example is as follows: -

-{% highlight json linenos %} -{ - "results": [ - { - "id": 1, - "text": "Option 1" - }, - { - "id": 2, - "text": "Option 2" - } - ], - "pagination": { - "more": true - } -} -{% endhighlight %} - -

Results for grouped options

- -

- When options are to be generated in <optgroup> sections, options should be nested under the children attribute of each group object: - -{% highlight json linenos %} -{ - "results": [ - { - "text": "Group 1", - "children" : [ - { - "id": 1, - "text": "Option 1.1" - } - { - "id": 2, - "text": "Option 1.2" - } - ] - }, - { - "text": "Group 2", - "children" : [ - { - "id": 3, - "text": "Option 2.1" - } - { - "id": 4, - "text": "Option 2.2" - } - ] - } - ], - "paginate": { - "more": true - } -} -{% endhighlight %} - -

- Is there a way to modify the response before passing it back to Select2? -

- -

- You can use the ajax.processResults option to modify the data returned from the server before passing it to Select2. The data structure returned by processResults should match the format as specified above. -

- -{% highlight js linenos %} -$('select').select2({ - ajax: { - url: '/example/api', - processResults: function (data) { - return { - results: data.items - }; - } - } -}); -{% endhighlight %} - -

- A request is being triggered on every key stroke, can I delay this? -

- -

- By default, Select2 will trigger a new AJAX request whenever the user changes their search term. You can set a time limit for debouncing requests using the ajax.delay option. -

- -{% highlight js linenos %} -$('select').select2({ - ajax: { - url: '/example/api', - delay: 250 - } -}); -{% endhighlight %} - -

- This will tell Select2 to wait 250 milliseconds before sending the request out to your API. -

- -

- How do I tell Select2 which URL to get the results from? -

- -

- When connecting Select2 to a remote data source, you have the option of using either a single endpoint (a single page which handles all requests) or a dynamic endpoint (one of many pages). You can point Select2 to a single endpoint during initialization by specifying a string for the ajax.url option. -

- -{% highlight js linenos %} -$('select').select2({ - ajax: { - url: '/path/to/search/endpoint' - } -}); -{% endhighlight %} - -

- If there isn't a single url for your search results, or you need to call a function to determine the url to use, you can specify a function for the ajax.url option, and this will be used instead. The query parameters will be passed in through the params option. -

- -{% highlight js linenos %} -$('select').select2({ - ajax: { - url: function (params) { - return '/some/url/' + params.term; - } - } -}); -{% endhighlight %} - -

- I want to add more query parameters to the request, where can this be done? -

- -

- By default, Select2 will send the query term as well as the pagination data as query parameters in requests. You can override the data that is sent to your API, or change any of the query parameters, by overriding the ajax.data option. -

- -{% highlight js linenos %} -$('select').select2({ - ajax: { - data: function (params) { - var query = { - search: params.term, - page: params.page - } - - // Query parameters will be ?search=[term]&page=[page] - return query; - } - } -}); -{% endhighlight %} - -

- The results that I am seeing never change -

- -

- Select2 expects that the results that are returned from the remote endpoint are already filtered ahead of time based on the search term. If your remote endpoint just returns the list of all possible options, you may be interested in using Select2's support for data arrays. -

- -

- Can an AJAX plugin other than jQuery.ajax be used? -

- -

- Select2 uses the transport method defined in ajax.transport to send requests to your API. By default, this transport method is jQuery.ajax but this can be changed. -

- -{% highlight js linenos %} -$('select').select2({ - ajax: { - transport: function (params, success, failure) { - var request = new AjaxRequest(params.url, params); - request.on('success', success); - request.on('failure', failure); - } - } -}); -{% endhighlight %} -
diff --git a/docs/_includes/options/data/array.html b/docs/_includes/options/data/array.html deleted file mode 100644 index f4d4d9e8..00000000 --- a/docs/_includes/options/data/array.html +++ /dev/null @@ -1,150 +0,0 @@ -
-

- Can I load data into Select2 using an array? -

- -

- While Select2 is designed to be used with a <select> tag - the data that is used to search through and display the results can be - loaded from a JavaScript array using the data option. This - option should be passed in during the initialization of Select2. -

- -{% highlight js linenos %} -$('select').select2({ - data: [ - { - id: 'value', - text: 'Text to display' - }, - // ... more data objects ... - ] -}); -{% endhighlight %} - -

- What properties are required on the objects passed in to the array? -

- -

- The id and text properties are required on each - object, and these are the properties that Select2 uses for the internal - data objects. Any additional paramters passed in with data objects will be - included on the data objects that Select2 exposes. -

- -

- Do the id properties have to be strings? -

- -

- Because the value attributes on a <select> - tag must be strings, the id property on the data objects must - also be strings. Select2 will attempt to convert anything that is not a - string to a string, which will work for most situations, but it is - recommended to force all of your ids to strings ahead of time. -

- -

- I can't select results with blank ids or an id of 0! -

- -

- See Do the id properties have to be strings?. -

- -

- How should nested results be formatted? -

- -

- Nested results should be specified using the children property - on the data objects that are passed in. This children property - should be an array of data objects that are grouped under this option, and - the label for the group should be specified as the text - property on the root data object. -

- -{% highlight js linenos %} -{ - text: 'Group label', - children: [ - { - id: 'nested-1', - text: 'First nested option' - }, - // ... more data objects ... - ] -} -{% endhighlight %} - -

- How many levels of nesting are allowed? -

- -

- Because Select2 falls back to an <optgroup> when - creating nested options, only - a single level of nesting - is supported. Any additional levels of nesting is not guaranteed to be - displayed properly across all browsers and devices. -

- -

- Why are <option> tags being created? -

- -

- The data option is a shortcut that Select2 provides which - allows you to load options into your select from a data array. -

- - {% include options/not-written.html %} - -

- My objects don't use id for their unique identifiers, - what can I do? -

- -

- Select2 requires that the id property is used to uniquely - identify the options that are displayed in the results list. If you use a - property other than id (like pk) to uniquely - identify an option, you need to map your old property to id - before passing it to Select2. -

- -

- If you cannot do this on your server or you are in a situation where the - identifier cannot be changed, you can do this in JavaScript before passing - it to Select2. -

- -{% highlight js linenos %} -var data = $.map(yourArrayData, function (obj) { - obj.id = obj.id || obj.pk; // replace pk with your identifier - - return obj; -}); -{% endhighlight %} - -

- My objects use a property other than text for the text that - needs to be displayed -

- -

- Just like with the id property, Select2 requires that the text - that should be displayed for an option is stored in the text - property. You can map this property from any existing property using the - following JavaScript. -

- -{% highlight js linenos %} -var data = $.map(yourArrayData, function (obj) { - obj.text = obj.text || obj.name; // replace name with the property used for the text - - return obj; -}); -{% endhighlight %} -
diff --git a/docs/_includes/options/data/select.html b/docs/_includes/options/data/select.html deleted file mode 100644 index 0e0c98f5..00000000 --- a/docs/_includes/options/data/select.html +++ /dev/null @@ -1,69 +0,0 @@ -
-

- Can Select2 be used with a <select> tag? -

- -

- Select2 was designed to be a replacement for the standard <select> boxes that are displayed by the browser, so by default it supports all options and operations that are available in a standard select box, but with added flexibility. There is no special configuration required to make Select2 work with a <select> tag. -

- -

- Does Select2 support nesting options? -

- -

- A standard <select> box can display nested options by wrapping them with in an <optgroup> tag. -

- -{% highlight html linenos %} - -{% endhighlight %} - -

- How many levels of nesting can there be? -

- -

- Only a single level of nesting is allowed per the HTML specification. If you nest an <optgroup> within another <optgroup>, Select2 will not be able to detect the extra level of nesting and errors may be triggered as a result. -

- -

- Can <optgroup> tags be made selectable? -

- -

- No. This is a limitation of the HTML specification and is not a limitation that Select2 can overcome. You can emulate grouping by using an <option> instead of an <optgroup> and changing the style by using CSS, but this is not recommended as it is not fully accessible. -

- -

- How are <option> and <optgroup> tags serialized into data objects? -

- -

- Select2 will convert the <option> tag into a data object based on the following rules. -

- -{% highlight txt linenos %} -{ - "id": "value attribute" || "option text", - "text": "label attribute" || "option text", - "element": HTMLOptionElement -} -{% endhighlight %} - -

- And <optgroup> tags will be converted into data objects using the following rules -

- -{% highlight txt linenos %} -{ - "text": "label attribute", - "children": [ option data object, ... ], - "element": HTMLOptGroupElement -} -{% endhighlight %} -
diff --git a/docs/_includes/options/data/selection-access.html b/docs/_includes/options/data/selection-access.html deleted file mode 100644 index a1559117..00000000 --- a/docs/_includes/options/data/selection-access.html +++ /dev/null @@ -1,49 +0,0 @@ -
-

- How to programmatically access a selection data? -

- -

- There are few ways to programmatically access the selection data. Calling select2('data') will return the JavaScript array of an objects representing the current selection. Each object will have properties/values which was in the source data objects passed through processResults and templateResult functions (as in Loading data from an array and Connecting to a remote data source). -

- -{% highlight js linenos %} -$('select').select2('data'); -{% endhighlight %} - -

- As Select2 uses the HTML <SELECT> element to store the selection result, the selection data are represented by <OPTION> elements and can be accessed in the plain jQuery/DOM manner: -

- -{% highlight js linenos %} -$('select').find(':selected'); -{% endhighlight %} - -

- It is possible to extend the <OPTION> elements representing selection with the HTML data-* attributes containing arbitrary data from the source data objects: -

- -{% highlight js linenos %} -$('select').select2({ - // ... - templateSelection: function (data, container) { - $(data.element).attr('data-custom-attribute', data.customValue); - return data.text; - } -}); - -// Retrieve custom attribute value of the first selected element -$('select').find(':selected').attr('data-custom-attribute') -{% endhighlight %} - -

- In addition, properties/values from source data objects can ba accessed from within an event handler: -

- -{% highlight js linenos %} -$('select').on('select2:select', function (event) { - console.log(event.params.data) -}); -{% endhighlight %} - -
\ No newline at end of file diff --git a/docs/_includes/options/dropdown.html b/docs/_includes/options/dropdown.html deleted file mode 100644 index 52d8ea25..00000000 --- a/docs/_includes/options/dropdown.html +++ /dev/null @@ -1,10 +0,0 @@ -
-

- Displaying results -

- - {% include options/dropdown/filtering.html %} - {% include options/dropdown/selections.html %} - {% include options/dropdown/tagging.html %} - {% include options/dropdown/placement.html %} -
\ No newline at end of file diff --git a/docs/_includes/options/dropdown/filtering.html b/docs/_includes/options/dropdown/filtering.html deleted file mode 100644 index 7e6bce75..00000000 --- a/docs/_includes/options/dropdown/filtering.html +++ /dev/null @@ -1,55 +0,0 @@ -
-

- Can I change when search results are loaded? -

- -

- Can Select2 wait until the user has typed a search term before triggering the request? -

- -{% highlight js linenos %} -$('select').select2({ - ajax: { - delay: 250 // wait 250 milliseconds before triggering the request - } -}); -{% endhighlight %} - - {% include options/not-written.html %} - -

- Select2 is allowing long search terms, can this be prevented? -

- -{% highlight js linenos %} -$('select').select2({ - maximumInputLength: 20 // only allow terms up to 20 characters long -}); -{% endhighlight %} - - {% include options/not-written.html %} - -

- I only want the search box if there are enough results -

- -{% highlight js linenos %} -$('select').select2({ - minimumResultsForSearch: 20 // at least 20 results must be displayed -}); -{% endhighlight %} - - {% include options/not-written.html %} - -

- How can I permanently hide the search box? -

- -{% highlight js linenos %} -$('select').select2({ - minimumResultsForSearch: Infinity -}); -{% endhighlight %} - - {% include options/not-written.html %} -
\ No newline at end of file diff --git a/docs/_includes/options/dropdown/placement.html b/docs/_includes/options/dropdown/placement.html deleted file mode 100644 index 1f78686c..00000000 --- a/docs/_includes/options/dropdown/placement.html +++ /dev/null @@ -1,39 +0,0 @@ -
-

- Can I change how the dropdown is placed? -

- - - - {% include options/not-written.html %} - - - -{% highlight js linenos %} -$('select').select2({ - dropdownParent: $('#my_amazing_modal') -}); -{% endhighlight %} - - {% include options/not-written.html %} - -

- I'm using a Bootstrap modal and I can't use the search box -

- -

- Use the dropdownParent option, setting it to the modal. -

- - {% include options/not-written.html %} - -

- I'm using jQuery UI and I can't use the search box -

- - {% include options/not-written.html %} -
\ No newline at end of file diff --git a/docs/_includes/options/dropdown/selections.html b/docs/_includes/options/dropdown/selections.html deleted file mode 100644 index 1c9f86e3..00000000 --- a/docs/_includes/options/dropdown/selections.html +++ /dev/null @@ -1,29 +0,0 @@ -
-

- Can I change how selecting results works? -

- -

- Can I select the highlighted result when the dropdown is closed? -

- -{% highlight js linenos %} -$('select').select2({ - selectOnClose: true -}); -{% endhighlight %} - - {% include options/not-written.html %} - -

- Can I prevent the dropdown from closing when a result is selected? -

- -{% highlight js linenos %} -$('select').select2({ - closeOnSelect: false -}); -{% endhighlight %} - - {% include options/not-written.html %} -
\ No newline at end of file diff --git a/docs/_includes/options/dropdown/tagging.html b/docs/_includes/options/dropdown/tagging.html deleted file mode 100644 index 43e1eb01..00000000 --- a/docs/_includes/options/dropdown/tagging.html +++ /dev/null @@ -1,89 +0,0 @@ -
-

- Can options be created based on the search term? -

- -

- How do I enable tagging? -

- -{% highlight js linenos %} -$('select').select2({ - tags: true -}); -{% endhighlight %} - - {% include options/not-written.html %} - -

- Does tagging work with a single select? -

- -

- Yes. -

- - {% include options/not-written.html %} - -

- How do I add extra properties to the tag? -

- -{% highlight js linenos %} -$('select').select2({ - createTag: function (params) { - var term = $.trim(params.term); - - if (term === '') { - return null; - } - - return { - id: term, - text: term, - newTag: true // add additional parameters - } - } -}); -{% endhighlight %} - - {% include options/not-written.html %} - -

- Can I control when tags are created? -

- -{% highlight js linenos %} -$('select').select2({ - createTag: function (params) { - // Don't offset to create a tag if there is no @ symbol - if (params.term.indexOf('@') === -1) { - // Return null to disable tag creation - return null; - } - - return { - id: params.term, - text: params.term - } - } -}); -{% endhighlight %} - - {% include options/not-written.html %} - -

- How do I control the placement of the option? -

- -{% highlight js linenos %} -$('select').select2({ - insertTag: function (data, tag) { - // Insert the tag at the end of the results - data.push(tag); - } -}); -{% endhighlight %} - - {% include options/not-written.html %} -
\ No newline at end of file diff --git a/docs/_includes/options/events.html b/docs/_includes/options/events.html deleted file mode 100644 index ea0dd2c1..00000000 --- a/docs/_includes/options/events.html +++ /dev/null @@ -1,8 +0,0 @@ -
-

- Events -

- - {% include options/events/jquery.html %} - {% include options/events/internal.html %} -
\ No newline at end of file diff --git a/docs/_includes/options/events/internal.html b/docs/_includes/options/events/internal.html deleted file mode 100644 index 219a4d02..00000000 --- a/docs/_includes/options/events/internal.html +++ /dev/null @@ -1,9 +0,0 @@ -
-

- Internal Select2 events -

- -

- Select2 has an internal event system that works independently of the DOM event system. This internal event system is only accessible from plugins and adapters that are connected to Select2. -

-
diff --git a/docs/_includes/options/events/jquery.html b/docs/_includes/options/events/jquery.html deleted file mode 100644 index 0c2bb225..00000000 --- a/docs/_includes/options/events/jquery.html +++ /dev/null @@ -1,101 +0,0 @@ -
-

- Public jQuery events -

- -

- What events will Select2 trigger? -

- -

- Select2 will trigger a few different events when different actions are taken using the component, allowing you to add custom hooks and perform actions. -

- -
-
change
-
Triggered whenever an option is selected or removed.
- -
select2:close
-
Triggered whenever the dropdown is closed.
- -
select2:closing
-
Triggered before the dropdown is closed. This event can be prevented.
- -
select2:open
-
Triggered whenever the dropdown is opened.
- -
select2:opening
-
Triggered before the dropdown is opened. This event can be prevented.
- -
select2:select
-
Triggered whenever a result is selected.
- -
select2:selecting
-
Triggered before a result is selected. This event can be prevented.
- -
select2:unselect
-
Triggered whenever a selection is removed.
- -
select2:unselecting
-
Triggered before a selection is removed. This event can be prevented.
-
- -

- Does Select2 include extra information in these events? -

- - {% include options/not-written.html %} - -

- How can I attach listeners for these events? -

- -{% highlight js linenos %} -$('select').on('select2:select', function (evt) { - // Do something -}); -{% endhighlight %} - - {% include options/not-written.html %} - -

- What events does Select2 listen for? -

- -

- Select2 will listen for the change event on the - <select> that it is attached to. If you make any - external changes that need to be reflected in Select2 (such as changing the - value), you should trigger this event. -

- -{% highlight js linenos %} -$('select').val('US'); // Select the option with a value of 'US' -$('select').trigger('change'); // Notify any JS components that the value changed -{% endhighlight %} - -

- Can I trigger an event other than change to notify Select2 of changes? -

- -

- It's common for other components to be listening to the change - event, or for custom event handlers to be attached that may have side - effects. Select2 does not have a custom event (like - select2:update) that can be triggered other than - change. You can rely on jQuery's event namespacing to limit - the scope to Select2 though by triggering the change.select2 - event. -

- -{% highlight js linenos %} -$('select').val('US'); // Change the value or make some change to the internal state -$('select').trigger('change.select2'); // Notify only Select2 of changes -{% endhighlight %} - -

- What events can be prevented? How can I prevent a selection from being made? -

- - {% include options/not-written.html %} -
\ No newline at end of file diff --git a/docs/_includes/options/introduction.html b/docs/_includes/options/introduction.html deleted file mode 100644 index 7cc343fc..00000000 --- a/docs/_includes/options/introduction.html +++ /dev/null @@ -1,9 +0,0 @@ -
-
- This page of the documentation is currently undergoing a rewrite and may be incomplete. If you do not find the answer you are looking for on this page, you may have better luck looking at the old options page. -
- -

- This documentation is set up in the form of a FAQ and covers the most common questions. If you do not find the answer to your question here, you may want to reach out to the community to see if someone else can answer it. -

-
\ No newline at end of file diff --git a/docs/_includes/options/not-written.html b/docs/_includes/options/not-written.html deleted file mode 100644 index b4967088..00000000 --- a/docs/_includes/options/not-written.html +++ /dev/null @@ -1,3 +0,0 @@ -
- This answer to this question has not yet been written. You can improve this documentation by creating a pull request with an answer to this question. -
\ No newline at end of file diff --git a/docs/_includes/options/selections.html b/docs/_includes/options/selections.html deleted file mode 100644 index 086c2aec..00000000 --- a/docs/_includes/options/selections.html +++ /dev/null @@ -1,10 +0,0 @@ -
-

- Displaying selections -

- - {% include options/selections/multiple.html %} - {% include options/selections/placeholder.html %} - {% include options/selections/clearing-selections.html %} - {% include options/selections/templating.html %} -
\ No newline at end of file diff --git a/docs/_includes/options/selections/clearing-selections.html b/docs/_includes/options/selections/clearing-selections.html deleted file mode 100644 index 41ca96a8..00000000 --- a/docs/_includes/options/selections/clearing-selections.html +++ /dev/null @@ -1,44 +0,0 @@ -
-

- Can I allow users to clear their selections? -

- -

- You can allow people to clear their current selections with the allowClear option when initializing Select2. Setting this option to true will enable an "x" icon that will reset the selection to the placeholder. -

- -{% highlight js linenos %} -$('select').select2({ - placeholder: 'This is my placeholder', - allowClear: true -}); -{% endhighlight %} - -

- Why is a placeholder required? -

- - {% include options/not-written.html %} - -

- The "x" icon is not clearing the selection -

- - {% include options/not-written.html %} - -

- Can users remove all of their selections in a multiple select at once? -

- -

- Yes, by setting the value of the control to null: -

- -{% highlight js linenos %} -$('select').val(null).trigger('change'); -{% endhighlight %} - -

- See https://select2.github.io/examples.html#programmatic for a working example. -

-
diff --git a/docs/_includes/options/selections/multiple.html b/docs/_includes/options/selections/multiple.html deleted file mode 100644 index 645a0b61..00000000 --- a/docs/_includes/options/selections/multiple.html +++ /dev/null @@ -1,17 +0,0 @@ -
-

- Can I allow users to make multiple selections? -

- -

- Yes, Select2 supports making multiple selections through the use of the multiple option that can be passed in when initializing Select2. -

- -

- Can the multiple attribute be used on my <select> element? -

- -

- Yes, Select2 will automatically map the value of the multiple attribute to the multiple option during initialization. -

-
\ No newline at end of file diff --git a/docs/_includes/options/selections/placeholder.html b/docs/_includes/options/selections/placeholder.html deleted file mode 100644 index 4d3728da..00000000 --- a/docs/_includes/options/selections/placeholder.html +++ /dev/null @@ -1,84 +0,0 @@ -
-

- How can I have Select2 display a placeholder? -

- -

- Select2 supports displaying a placeholder by default using the placeholder option. This can be either a data object matching the placeholder option, or a string to display as the placeholder if you are using a blank placeholder option. -

- -{% highlight js linenos %} -$('select').select2({ - placeholder: 'Select an option' -}); -{% endhighlight %} - -

- My first option is being displayed instead of my placeholder -

- -

- This usually means that you do not have a blank <option></option> as the first option in your <select>. -

- -

- Note that this does not apply to multiple selects, as the browser does not select the first option by default when multiple selections can be made. -

- -

- I am using AJAX, can I still show a placeholder? -

- -

- Yes, Select2 supports placeholders for all configurations. You will still need to add in the placeholder option if you are using a single select. -

- -

- Can I use an option without a blank value as my placeholder? -

- -

- The placeholder option allows you to pass in a data object instead of just a string if you need more flexibility. The id of the data object should match the value of the placeholder option. -

- -{% highlight js linenos %} -$('select').select2({ - placeholder: { - id: '-1', // the value of the option - text: 'Select an option' - } -}); -{% endhighlight %} - -

- Can I change how the placeholder looks? -

- -

- When using Select2 when only a single selection can be made, the placeholder option will be passed through the standard templating methods, including the templateSelection option, so you are able to change how it is displayed. -

- -{% highlight js linenos %} -$('select').select2({ - templateResult: function (data) { - if (data.id === '') { // adjust for custom placeholder values - return 'Custom styled placeholder text'; - } - - return data.text; - } -}); -{% endhighlight %} - -

- When multiple selections are allowed, the placeholder will be displayed using the placeholder attribute on the search box. You can customize the display of this placeholder using CSS, as explained in the following Stack Overflow answer: Change an input's HTML5 placeholder color with CSS -

- -

- My placeholders aren't being displayed in Internet Explorer -

- -

- Select2 uses the native placeholder attribute on input boxes for the multiple select, and that attribute is not supported in older versions of Internet Explorer. You need to include Placeholders.js on your page, or use the full build, in order to add placeholder attribute support to input boxes. -

-
diff --git a/docs/_includes/options/selections/templating.html b/docs/_includes/options/selections/templating.html deleted file mode 100644 index 6df19a32..00000000 --- a/docs/_includes/options/selections/templating.html +++ /dev/null @@ -1,50 +0,0 @@ -
-

- How can I customize the way selections are displayed? -

- -

- When a selection is made by the user Select2 will display the text of the option by default, just like how it is displayed in a standard select box. You can override the display of the selection by setting the templateSelection option to a JavaScript function. -

- -{% highlight js linenos %} -function template(data, container) { - return data.text; -} - -$('select').select2({ - templateSelection: template -}); -{% endhighlight %} - -

- Nothing is being displayed when I select an option -

- - {% include options/not-written.html %} - -

- I am using HTML in my selection template but it isn't displaying it -

- -

- If you want to use HTML in your selection template, you will need to return a jQuery object. Otherwise, Select2 will assume that your template only returns text and will escape it. -

- -{% highlight js linenos %} -function template(data, container) { - return $('') - .text(data.text); -} - -$('select').select2({ - templateSelection: template -}); -{% endhighlight %} - -

- How can I access the container where the selection is displayed? -

- - {% include options/not-written.html %} -
diff --git a/docs/_includes/social-buttons.html b/docs/_includes/social-buttons.html deleted file mode 100644 index bcf90cfd..00000000 --- a/docs/_includes/social-buttons.html +++ /dev/null @@ -1,10 +0,0 @@ -
- -
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html deleted file mode 100644 index 97bd9871..00000000 --- a/docs/_layouts/default.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - {% include head.html %} - - - {% include navigation.html %} - - {{ content }} - - {% include footer.html %} - - - - {% include ga.html %} - - diff --git a/docs/_layouts/home.html b/docs/_layouts/home.html deleted file mode 100644 index 0732b29f..00000000 --- a/docs/_layouts/home.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - {% include head.html %} - - - {% include navigation.html %} - - {{ content }} - - {% include footer.html %} - - - - {% include ga.html %} - - diff --git a/docs/_sass/_alert.scss b/docs/_sass/_alert.scss deleted file mode 100644 index cb5d54fd..00000000 --- a/docs/_sass/_alert.scss +++ /dev/null @@ -1,47 +0,0 @@ -// Alerts -// -// Modify Bootstrap's default alert styles to mimick -// the `.bs-callout` styles from Bootstrap's docs. -// -// @see https://github.com/twbs/bootstrap/blob/master/docs/assets/css/src/docs.css#L711 -// @see https://github.com/twbs/bootstrap/blob/master/less/alerts.less - -.alert { - background: #fff; - border: 1px solid #eee; - border-left-width: 5px; - border-radius: 3px; - color: #333; - margin: 20px 0; - padding: 20px; - - h4 { - font-size: 18px; - margin-top: 0; - margin-bottom: 5px; - } - - &-danger { - border-left-color: #ce4844; - - h4 { - color: #ce4844; - } - } - - &-info { - border-left-color: #1b809e; - - h4 { - color: #1b809e; - } - } - - &-warning { - border-left-color: #aa6708; - - h4 { - color: #aa6708; - } - } -} diff --git a/docs/_sass/_anchorjs.scss b/docs/_sass/_anchorjs.scss deleted file mode 100644 index 61900491..00000000 --- a/docs/_sass/_anchorjs.scss +++ /dev/null @@ -1,27 +0,0 @@ -// AnchorJS Styles - -.anchorjs-link { - color: inherit; - transition: all .16s linear; - text-decoration: none; - - &:link, - &:visited { - text-decoration: none; - color: inherit; - } - - @media (max-width: 480px) { - display: none; - } -} - -*:hover > .anchorjs-link { - opacity: .5; - margin-left: -0.9em !important; -} - -*:hover > .anchorjs-link:hover, -.anchorjs-link:focus { - opacity: 1; -} diff --git a/docs/_sass/_buttons.scss b/docs/_sass/_buttons.scss deleted file mode 100644 index 1ad81769..00000000 --- a/docs/_sass/_buttons.scss +++ /dev/null @@ -1,20 +0,0 @@ -// Buttons - -.btn-outline-inverse { - color: #428BCA; - background-color: transparent; - border-color: #428BCA; - padding: 15px 30px; - font-size: 20px; - transition: all .1s ease-in-out; - - &:hover { - color: #fff; - border-color: #428BCA; - background-color: #428BCA; - } -} - -.btn-toolbar { - margin-bottom: 20px; -} diff --git a/docs/_sass/_code.scss b/docs/_sass/_code.scss deleted file mode 100644 index ecd3aa97..00000000 --- a/docs/_sass/_code.scss +++ /dev/null @@ -1,16 +0,0 @@ -// Code (inline and block) - -// Inline code within headings retain the heading's background-color -h2 code, -h3 code, -h4 code { - background-color: inherit; -} - -// Modify Bootstrap's styles for blocks of code -pre.prettyprint { - padding: 9px 14px; - margin-bottom: 14px; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; -} \ No newline at end of file diff --git a/docs/_sass/_dl-panels.scss b/docs/_sass/_dl-panels.scss deleted file mode 100644 index 76d5151f..00000000 --- a/docs/_sass/_dl-panels.scss +++ /dev/null @@ -1,24 +0,0 @@ -.s2-docs-panels { - dt, dd { - border: 1px solid $panel-default-border; - } - - dt { - background-color: $panel-default-heading-bg; - border-top-left-radius: $panel-border-radius; - border-top-right-radius: $panel-border-radius; - padding: 5px 7.5px; - } - - dd { - background-color: $panel-bg; - border-bottom-left-radius: $panel-border-radius; - border-bottom-right-radius: $panel-border-radius; - margin-bottom: 0.75em; - padding: 7.5px; - } - - dt + dd { - border-top: none; - } -} \ No newline at end of file diff --git a/docs/_sass/_examples.scss b/docs/_sass/_examples.scss deleted file mode 100644 index 0af55914..00000000 --- a/docs/_sass/_examples.scss +++ /dev/null @@ -1,91 +0,0 @@ -// Examples -// -// Styles for the Select2 examples, largely copied -// from Bootstrap's docs styles. -// -// @see https://github.com/twbs/bootstrap/blob/master/docs/assets/css/src/docs.css#L533 - -.s2-example { - position: relative; - padding: 45px 15px 15px; - margin: 0 -15px 15px; - background-color: #fafafa; - box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.05); - border-color: #e5e5e5 #eee #eee; - border-style: solid; - border-width: 1px 0; - - &:after { - content: "Example"; - position: absolute; - top: 15px; - left: 15px; - font-size: 12px; - font-weight: bold; - color: #bbb; - text-transform: uppercase; - letter-spacing: 1px; - } - - @media (min-width: 768px) { - margin-left: 0; - margin-right: 0; - background-color: #fff; - border-width: 1px; - border-color: #eee; - border-radius: 4px 4px 0 0; - box-shadow: none; - } -} - -// styles for the event log in the "DOM events" section of the docs -.s2-event-log { - background: #002451; - color: white; - font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace; - margin: 0 -15px 15px; - padding: 45px 15px 15px; - position: relative; - - &:after { - content: "Event Log"; - position: absolute; - top: 15px; - left: 15px; - font-size: 12px; - font-weight: bold; - color: #BBB; - text-transform: uppercase; - letter-spacing: 1px; - } - - @media (min-width: 768px) { - margin-left: 0; - margin-right: 0; - margin-top: -15px; - border-width: 1px; - border-color: #eee; - box-shadow: none; - } -} - -.s2-example + pre, -.s2-example + figure, -.s2-event-log + pre { - margin: -15px -15px 15px; - border-radius: 0; - border-width: 0 0 1px; - - @media (min-width: 768px) { - margin-top: -16px; - margin-left: 0; - margin-right: 0; - border-width: 1px; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - } -} - -.s2-example + .s2-event-log { - margin-top: -15px; -} diff --git a/docs/_sass/_featurette.scss b/docs/_sass/_featurette.scss deleted file mode 100644 index 56eedf8c..00000000 --- a/docs/_sass/_featurette.scss +++ /dev/null @@ -1,16 +0,0 @@ -// Homepage featurettes - -.s2-docs-featurette { - color: #777; - padding: 15px 0; - text-align: center; - - h4 { - margin: 30px 0 15px; - } - - .fa { - font-size: 28px; - color: #777; - } -} diff --git a/docs/_sass/_footer.scss b/docs/_sass/_footer.scss deleted file mode 100644 index dfe5d40e..00000000 --- a/docs/_sass/_footer.scss +++ /dev/null @@ -1,42 +0,0 @@ -// Footer - -.s2-docs-footer { - border-top: 1px solid #eee; - color: #767676; - padding-top: 40px; - padding-bottom: 40px; - margin-top: 100px; - text-align: center; - - &-links { - padding-left: 0; - margin-top: 20px; - } - - &-links li { - display: inline; - padding: 0 2px; - - &:after { - content: "·"; - padding-left: 8px; - } - - &:first-child { - padding-left: 0; - } - - &:last-child:after { - content: ""; - padding-left: 0; - } - } - - @media (min-width: 768px) { - p { - margin-bottom: 0; - } - } -} - - diff --git a/docs/_sass/_hamburger.scss b/docs/_sass/_hamburger.scss deleted file mode 100644 index 759c53fc..00000000 --- a/docs/_sass/_hamburger.scss +++ /dev/null @@ -1,49 +0,0 @@ -// Animated hamburger icon -// -// Add an animation to Bootstrap's `.navbar-toggle` hamburger icon, -// courtesy of Julien Melissas. -// -// @see http://codepen.io/JulienMelissas/pen/LEBGLj -// @see http://julienmelissas.com/animated-x-icon-for-the-bootstrap-navbar-toggle/ - -.navbar-toggle { - border: none; - background: transparent !important; - - &:hover { - background: transparent !important; - } - - .icon-bar { - width: 22px; - transition: all 0.2s; - } - - .top-bar { - transform: rotate(45deg); - transform-origin: 10% 10%; - } - - .middle-bar { - opacity: 0; - } - - .bottom-bar { - transform: rotate(-45deg); - transform-origin: 10% 90%; - } - - &.collapsed { - .top-bar { - transform: rotate(0); - } - - .middle-bar { - opacity: 1; - } - - .bottom-bar { - transform: rotate(0); - } - } -} diff --git a/docs/_sass/_home.scss b/docs/_sass/_home.scss deleted file mode 100644 index 98530802..00000000 --- a/docs/_sass/_home.scss +++ /dev/null @@ -1,31 +0,0 @@ -// Homepage-specific styles - -.s2-docs-home { - .jumbotron { - margin-bottom: 0; - color: #000; - - h1 { - color: #000; - margin-top: 20px; - } - } - - .lead { - text-align: center; - max-width: 800px; - margin: 0 auto 40px; - } - - .notice-previous { - background: #f6f6f6; - color: #666; - border-bottom: 1px solid #eee; - padding: 15px 20px; - } - - .half-rule { - width: 100px; - margin: 40px auto; - } -} diff --git a/docs/_sass/_jumbotron.scss b/docs/_sass/_jumbotron.scss deleted file mode 100644 index 7b3cc5ee..00000000 --- a/docs/_sass/_jumbotron.scss +++ /dev/null @@ -1,24 +0,0 @@ -// Jumbotron -// -// Modify Bootstrap's default `.jumbotron` styles. - -.jumbotron { - background-color: #F6F6F6; - border-bottom: 1px solid #eee; - color: #777; - padding-left: 0; - padding-right: 0; - - h1 { - color: #777; - font-size: 36px; - margin-top: 10px; - } - - .version { - color: #999; - font-size: 14px; - font-weight: normal; - margin-bottom: 30px; - } -} diff --git a/docs/_sass/_layout.scss b/docs/_sass/_layout.scss deleted file mode 100644 index e53a648e..00000000 --- a/docs/_sass/_layout.scss +++ /dev/null @@ -1,14 +0,0 @@ -// Layout - -.s2-docs-container { - line-height: 1.6; -} - -section { - margin-bottom: 40px; -} - -.page-header { - padding-bottom: 19px; - margin-bottom: 29px; -} diff --git a/docs/_sass/_nav.scss b/docs/_sass/_nav.scss deleted file mode 100644 index 40fd17ce..00000000 --- a/docs/_sass/_nav.scss +++ /dev/null @@ -1,59 +0,0 @@ -// Main navigation -// -// Styles for the top `.navbar` and its dropdowns. - -.s2-docs-nav { - margin-bottom: 0; - border-color: #eee; - background-color: #f6f6f6; - - .navbar-brand { - font-weight: 500; - > img { - display: inline; - margin-right: 4px; - } - } - - .navbar-nav > .active > a, - .navbar-nav > .active > a:hover, - .navbar-nav > .active > a:focus { - background-color: #f0f0f0; - color: #000; - } - - @media (min-width: 768px) { - - .navbar-nav > li > .dropdown-menu:before { - position: absolute; - top: -21px; - left: 24px; - display: block; - width: 0; - height: 0; - border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0.1); - border-style: solid; - border-width: 10px; - content: ""; - } - - .navbar-nav > li > .dropdown-menu:after { - position: absolute; - top: -20px; - left: 24px; - display: block; - width: 0; - height: 0; - border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #FFF; - border-style: solid; - border-width: 10px; - content: ''; - } - - .navbar-nav .dropdown-menu { - border-radius: 4px; - border-color: #ddd; - margin-top: -1px; - } - } -} diff --git a/docs/_sass/_prettify.scss b/docs/_sass/_prettify.scss deleted file mode 100644 index 4b799d54..00000000 --- a/docs/_sass/_prettify.scss +++ /dev/null @@ -1,50 +0,0 @@ -// Google Code Prettify styles - -.com { - color: #999; -} -.lit { - color: #195f91; -} -.pun, .opn, .clo { - color: #93a1a1; -} -.fun { - color: #dc322f; -} -.str, .atv { - color: #C7254E; -} -.kwd, .prettyprint .tag { - color: #2F6F9F; -} -.typ, .atn, .dec, .var { - color: #428BCA; -} -.pln { - color: #333; -} - -.prettyprint { - padding: 9px 14px; - margin-bottom: 20px; - margin-top: 20px; - border: 1px solid #eee; - - &.linenums { - -webkit-box-shadow: inset 40px 0 0 #fbfbfb, inset 41px 0 0 #f6f6f6; - -moz-box-shadow: inset 40px 0 0 #fbfbfb, inset 41px 0 0 #f6f6f6; - box-shadow: inset 40px 0 0 #fbfbfb, inset 41px 0 0 #f6f6f6; - } -} - -// Specify class=linenums on a pre to get line numbering -ol.linenums { - margin: 0 0 0 -12px; - - li { - padding-left: 12px; - color: #bebebe; - line-height: 18px; - } -} diff --git a/docs/_sass/_result-repository.scss b/docs/_sass/_result-repository.scss deleted file mode 100644 index a4e256af..00000000 --- a/docs/_sass/_result-repository.scss +++ /dev/null @@ -1,62 +0,0 @@ -// Styles accompanying the "Loading remote data" example `templateResult - -.select2-result-repository { - padding-top: 4px; - padding-bottom: 3px; - - &__avatar { - float: left; - width: 60px; - margin-right: 10px; - - img { - width: 100%; - height: auto; - border-radius: 2px; - } - } - - &__meta { - margin-left: 70px; - } - - &__title { - color: black; - font-weight: bold; - word-wrap: break-word; - line-height: 1.1; - margin-bottom: 4px; - } - - &__forks, - &__stargazers { - margin-right: 1em; - } - - &__forks, - &__stargazers, - &__watchers { - display: inline-block; - color: #aaa; - font-size: 11px; - } - - &__description { - font-size: 13px; - color: #777; - margin-top: 4px; - } - - .select2-results__option--highlighted & { - &__title { - color: white; - } - - &__forks, - &__stargazers, - &__description, - &__watchers { - color: mix(#428BCA, white, 30%); - } - } -} diff --git a/docs/_sass/_sidenav.scss b/docs/_sass/_sidenav.scss deleted file mode 100644 index 3608c150..00000000 --- a/docs/_sass/_sidenav.scss +++ /dev/null @@ -1,152 +0,0 @@ -// Side navigation -// -// Scrollspy and affixed enhanced navigation to -// highlight sections and secondary sections of docs content`. - -.s2-docs-sidebar { - // By default it is not affixed in mobile views, so undo that - &.affix { - position: static; - } - - @media (min-width: 768px) { - padding-left: 20px; - } -} - -// First level of nav -.s2-docs-sidenav { - margin-top: 20px; - margin-bottom: 20px; -} - -// All levels of nav -.s2-docs-sidebar .nav { - > li > a { - margin-left: -1px; - display: block; - padding: 4px 20px; - font-size: 13px; - font-weight: 500; - color: #767676; - border-left: 1px solid transparent; - transition: color .2s, border-color .2s; - } - - > li > a code { - background-color: inherit; - color: inherit; - } - - > li > a:hover, - > li > a:focus { - color: #428BCA; - text-decoration: none; - background-color: transparent; - border-left-color: #428BCA; - } - - > .active > a, - > .active:hover > a, - > .active:focus > a { - padding-left: 19px; - font-weight: bold; - color: #428BCA; - background-color: transparent; - border-left: 2px solid #428BCA; - } - - // Nav: second level (shown on .active) - .nav { - display: none; // Hide by default, but at >768px, show it - padding-bottom: 10px; - } - - .nav > li > a { - padding-top: 1px; - padding-bottom: 1px; - padding-left: 30px; - font-size: 12px; - font-weight: normal; - } - - .nav > li > a:hover, - .nav > li > a:focus { - padding-left: 30px; - } - - .nav > .active > a, - .nav > .active:hover > a, - .nav > .active:focus > a { - padding-left: 29px; - font-weight: 400; - } -} - -// Show and affix the side nav when space allows it -@media (min-width: 992px) { - .s2-docs-sidebar .s2-docs-sidenav { - padding-top: 40px; - transition: border-color .2s; - border-left: 1px solid transparent; - } - - .s2-docs-sidebar.affix .s2-docs-sidenav { - border-left-color: #eee; - } - - .s2-docs-sidebar .nav > .active > ul { - display: block; - } - - // Widen the fixed sidebar - .s2-docs-sidebar.affix, - .s2-docs-sidebar.affix-bottom { - width: 213px; - } - - // Undo the static from mobile first approach - .s2-docs-sidebar.affix { - position: fixed; - top: 0px; - } - - // Undo the static from mobile first approach - .s2-docs-sidebar.affix-bottom { - position: absolute; - } - - .s2-docs-sidebar.affix-bottom .s2-docs-sidenav, - .s2-docs-sidebar.affix .s2-docs-sidenav { - margin-top: 0; - margin-bottom: 0; - } -} - -@media (min-width: 1200px) { - // Widen the fixed sidebar again - .s2-docs-sidebar.affix-bottom, - .s2-docs-sidebar.affix { - width: 263px; - } -} - -/* Back to top (hidden on mobile) */ -.back-to-top { - display: none; - padding: 4px 10px; - margin-top: 10px; - margin-left: 10px; - font-size: 12px; - font-weight: 400; - color: #999; - - &:hover { - color: #428BCA; - text-decoration: none; - } - - @media (min-width: 768px) { - display: block; - } -} diff --git a/docs/_sass/_social.scss b/docs/_sass/_social.scss deleted file mode 100644 index 0e8d0736..00000000 --- a/docs/_sass/_social.scss +++ /dev/null @@ -1,35 +0,0 @@ -// Social buttons -// -// Twitter and GitHub social action buttons. - -.s2-docs-social { - margin-bottom: 20px; - text-align: center; -} - -.s2-docs-social-buttons { - display: inline-block; - padding-left: 0; - margin-bottom: 0; - list-style: none; - - li { - display: inline-block; - padding: 5px 8px; - line-height: 1; - } - - .twitter-follow-button { - width: 225px !important; - } - - .twitter-share-button { - width: 98px !important; - } -} - -// Style the GitHub buttons via CSS instead of inline attributes -.github-btn { - overflow: hidden; - border: 0; -} diff --git a/docs/_sass/_syntax-highlighting.scss b/docs/_sass/_syntax-highlighting.scss deleted file mode 100644 index 9dca6bdc..00000000 --- a/docs/_sass/_syntax-highlighting.scss +++ /dev/null @@ -1,117 +0,0 @@ -// Jekyll syntax highlighting styles adjusted to match Google Code Prettify - -.highlight { - background: #fff; - - // Text - .nx { - color: #333; - } - - // Keywords and operators - .k, .o { - font-weight: bold; - } - - // Attribute name - .na { - color: #428BCA; - } - - // Strings - .s, .s1, .s2, .sb, .sc, .sd, .se, .sh, .si, .sx { - color: #C7254E; - } - - // Literals - .m, .mf, mh, .mi, .mo { - color: #195f91; - } - - // Parentheses - .p { - color: #93a1a1; - } - - // Tag - .nt { - color: #2F6F9F; - } - - // Comments - .c { - color: #999; - font-style: italic; - } - - // Error - .err { - background-color: #e3d2d2; - color: #a61717; - } - - // Generic error - .gr { - color: #a00; - } - - // Container styles - pre { - border: none; - margin: 0; - } - - & > pre { - border: 1px solid #eee; - padding: 0; - margin-bottom: 14px; - } - - // Line numbers - .lineno { - background-color: #fbfbfb; - color: #bebebe; - - -ms-user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - } -} - -.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ -.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ -.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ -.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gh { color: #999999 } /* Generic.Heading */ -.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ -.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ -.highlight .go { color: #888888 } /* Generic.Output */ -.highlight .gp { color: #555555 } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ -.highlight .gt { color: #aa0000 } /* Generic.Traceback */ -.highlight .kc { font-weight: bold } /* Keyword.Constant */ -.highlight .kd { font-weight: bold } /* Keyword.Declaration */ -.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ -.highlight .kr { font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ -.highlight .nb { color: #0086B3 } /* Name.Builtin */ -.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ -.highlight .no { color: #008080 } /* Name.Constant */ -.highlight .ni { color: #800080 } /* Name.Entity */ -.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ -.highlight .nn { color: #555555 } /* Name.Namespace */ -.highlight .nv { color: #008080 } /* Name.Variable */ -.highlight .ow { font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .sr { color: #009926 } /* Literal.String.Regex */ -.highlight .ss { color: #990073 } /* Literal.String.Symbol */ -.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ -.highlight .vc { color: #008080 } /* Name.Variable.Class */ -.highlight .vg { color: #008080 } /* Name.Variable.Global */ -.highlight .vi { color: #008080 } /* Name.Variable.Instance */ -.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/docs/_sass/_typography.scss b/docs/_sass/_typography.scss deleted file mode 100644 index 1046c994..00000000 --- a/docs/_sass/_typography.scss +++ /dev/null @@ -1,6 +0,0 @@ -// Typography - -h1[id] { - padding-top: 20px; - margin-top: 0; -} diff --git a/docs/_sass/vendor/bootstrap/_alerts.scss b/docs/_sass/vendor/bootstrap/_alerts.scss deleted file mode 100644 index 7d1e1fdd..00000000 --- a/docs/_sass/vendor/bootstrap/_alerts.scss +++ /dev/null @@ -1,73 +0,0 @@ -// -// Alerts -// -------------------------------------------------- - - -// Base styles -// ------------------------- - -.alert { - padding: $alert-padding; - margin-bottom: $line-height-computed; - border: 1px solid transparent; - border-radius: $alert-border-radius; - - // Headings for larger alerts - h4 { - margin-top: 0; - // Specified for the h4 to prevent conflicts of changing $headings-color - color: inherit; - } - - // Provide class for links that match alerts - .alert-link { - font-weight: $alert-link-font-weight; - } - - // Improve alignment and spacing of inner content - > p, - > ul { - margin-bottom: 0; - } - - > p + p { - margin-top: 5px; - } -} - -// Dismissible alerts -// -// Expand the right padding and account for the close button's positioning. - -.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. -.alert-dismissible { - padding-right: ($alert-padding + 20); - - // Adjust close link position - .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; - } -} - -// Alternate styles -// -// Generate contextual modifier classes for colorizing the alert. - -.alert-success { - @include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text); -} - -.alert-info { - @include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text); -} - -.alert-warning { - @include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text); -} - -.alert-danger { - @include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text); -} diff --git a/docs/_sass/vendor/bootstrap/_badges.scss b/docs/_sass/vendor/bootstrap/_badges.scss deleted file mode 100644 index 70002e08..00000000 --- a/docs/_sass/vendor/bootstrap/_badges.scss +++ /dev/null @@ -1,68 +0,0 @@ -// -// Badges -// -------------------------------------------------- - - -// Base class -.badge { - display: inline-block; - min-width: 10px; - padding: 3px 7px; - font-size: $font-size-small; - font-weight: $badge-font-weight; - color: $badge-color; - line-height: $badge-line-height; - vertical-align: middle; - white-space: nowrap; - text-align: center; - background-color: $badge-bg; - border-radius: $badge-border-radius; - - // Empty badges collapse automatically (not available in IE8) - &:empty { - display: none; - } - - // Quick fix for badges in buttons - .btn & { - position: relative; - top: -1px; - } - - .btn-xs &, - .btn-group-xs > .btn & { - top: 0; - padding: 1px 5px; - } - - // [converter] extracted a& to a.badge - - // Account for badges in navs - .list-group-item.active > &, - .nav-pills > .active > a > & { - color: $badge-active-color; - background-color: $badge-active-bg; - } - - .list-group-item > & { - float: right; - } - - .list-group-item > & + & { - margin-right: 5px; - } - - .nav-pills > li > a > & { - margin-left: 3px; - } -} - -// Hover state, but only for links -a.badge { - &:hover, - &:focus { - color: $badge-link-hover-color; - text-decoration: none; - cursor: pointer; - } -} diff --git a/docs/_sass/vendor/bootstrap/_breadcrumbs.scss b/docs/_sass/vendor/bootstrap/_breadcrumbs.scss deleted file mode 100644 index b61f0c73..00000000 --- a/docs/_sass/vendor/bootstrap/_breadcrumbs.scss +++ /dev/null @@ -1,28 +0,0 @@ -// -// Breadcrumbs -// -------------------------------------------------- - - -.breadcrumb { - padding: $breadcrumb-padding-vertical $breadcrumb-padding-horizontal; - margin-bottom: $line-height-computed; - list-style: none; - background-color: $breadcrumb-bg; - border-radius: $border-radius-base; - - > li { - display: inline-block; - - + li:before { - // [converter] Workaround for https://github.com/sass/libsass/issues/1115 - $nbsp: "\00a0"; - content: "#{$breadcrumb-separator}#{$nbsp}"; // Unicode space added since inline-block means non-collapsing white-space - padding: 0 5px; - color: $breadcrumb-color; - } - } - - > .active { - color: $breadcrumb-active-color; - } -} diff --git a/docs/_sass/vendor/bootstrap/_button-groups.scss b/docs/_sass/vendor/bootstrap/_button-groups.scss deleted file mode 100644 index baaacc44..00000000 --- a/docs/_sass/vendor/bootstrap/_button-groups.scss +++ /dev/null @@ -1,244 +0,0 @@ -// -// Button groups -// -------------------------------------------------- - -// Make the div behave like a button -.btn-group, -.btn-group-vertical { - position: relative; - display: inline-block; - vertical-align: middle; // match .btn alignment given font-size hack above - > .btn { - position: relative; - float: left; - // Bring the "active" button to the front - &:hover, - &:focus, - &:active, - &.active { - z-index: 2; - } - } -} - -// Prevent double borders when buttons are next to each other -.btn-group { - .btn + .btn, - .btn + .btn-group, - .btn-group + .btn, - .btn-group + .btn-group { - margin-left: -1px; - } -} - -// Optional: Group multiple button groups together for a toolbar -.btn-toolbar { - margin-left: -5px; // Offset the first child's margin - @include clearfix; - - .btn, - .btn-group, - .input-group { - float: left; - } - > .btn, - > .btn-group, - > .input-group { - margin-left: 5px; - } -} - -.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { - border-radius: 0; -} - -// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match -.btn-group > .btn:first-child { - margin-left: 0; - &:not(:last-child):not(.dropdown-toggle) { - @include border-right-radius(0); - } -} -// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it -.btn-group > .btn:last-child:not(:first-child), -.btn-group > .dropdown-toggle:not(:first-child) { - @include border-left-radius(0); -} - -// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group) -.btn-group > .btn-group { - float: left; -} -.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group > .btn-group:first-child:not(:last-child) { - > .btn:last-child, - > .dropdown-toggle { - @include border-right-radius(0); - } -} -.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { - @include border-left-radius(0); -} - -// On active and open, don't show outline -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} - - -// Sizing -// -// Remix the default button sizing classes into new ones for easier manipulation. - -.btn-group-xs > .btn { @extend .btn-xs; } -.btn-group-sm > .btn { @extend .btn-sm; } -.btn-group-lg > .btn { @extend .btn-lg; } - - -// Split button dropdowns -// ---------------------- - -// Give the line between buttons some depth -.btn-group > .btn + .dropdown-toggle { - padding-left: 8px; - padding-right: 8px; -} -.btn-group > .btn-lg + .dropdown-toggle { - padding-left: 12px; - padding-right: 12px; -} - -// The clickable button for toggling the menu -// Remove the gradient and set the same inset shadow as the :active state -.btn-group.open .dropdown-toggle { - @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); - - // Show no shadow for `.btn-link` since it has no other button styles. - &.btn-link { - @include box-shadow(none); - } -} - - -// Reposition the caret -.btn .caret { - margin-left: 0; -} -// Carets in other button sizes -.btn-lg .caret { - border-width: $caret-width-large $caret-width-large 0; - border-bottom-width: 0; -} -// Upside down carets for .dropup -.dropup .btn-lg .caret { - border-width: 0 $caret-width-large $caret-width-large; -} - - -// Vertical button groups -// ---------------------- - -.btn-group-vertical { - > .btn, - > .btn-group, - > .btn-group > .btn { - display: block; - float: none; - width: 100%; - max-width: 100%; - } - - // Clear floats so dropdown menus can be properly placed - > .btn-group { - @include clearfix; - > .btn { - float: none; - } - } - - > .btn + .btn, - > .btn + .btn-group, - > .btn-group + .btn, - > .btn-group + .btn-group { - margin-top: -1px; - margin-left: 0; - } -} - -.btn-group-vertical > .btn { - &:not(:first-child):not(:last-child) { - border-radius: 0; - } - &:first-child:not(:last-child) { - @include border-top-radius($btn-border-radius-base); - @include border-bottom-radius(0); - } - &:last-child:not(:first-child) { - @include border-top-radius(0); - @include border-bottom-radius($btn-border-radius-base); - } -} -.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group-vertical > .btn-group:first-child:not(:last-child) { - > .btn:last-child, - > .dropdown-toggle { - @include border-bottom-radius(0); - } -} -.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - @include border-top-radius(0); -} - - -// Justified button groups -// ---------------------- - -.btn-group-justified { - display: table; - width: 100%; - table-layout: fixed; - border-collapse: separate; - > .btn, - > .btn-group { - float: none; - display: table-cell; - width: 1%; - } - > .btn-group .btn { - width: 100%; - } - - > .btn-group .dropdown-menu { - left: auto; - } -} - - -// Checkbox and radio options -// -// In order to support the browser's form validation feedback, powered by the -// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use -// `display: none;` or `visibility: hidden;` as that also hides the popover. -// Simply visually hiding the inputs via `opacity` would leave them clickable in -// certain cases which is prevented by using `clip` and `pointer-events`. -// This way, we ensure a DOM element is visible to position the popover from. -// -// See https://github.com/twbs/bootstrap/pull/12794 and -// https://github.com/twbs/bootstrap/pull/14559 for more information. - -[data-toggle="buttons"] { - > .btn, - > .btn-group > .btn { - input[type="radio"], - input[type="checkbox"] { - position: absolute; - clip: rect(0,0,0,0); - pointer-events: none; - } - } -} diff --git a/docs/_sass/vendor/bootstrap/_buttons.scss b/docs/_sass/vendor/bootstrap/_buttons.scss deleted file mode 100644 index 6452b709..00000000 --- a/docs/_sass/vendor/bootstrap/_buttons.scss +++ /dev/null @@ -1,168 +0,0 @@ -// -// Buttons -// -------------------------------------------------- - - -// Base styles -// -------------------------------------------------- - -.btn { - display: inline-block; - margin-bottom: 0; // For input.btn - font-weight: $btn-font-weight; - text-align: center; - vertical-align: middle; - touch-action: manipulation; - cursor: pointer; - background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 - border: 1px solid transparent; - white-space: nowrap; - @include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $btn-border-radius-base); - @include user-select(none); - - &, - &:active, - &.active { - &:focus, - &.focus { - @include tab-focus; - } - } - - &:hover, - &:focus, - &.focus { - color: $btn-default-color; - text-decoration: none; - } - - &:active, - &.active { - outline: 0; - background-image: none; - @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); - } - - &.disabled, - &[disabled], - fieldset[disabled] & { - cursor: $cursor-disabled; - @include opacity(.65); - @include box-shadow(none); - } - - // [converter] extracted a& to a.btn -} - -a.btn { - &.disabled, - fieldset[disabled] & { - pointer-events: none; // Future-proof disabling of clicks on `` elements - } -} - - -// Alternate buttons -// -------------------------------------------------- - -.btn-default { - @include button-variant($btn-default-color, $btn-default-bg, $btn-default-border); -} -.btn-primary { - @include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border); -} -// Success appears as green -.btn-success { - @include button-variant($btn-success-color, $btn-success-bg, $btn-success-border); -} -// Info appears as blue-green -.btn-info { - @include button-variant($btn-info-color, $btn-info-bg, $btn-info-border); -} -// Warning appears as orange -.btn-warning { - @include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border); -} -// Danger and error appear as red -.btn-danger { - @include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border); -} - - -// Link buttons -// ------------------------- - -// Make a button look and behave like a link -.btn-link { - color: $link-color; - font-weight: normal; - border-radius: 0; - - &, - &:active, - &.active, - &[disabled], - fieldset[disabled] & { - background-color: transparent; - @include box-shadow(none); - } - &, - &:hover, - &:focus, - &:active { - border-color: transparent; - } - &:hover, - &:focus { - color: $link-hover-color; - text-decoration: $link-hover-decoration; - background-color: transparent; - } - &[disabled], - fieldset[disabled] & { - &:hover, - &:focus { - color: $btn-link-disabled-color; - text-decoration: none; - } - } -} - - -// Button Sizes -// -------------------------------------------------- - -.btn-lg { - // line-height: ensure even-numbered height of button next to large input - @include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $btn-border-radius-large); -} -.btn-sm { - // line-height: ensure proper height of button next to small input - @include button-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $btn-border-radius-small); -} -.btn-xs { - @include button-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-small, $line-height-small, $btn-border-radius-small); -} - - -// Block button -// -------------------------------------------------- - -.btn-block { - display: block; - width: 100%; -} - -// Vertically space out multiple block buttons -.btn-block + .btn-block { - margin-top: 5px; -} - -// Specificity overrides -input[type="submit"], -input[type="reset"], -input[type="button"] { - &.btn-block { - width: 100%; - } -} diff --git a/docs/_sass/vendor/bootstrap/_carousel.scss b/docs/_sass/vendor/bootstrap/_carousel.scss deleted file mode 100644 index 753d881f..00000000 --- a/docs/_sass/vendor/bootstrap/_carousel.scss +++ /dev/null @@ -1,270 +0,0 @@ -// -// Carousel -// -------------------------------------------------- - - -// Wrapper for the slide container and indicators -.carousel { - position: relative; -} - -.carousel-inner { - position: relative; - overflow: hidden; - width: 100%; - - > .item { - display: none; - position: relative; - @include transition(.6s ease-in-out left); - - // Account for jankitude on images - > img, - > a > img { - @include img-responsive; - line-height: 1; - } - - // WebKit CSS3 transforms for supported devices - @media all and (transform-3d), (-webkit-transform-3d) { - @include transition-transform(0.6s ease-in-out); - @include backface-visibility(hidden); - @include perspective(1000px); - - &.next, - &.active.right { - @include translate3d(100%, 0, 0); - left: 0; - } - &.prev, - &.active.left { - @include translate3d(-100%, 0, 0); - left: 0; - } - &.next.left, - &.prev.right, - &.active { - @include translate3d(0, 0, 0); - left: 0; - } - } - } - - > .active, - > .next, - > .prev { - display: block; - } - - > .active { - left: 0; - } - - > .next, - > .prev { - position: absolute; - top: 0; - width: 100%; - } - - > .next { - left: 100%; - } - > .prev { - left: -100%; - } - > .next.left, - > .prev.right { - left: 0; - } - - > .active.left { - left: -100%; - } - > .active.right { - left: 100%; - } - -} - -// Left/right controls for nav -// --------------------------- - -.carousel-control { - position: absolute; - top: 0; - left: 0; - bottom: 0; - width: $carousel-control-width; - @include opacity($carousel-control-opacity); - font-size: $carousel-control-font-size; - color: $carousel-control-color; - text-align: center; - text-shadow: $carousel-text-shadow; - background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug - // We can't have this transition here because WebKit cancels the carousel - // animation if you trip this while in the middle of another animation. - - // Set gradients for backgrounds - &.left { - @include gradient-horizontal($start-color: rgba(0,0,0,.5), $end-color: rgba(0,0,0,.0001)); - } - &.right { - left: auto; - right: 0; - @include gradient-horizontal($start-color: rgba(0,0,0,.0001), $end-color: rgba(0,0,0,.5)); - } - - // Hover/focus state - &:hover, - &:focus { - outline: 0; - color: $carousel-control-color; - text-decoration: none; - @include opacity(.9); - } - - // Toggles - .icon-prev, - .icon-next, - .glyphicon-chevron-left, - .glyphicon-chevron-right { - position: absolute; - top: 50%; - margin-top: -10px; - z-index: 5; - display: inline-block; - } - .icon-prev, - .glyphicon-chevron-left { - left: 50%; - margin-left: -10px; - } - .icon-next, - .glyphicon-chevron-right { - right: 50%; - margin-right: -10px; - } - .icon-prev, - .icon-next { - width: 20px; - height: 20px; - line-height: 1; - font-family: serif; - } - - - .icon-prev { - &:before { - content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) - } - } - .icon-next { - &:before { - content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A) - } - } -} - -// Optional indicator pips -// -// Add an unordered list with the following class and add a list item for each -// slide your carousel holds. - -.carousel-indicators { - position: absolute; - bottom: 10px; - left: 50%; - z-index: 15; - width: 60%; - margin-left: -30%; - padding-left: 0; - list-style: none; - text-align: center; - - li { - display: inline-block; - width: 10px; - height: 10px; - margin: 1px; - text-indent: -999px; - border: 1px solid $carousel-indicator-border-color; - border-radius: 10px; - cursor: pointer; - - // IE8-9 hack for event handling - // - // Internet Explorer 8-9 does not support clicks on elements without a set - // `background-color`. We cannot use `filter` since that's not viewed as a - // background color by the browser. Thus, a hack is needed. - // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer - // - // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we - // set alpha transparency for the best results possible. - background-color: #000 \9; // IE8 - background-color: rgba(0,0,0,0); // IE9 - } - .active { - margin: 0; - width: 12px; - height: 12px; - background-color: $carousel-indicator-active-bg; - } -} - -// Optional captions -// ----------------------------- -// Hidden by default for smaller viewports -.carousel-caption { - position: absolute; - left: 15%; - right: 15%; - bottom: 20px; - z-index: 10; - padding-top: 20px; - padding-bottom: 20px; - color: $carousel-caption-color; - text-align: center; - text-shadow: $carousel-text-shadow; - & .btn { - text-shadow: none; // No shadow for button elements in carousel-caption - } -} - - -// Scale up controls for tablets and up -@media screen and (min-width: $screen-sm-min) { - - // Scale up the controls a smidge - .carousel-control { - .glyphicon-chevron-left, - .glyphicon-chevron-right, - .icon-prev, - .icon-next { - width: ($carousel-control-font-size * 1.5); - height: ($carousel-control-font-size * 1.5); - margin-top: ($carousel-control-font-size / -2); - font-size: ($carousel-control-font-size * 1.5); - } - .glyphicon-chevron-left, - .icon-prev { - margin-left: ($carousel-control-font-size / -2); - } - .glyphicon-chevron-right, - .icon-next { - margin-right: ($carousel-control-font-size / -2); - } - } - - // Show and left align the captions - .carousel-caption { - left: 20%; - right: 20%; - padding-bottom: 30px; - } - - // Move up the indicators - .carousel-indicators { - bottom: 20px; - } -} diff --git a/docs/_sass/vendor/bootstrap/_close.scss b/docs/_sass/vendor/bootstrap/_close.scss deleted file mode 100644 index 3b74d8a9..00000000 --- a/docs/_sass/vendor/bootstrap/_close.scss +++ /dev/null @@ -1,36 +0,0 @@ -// -// Close icons -// -------------------------------------------------- - - -.close { - float: right; - font-size: ($font-size-base * 1.5); - font-weight: $close-font-weight; - line-height: 1; - color: $close-color; - text-shadow: $close-text-shadow; - @include opacity(.2); - - &:hover, - &:focus { - color: $close-color; - text-decoration: none; - cursor: pointer; - @include opacity(.5); - } - - // [converter] extracted button& to button.close -} - -// Additional properties for button version -// iOS requires the button element instead of an anchor tag. -// If you want the anchor version, it requires `href="#"`. -// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} diff --git a/docs/_sass/vendor/bootstrap/_code.scss b/docs/_sass/vendor/bootstrap/_code.scss deleted file mode 100644 index caa5f063..00000000 --- a/docs/_sass/vendor/bootstrap/_code.scss +++ /dev/null @@ -1,69 +0,0 @@ -// -// Code (inline and block) -// -------------------------------------------------- - - -// Inline and block code styles -code, -kbd, -pre, -samp { - font-family: $font-family-monospace; -} - -// Inline code -code { - padding: 2px 4px; - font-size: 90%; - color: $code-color; - background-color: $code-bg; - border-radius: $border-radius-base; -} - -// User input typically entered via keyboard -kbd { - padding: 2px 4px; - font-size: 90%; - color: $kbd-color; - background-color: $kbd-bg; - border-radius: $border-radius-small; - box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); - - kbd { - padding: 0; - font-size: 100%; - font-weight: bold; - box-shadow: none; - } -} - -// Blocks of code -pre { - display: block; - padding: (($line-height-computed - 1) / 2); - margin: 0 0 ($line-height-computed / 2); - font-size: ($font-size-base - 1); // 14px to 13px - line-height: $line-height-base; - word-break: break-all; - word-wrap: break-word; - color: $pre-color; - background-color: $pre-bg; - border: 1px solid $pre-border-color; - border-radius: $border-radius-base; - - // Account for some code outputs that place code tags in pre tags - code { - padding: 0; - font-size: inherit; - color: inherit; - white-space: pre-wrap; - background-color: transparent; - border-radius: 0; - } -} - -// Enable scrollable blocks of code -.pre-scrollable { - max-height: $pre-scrollable-max-height; - overflow-y: scroll; -} diff --git a/docs/_sass/vendor/bootstrap/_component-animations.scss b/docs/_sass/vendor/bootstrap/_component-animations.scss deleted file mode 100644 index ca3b43ca..00000000 --- a/docs/_sass/vendor/bootstrap/_component-animations.scss +++ /dev/null @@ -1,37 +0,0 @@ -// -// Component animations -// -------------------------------------------------- - -// Heads up! -// -// We don't use the `.opacity()` mixin here since it causes a bug with text -// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. - -.fade { - opacity: 0; - @include transition(opacity .15s linear); - &.in { - opacity: 1; - } -} - -.collapse { - display: none; - - &.in { display: block; } - // [converter] extracted tr&.in to tr.collapse.in - // [converter] extracted tbody&.in to tbody.collapse.in -} - -tr.collapse.in { display: table-row; } - -tbody.collapse.in { display: table-row-group; } - -.collapsing { - position: relative; - height: 0; - overflow: hidden; - @include transition-property(height, visibility); - @include transition-duration(.35s); - @include transition-timing-function(ease); -} diff --git a/docs/_sass/vendor/bootstrap/_dropdowns.scss b/docs/_sass/vendor/bootstrap/_dropdowns.scss deleted file mode 100644 index aac84597..00000000 --- a/docs/_sass/vendor/bootstrap/_dropdowns.scss +++ /dev/null @@ -1,216 +0,0 @@ -// -// Dropdown menus -// -------------------------------------------------- - - -// Dropdown arrow/caret -.caret { - display: inline-block; - width: 0; - height: 0; - margin-left: 2px; - vertical-align: middle; - border-top: $caret-width-base dashed; - border-top: $caret-width-base solid \9; // IE8 - border-right: $caret-width-base solid transparent; - border-left: $caret-width-base solid transparent; -} - -// The dropdown wrapper (div) -.dropup, -.dropdown { - position: relative; -} - -// Prevent the focus on the dropdown toggle when closing dropdowns -.dropdown-toggle:focus { - outline: 0; -} - -// The dropdown menu (ul) -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: $zindex-dropdown; - display: none; // none by default, but block on "open" of the menu - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; // override default ul - list-style: none; - font-size: $font-size-base; - text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) - background-color: $dropdown-bg; - border: 1px solid $dropdown-fallback-border; // IE8 fallback - border: 1px solid $dropdown-border; - border-radius: $border-radius-base; - @include box-shadow(0 6px 12px rgba(0,0,0,.175)); - background-clip: padding-box; - - // Aligns the dropdown menu to right - // - // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]` - &.pull-right { - right: 0; - left: auto; - } - - // Dividers (basically an hr) within the dropdown - .divider { - @include nav-divider($dropdown-divider-bg); - } - - // Links within the dropdown menu - > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: $line-height-base; - color: $dropdown-link-color; - white-space: nowrap; // prevent links from randomly breaking onto new lines - } -} - -// Hover/Focus state -.dropdown-menu > li > a { - &:hover, - &:focus { - text-decoration: none; - color: $dropdown-link-hover-color; - background-color: $dropdown-link-hover-bg; - } -} - -// Active state -.dropdown-menu > .active > a { - &, - &:hover, - &:focus { - color: $dropdown-link-active-color; - text-decoration: none; - outline: 0; - background-color: $dropdown-link-active-bg; - } -} - -// Disabled state -// -// Gray out text and ensure the hover/focus state remains gray - -.dropdown-menu > .disabled > a { - &, - &:hover, - &:focus { - color: $dropdown-link-disabled-color; - } - - // Nuke hover/focus effects - &:hover, - &:focus { - text-decoration: none; - background-color: transparent; - background-image: none; // Remove CSS gradient - @include reset-filter; - cursor: $cursor-disabled; - } -} - -// Open state for the dropdown -.open { - // Show the menu - > .dropdown-menu { - display: block; - } - - // Remove the outline when :focus is triggered - > a { - outline: 0; - } -} - -// Menu positioning -// -// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown -// menu with the parent. -.dropdown-menu-right { - left: auto; // Reset the default from `.dropdown-menu` - right: 0; -} -// With v3, we enabled auto-flipping if you have a dropdown within a right -// aligned nav component. To enable the undoing of that, we provide an override -// to restore the default dropdown menu alignment. -// -// This is only for left-aligning a dropdown menu within a `.navbar-right` or -// `.pull-right` nav component. -.dropdown-menu-left { - left: 0; - right: auto; -} - -// Dropdown section headers -.dropdown-header { - display: block; - padding: 3px 20px; - font-size: $font-size-small; - line-height: $line-height-base; - color: $dropdown-header-color; - white-space: nowrap; // as with > li > a -} - -// Backdrop to catch body clicks on mobile, etc. -.dropdown-backdrop { - position: fixed; - left: 0; - right: 0; - bottom: 0; - top: 0; - z-index: ($zindex-dropdown - 10); -} - -// Right aligned dropdowns -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} - -// Allow for dropdowns to go bottom up (aka, dropup-menu) -// -// Just add .dropup after the standard .dropdown class and you're set, bro. -// TODO: abstract this so that the navbar fixed styles are not placed here? - -.dropup, -.navbar-fixed-bottom .dropdown { - // Reverse the caret - .caret { - border-top: 0; - border-bottom: $caret-width-base dashed; - border-bottom: $caret-width-base solid \9; // IE8 - content: ""; - } - // Different positioning for bottom up menu - .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 2px; - } -} - - -// Component alignment -// -// Reiterate per navbar.less and the modified component alignment there. - -@media (min-width: $grid-float-breakpoint) { - .navbar-right { - .dropdown-menu { - right: 0; left: auto; - } - // Necessary for overrides of the default right aligned menu. - // Will remove come v4 in all likelihood. - .dropdown-menu-left { - left: 0; right: auto; - } - } -} diff --git a/docs/_sass/vendor/bootstrap/_forms.scss b/docs/_sass/vendor/bootstrap/_forms.scss deleted file mode 100644 index 11ba1096..00000000 --- a/docs/_sass/vendor/bootstrap/_forms.scss +++ /dev/null @@ -1,617 +0,0 @@ -// -// Forms -// -------------------------------------------------- - - -// Normalize non-controls -// -// Restyle and baseline non-control form elements. - -fieldset { - padding: 0; - margin: 0; - border: 0; - // Chrome and Firefox set a `min-width: min-content;` on fieldsets, - // so we reset that to ensure it behaves more like a standard block element. - // See https://github.com/twbs/bootstrap/issues/12359. - min-width: 0; -} - -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: $line-height-computed; - font-size: ($font-size-base * 1.5); - line-height: inherit; - color: $legend-color; - border: 0; - border-bottom: 1px solid $legend-border-color; -} - -label { - display: inline-block; - max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141) - margin-bottom: 5px; - font-weight: bold; -} - - -// Normalize form controls -// -// While most of our form styles require extra classes, some basic normalization -// is required to ensure optimum display with or without those classes to better -// address browser inconsistencies. - -// Override content-box in Normalize (* isn't specific enough) -input[type="search"] { - @include box-sizing(border-box); -} - -// Position radios and checkboxes better -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; // IE8-9 - line-height: normal; -} - -input[type="file"] { - display: block; -} - -// Make range inputs behave like textual form controls -input[type="range"] { - display: block; - width: 100%; -} - -// Make multiple select elements height not fixed -select[multiple], -select[size] { - height: auto; -} - -// Focus for file, radio, and checkbox -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - @include tab-focus; -} - -// Adjust output element -output { - display: block; - padding-top: ($padding-base-vertical + 1); - font-size: $font-size-base; - line-height: $line-height-base; - color: $input-color; -} - - -// Common form controls -// -// Shared size and type resets for form controls. Apply `.form-control` to any -// of the following form controls: -// -// select -// textarea -// input[type="text"] -// input[type="password"] -// input[type="datetime"] -// input[type="datetime-local"] -// input[type="date"] -// input[type="month"] -// input[type="time"] -// input[type="week"] -// input[type="number"] -// input[type="email"] -// input[type="url"] -// input[type="search"] -// input[type="tel"] -// input[type="color"] - -.form-control { - display: block; - width: 100%; - height: $input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border) - padding: $padding-base-vertical $padding-base-horizontal; - font-size: $font-size-base; - line-height: $line-height-base; - color: $input-color; - background-color: $input-bg; - background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 - border: 1px solid $input-border; - border-radius: $input-border-radius; // Note: This has no effect on s in CSS. - @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); - @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s); - - // Customize the `:focus` state to imitate native WebKit styles. - @include form-control-focus; - - // Placeholder - @include placeholder; - - // Unstyle the caret on `` background color -$input-bg: #fff !default; -//** `` background color -$input-bg-disabled: $gray-lighter !default; - -//** Text color for ``s -$input-color: $gray !default; -//** `` border color -$input-border: #ccc !default; - -// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4 -//** Default `.form-control` border radius -// This has no effect on ``s in CSS. -$input-border-radius: $border-radius-base !default; -//** Large `.form-control` border radius -$input-border-radius-large: $border-radius-large !default; -//** Small `.form-control` border radius -$input-border-radius-small: $border-radius-small !default; - -//** Border color for inputs on focus -$input-border-focus: #66afe9 !default; - -//** Placeholder text color -$input-color-placeholder: #999 !default; - -//** Default `.form-control` height -$input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2) !default; -//** Large `.form-control` height -$input-height-large: (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default; -//** Small `.form-control` height -$input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default; - -//** `.form-group` margin -$form-group-margin-bottom: 15px !default; - -$legend-color: $gray-dark !default; -$legend-border-color: #e5e5e5 !default; - -//** Background color for textual input addons -$input-group-addon-bg: $gray-lighter !default; -//** Border color for textual input addons -$input-group-addon-border-color: $input-border !default; - -//** Disabled cursor for form controls and buttons. -$cursor-disabled: not-allowed !default; - - -//== Dropdowns -// -//## Dropdown menu container and contents. - -//** Background for the dropdown menu. -$dropdown-bg: #fff !default; -//** Dropdown menu `border-color`. -$dropdown-border: rgba(0,0,0,.15) !default; -//** Dropdown menu `border-color` **for IE8**. -$dropdown-fallback-border: #ccc !default; -//** Divider color for between dropdown items. -$dropdown-divider-bg: #e5e5e5 !default; - -//** Dropdown link text color. -$dropdown-link-color: $gray-dark !default; -//** Hover color for dropdown links. -$dropdown-link-hover-color: darken($gray-dark, 5%) !default; -//** Hover background for dropdown links. -$dropdown-link-hover-bg: #f5f5f5 !default; - -//** Active dropdown menu item text color. -$dropdown-link-active-color: $component-active-color !default; -//** Active dropdown menu item background color. -$dropdown-link-active-bg: $component-active-bg !default; - -//** Disabled dropdown menu item background color. -$dropdown-link-disabled-color: $gray-light !default; - -//** Text color for headers within dropdown menus. -$dropdown-header-color: $gray-light !default; - -//** Deprecated `$dropdown-caret-color` as of v3.1.0 -$dropdown-caret-color: #000 !default; - - -//-- Z-index master list -// -// Warning: Avoid customizing these values. They're used for a bird's eye view -// of components dependent on the z-axis and are designed to all work together. -// -// Note: These variables are not generated into the Customizer. - -$zindex-navbar: 1000 !default; -$zindex-dropdown: 1000 !default; -$zindex-popover: 1060 !default; -$zindex-tooltip: 1070 !default; -$zindex-navbar-fixed: 1030 !default; -$zindex-modal-background: 1040 !default; -$zindex-modal: 1050 !default; - - -//== Media queries breakpoints -// -//## Define the breakpoints at which your layout will change, adapting to different screen sizes. - -// Extra small screen / phone -//** Deprecated `$screen-xs` as of v3.0.1 -$screen-xs: 480px !default; -//** Deprecated `$screen-xs-min` as of v3.2.0 -$screen-xs-min: $screen-xs !default; -//** Deprecated `$screen-phone` as of v3.0.1 -$screen-phone: $screen-xs-min !default; - -// Small screen / tablet -//** Deprecated `$screen-sm` as of v3.0.1 -$screen-sm: 768px !default; -$screen-sm-min: $screen-sm !default; -//** Deprecated `$screen-tablet` as of v3.0.1 -$screen-tablet: $screen-sm-min !default; - -// Medium screen / desktop -//** Deprecated `$screen-md` as of v3.0.1 -$screen-md: 992px !default; -$screen-md-min: $screen-md !default; -//** Deprecated `$screen-desktop` as of v3.0.1 -$screen-desktop: $screen-md-min !default; - -// Large screen / wide desktop -//** Deprecated `$screen-lg` as of v3.0.1 -$screen-lg: 1200px !default; -$screen-lg-min: $screen-lg !default; -//** Deprecated `$screen-lg-desktop` as of v3.0.1 -$screen-lg-desktop: $screen-lg-min !default; - -// So media queries don't overlap when required, provide a maximum -$screen-xs-max: ($screen-sm-min - 1) !default; -$screen-sm-max: ($screen-md-min - 1) !default; -$screen-md-max: ($screen-lg-min - 1) !default; - - -//== Grid system -// -//## Define your custom responsive grid. - -//** Number of columns in the grid. -$grid-columns: 12 !default; -//** Padding between columns. Gets divided in half for the left and right. -$grid-gutter-width: 30px !default; -// Navbar collapse -//** Point at which the navbar becomes uncollapsed. -$grid-float-breakpoint: $screen-sm-min !default; -//** Point at which the navbar begins collapsing. -$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default; - - -//== Container sizes -// -//## Define the maximum width of `.container` for different screen sizes. - -// Small screen / tablet -$container-tablet: (720px + $grid-gutter-width) !default; -//** For `$screen-sm-min` and up. -$container-sm: $container-tablet !default; - -// Medium screen / desktop -$container-desktop: (940px + $grid-gutter-width) !default; -//** For `$screen-md-min` and up. -$container-md: $container-desktop !default; - -// Large screen / wide desktop -$container-large-desktop: (1140px + $grid-gutter-width) !default; -//** For `$screen-lg-min` and up. -$container-lg: $container-large-desktop !default; - - -//== Navbar -// -//## - -// Basics of a navbar -$navbar-height: 50px !default; -$navbar-margin-bottom: $line-height-computed !default; -$navbar-border-radius: $border-radius-base !default; -$navbar-padding-horizontal: floor(($grid-gutter-width / 2)) !default; -$navbar-padding-vertical: (($navbar-height - $line-height-computed) / 2) !default; -$navbar-collapse-max-height: 340px !default; - -$navbar-default-color: #777 !default; -$navbar-default-bg: #f8f8f8 !default; -$navbar-default-border: darken($navbar-default-bg, 6.5%) !default; - -// Navbar links -$navbar-default-link-color: #777 !default; -$navbar-default-link-hover-color: #333 !default; -$navbar-default-link-hover-bg: transparent !default; -$navbar-default-link-active-color: #555 !default; -$navbar-default-link-active-bg: darken($navbar-default-bg, 6.5%) !default; -$navbar-default-link-disabled-color: #ccc !default; -$navbar-default-link-disabled-bg: transparent !default; - -// Navbar brand label -$navbar-default-brand-color: $navbar-default-link-color !default; -$navbar-default-brand-hover-color: darken($navbar-default-brand-color, 10%) !default; -$navbar-default-brand-hover-bg: transparent !default; - -// Navbar toggle -$navbar-default-toggle-hover-bg: #ddd !default; -$navbar-default-toggle-icon-bar-bg: #888 !default; -$navbar-default-toggle-border-color: #ddd !default; - - -//=== Inverted navbar -// Reset inverted navbar basics -$navbar-inverse-color: lighten($gray-light, 15%) !default; -$navbar-inverse-bg: #222 !default; -$navbar-inverse-border: darken($navbar-inverse-bg, 10%) !default; - -// Inverted navbar links -$navbar-inverse-link-color: lighten($gray-light, 15%) !default; -$navbar-inverse-link-hover-color: #fff !default; -$navbar-inverse-link-hover-bg: transparent !default; -$navbar-inverse-link-active-color: $navbar-inverse-link-hover-color !default; -$navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 10%) !default; -$navbar-inverse-link-disabled-color: #444 !default; -$navbar-inverse-link-disabled-bg: transparent !default; - -// Inverted navbar brand label -$navbar-inverse-brand-color: $navbar-inverse-link-color !default; -$navbar-inverse-brand-hover-color: #fff !default; -$navbar-inverse-brand-hover-bg: transparent !default; - -// Inverted navbar toggle -$navbar-inverse-toggle-hover-bg: #333 !default; -$navbar-inverse-toggle-icon-bar-bg: #fff !default; -$navbar-inverse-toggle-border-color: #333 !default; - - -//== Navs -// -//## - -//=== Shared nav styles -$nav-link-padding: 10px 15px !default; -$nav-link-hover-bg: $gray-lighter !default; - -$nav-disabled-link-color: $gray-light !default; -$nav-disabled-link-hover-color: $gray-light !default; - -//== Tabs -$nav-tabs-border-color: #ddd !default; - -$nav-tabs-link-hover-border-color: $gray-lighter !default; - -$nav-tabs-active-link-hover-bg: $body-bg !default; -$nav-tabs-active-link-hover-color: $gray !default; -$nav-tabs-active-link-hover-border-color: #ddd !default; - -$nav-tabs-justified-link-border-color: #ddd !default; -$nav-tabs-justified-active-link-border-color: $body-bg !default; - -//== Pills -$nav-pills-border-radius: $border-radius-base !default; -$nav-pills-active-link-hover-bg: $component-active-bg !default; -$nav-pills-active-link-hover-color: $component-active-color !default; - - -//== Pagination -// -//## - -$pagination-color: $link-color !default; -$pagination-bg: #fff !default; -$pagination-border: #ddd !default; - -$pagination-hover-color: $link-hover-color !default; -$pagination-hover-bg: $gray-lighter !default; -$pagination-hover-border: #ddd !default; - -$pagination-active-color: #fff !default; -$pagination-active-bg: $brand-primary !default; -$pagination-active-border: $brand-primary !default; - -$pagination-disabled-color: $gray-light !default; -$pagination-disabled-bg: #fff !default; -$pagination-disabled-border: #ddd !default; - - -//== Pager -// -//## - -$pager-bg: $pagination-bg !default; -$pager-border: $pagination-border !default; -$pager-border-radius: 15px !default; - -$pager-hover-bg: $pagination-hover-bg !default; - -$pager-active-bg: $pagination-active-bg !default; -$pager-active-color: $pagination-active-color !default; - -$pager-disabled-color: $pagination-disabled-color !default; - - -//== Jumbotron -// -//## - -$jumbotron-padding: 30px !default; -$jumbotron-color: inherit !default; -$jumbotron-bg: $gray-lighter !default; -$jumbotron-heading-color: inherit !default; -$jumbotron-font-size: ceil(($font-size-base * 1.5)) !default; -$jumbotron-heading-font-size: ceil(($font-size-base * 4.5)) !default; - - -//== Form states and alerts -// -//## Define colors for form feedback states and, by default, alerts. - -$state-success-text: #3c763d !default; -$state-success-bg: #dff0d8 !default; -$state-success-border: darken(adjust-hue($state-success-bg, -10), 5%) !default; - -$state-info-text: #31708f !default; -$state-info-bg: #d9edf7 !default; -$state-info-border: darken(adjust-hue($state-info-bg, -10), 7%) !default; - -$state-warning-text: #8a6d3b !default; -$state-warning-bg: #fcf8e3 !default; -$state-warning-border: darken(adjust-hue($state-warning-bg, -10), 5%) !default; - -$state-danger-text: #a94442 !default; -$state-danger-bg: #f2dede !default; -$state-danger-border: darken(adjust-hue($state-danger-bg, -10), 5%) !default; - - -//== Tooltips -// -//## - -//** Tooltip max width -$tooltip-max-width: 200px !default; -//** Tooltip text color -$tooltip-color: #fff !default; -//** Tooltip background color -$tooltip-bg: #000 !default; -$tooltip-opacity: .9 !default; - -//** Tooltip arrow width -$tooltip-arrow-width: 5px !default; -//** Tooltip arrow color -$tooltip-arrow-color: $tooltip-bg !default; - - -//== Popovers -// -//## - -//** Popover body background color -$popover-bg: #fff !default; -//** Popover maximum width -$popover-max-width: 276px !default; -//** Popover border color -$popover-border-color: rgba(0,0,0,.2) !default; -//** Popover fallback border color -$popover-fallback-border-color: #ccc !default; - -//** Popover title background color -$popover-title-bg: darken($popover-bg, 3%) !default; - -//** Popover arrow width -$popover-arrow-width: 10px !default; -//** Popover arrow color -$popover-arrow-color: $popover-bg !default; - -//** Popover outer arrow width -$popover-arrow-outer-width: ($popover-arrow-width + 1) !default; -//** Popover outer arrow color -$popover-arrow-outer-color: fade_in($popover-border-color, 0.05) !default; -//** Popover outer arrow fallback color -$popover-arrow-outer-fallback-color: darken($popover-fallback-border-color, 20%) !default; - - -//== Labels -// -//## - -//** Default label background color -$label-default-bg: $gray-light !default; -//** Primary label background color -$label-primary-bg: $brand-primary !default; -//** Success label background color -$label-success-bg: $brand-success !default; -//** Info label background color -$label-info-bg: $brand-info !default; -//** Warning label background color -$label-warning-bg: $brand-warning !default; -//** Danger label background color -$label-danger-bg: $brand-danger !default; - -//** Default label text color -$label-color: #fff !default; -//** Default text color of a linked label -$label-link-hover-color: #fff !default; - - -//== Modals -// -//## - -//** Padding applied to the modal body -$modal-inner-padding: 15px !default; - -//** Padding applied to the modal title -$modal-title-padding: 15px !default; -//** Modal title line-height -$modal-title-line-height: $line-height-base !default; - -//** Background color of modal content area -$modal-content-bg: #fff !default; -//** Modal content border color -$modal-content-border-color: rgba(0,0,0,.2) !default; -//** Modal content border color **for IE8** -$modal-content-fallback-border-color: #999 !default; - -//** Modal backdrop background color -$modal-backdrop-bg: #000 !default; -//** Modal backdrop opacity -$modal-backdrop-opacity: .5 !default; -//** Modal header border color -$modal-header-border-color: #e5e5e5 !default; -//** Modal footer border color -$modal-footer-border-color: $modal-header-border-color !default; - -$modal-lg: 900px !default; -$modal-md: 600px !default; -$modal-sm: 300px !default; - - -//== Alerts -// -//## Define alert colors, border radius, and padding. - -$alert-padding: 15px !default; -$alert-border-radius: $border-radius-base !default; -$alert-link-font-weight: bold !default; - -$alert-success-bg: $state-success-bg !default; -$alert-success-text: $state-success-text !default; -$alert-success-border: $state-success-border !default; - -$alert-info-bg: $state-info-bg !default; -$alert-info-text: $state-info-text !default; -$alert-info-border: $state-info-border !default; - -$alert-warning-bg: $state-warning-bg !default; -$alert-warning-text: $state-warning-text !default; -$alert-warning-border: $state-warning-border !default; - -$alert-danger-bg: $state-danger-bg !default; -$alert-danger-text: $state-danger-text !default; -$alert-danger-border: $state-danger-border !default; - - -//== Progress bars -// -//## - -//** Background color of the whole progress component -$progress-bg: #f5f5f5 !default; -//** Progress bar text color -$progress-bar-color: #fff !default; -//** Variable for setting rounded corners on progress bar. -$progress-border-radius: $border-radius-base !default; - -//** Default progress bar color -$progress-bar-bg: $brand-primary !default; -//** Success progress bar color -$progress-bar-success-bg: $brand-success !default; -//** Warning progress bar color -$progress-bar-warning-bg: $brand-warning !default; -//** Danger progress bar color -$progress-bar-danger-bg: $brand-danger !default; -//** Info progress bar color -$progress-bar-info-bg: $brand-info !default; - - -//== List group -// -//## - -//** Background color on `.list-group-item` -$list-group-bg: #fff !default; -//** `.list-group-item` border color -$list-group-border: #ddd !default; -//** List group border radius -$list-group-border-radius: $border-radius-base !default; - -//** Background color of single list items on hover -$list-group-hover-bg: #f5f5f5 !default; -//** Text color of active list items -$list-group-active-color: $component-active-color !default; -//** Background color of active list items -$list-group-active-bg: $component-active-bg !default; -//** Border color of active list elements -$list-group-active-border: $list-group-active-bg !default; -//** Text color for content within active list items -$list-group-active-text-color: lighten($list-group-active-bg, 40%) !default; - -//** Text color of disabled list items -$list-group-disabled-color: $gray-light !default; -//** Background color of disabled list items -$list-group-disabled-bg: $gray-lighter !default; -//** Text color for content within disabled list items -$list-group-disabled-text-color: $list-group-disabled-color !default; - -$list-group-link-color: #555 !default; -$list-group-link-hover-color: $list-group-link-color !default; -$list-group-link-heading-color: #333 !default; - - -//== Panels -// -//## - -$panel-bg: #fff !default; -$panel-body-padding: 15px !default; -$panel-heading-padding: 10px 15px !default; -$panel-footer-padding: $panel-heading-padding !default; -$panel-border-radius: $border-radius-base !default; - -//** Border color for elements within panels -$panel-inner-border: #ddd !default; -$panel-footer-bg: #f5f5f5 !default; - -$panel-default-text: $gray-dark !default; -$panel-default-border: #ddd !default; -$panel-default-heading-bg: #f5f5f5 !default; - -$panel-primary-text: #fff !default; -$panel-primary-border: $brand-primary !default; -$panel-primary-heading-bg: $brand-primary !default; - -$panel-success-text: $state-success-text !default; -$panel-success-border: $state-success-border !default; -$panel-success-heading-bg: $state-success-bg !default; - -$panel-info-text: $state-info-text !default; -$panel-info-border: $state-info-border !default; -$panel-info-heading-bg: $state-info-bg !default; - -$panel-warning-text: $state-warning-text !default; -$panel-warning-border: $state-warning-border !default; -$panel-warning-heading-bg: $state-warning-bg !default; - -$panel-danger-text: $state-danger-text !default; -$panel-danger-border: $state-danger-border !default; -$panel-danger-heading-bg: $state-danger-bg !default; - - -//== Thumbnails -// -//## - -//** Padding around the thumbnail image -$thumbnail-padding: 4px !default; -//** Thumbnail background color -$thumbnail-bg: $body-bg !default; -//** Thumbnail border color -$thumbnail-border: #ddd !default; -//** Thumbnail border radius -$thumbnail-border-radius: $border-radius-base !default; - -//** Custom text color for thumbnail captions -$thumbnail-caption-color: $text-color !default; -//** Padding around the thumbnail caption -$thumbnail-caption-padding: 9px !default; - - -//== Wells -// -//## - -$well-bg: #f5f5f5 !default; -$well-border: darken($well-bg, 7%) !default; - - -//== Badges -// -//## - -$badge-color: #fff !default; -//** Linked badge text color on hover -$badge-link-hover-color: #fff !default; -$badge-bg: $gray-light !default; - -//** Badge text color in active nav link -$badge-active-color: $link-color !default; -//** Badge background color in active nav link -$badge-active-bg: #fff !default; - -$badge-font-weight: bold !default; -$badge-line-height: 1 !default; -$badge-border-radius: 10px !default; - - -//== Breadcrumbs -// -//## - -$breadcrumb-padding-vertical: 8px !default; -$breadcrumb-padding-horizontal: 15px !default; -//** Breadcrumb background color -$breadcrumb-bg: #f5f5f5 !default; -//** Breadcrumb text color -$breadcrumb-color: #ccc !default; -//** Text color of current page in the breadcrumb -$breadcrumb-active-color: $gray-light !default; -//** Textual separator for between breadcrumb elements -$breadcrumb-separator: "/" !default; - - -//== Carousel -// -//## - -$carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6) !default; - -$carousel-control-color: #fff !default; -$carousel-control-width: 15% !default; -$carousel-control-opacity: .5 !default; -$carousel-control-font-size: 20px !default; - -$carousel-indicator-active-bg: #fff !default; -$carousel-indicator-border-color: #fff !default; - -$carousel-caption-color: #fff !default; - - -//== Close -// -//## - -$close-font-weight: bold !default; -$close-color: #000 !default; -$close-text-shadow: 0 1px 0 #fff !default; - - -//== Code -// -//## - -$code-color: #c7254e !default; -$code-bg: #f9f2f4 !default; - -$kbd-color: #fff !default; -$kbd-bg: #333 !default; - -$pre-bg: #f5f5f5 !default; -$pre-color: $gray-dark !default; -$pre-border-color: #ccc !default; -$pre-scrollable-max-height: 340px !default; - - -//== Type -// -//## - -//** Horizontal offset for forms and lists. -$component-offset-horizontal: 180px !default; -//** Text muted color -$text-muted: $gray-light !default; -//** Abbreviations and acronyms border color -$abbr-border-color: $gray-light !default; -//** Headings small color -$headings-small-color: $gray-light !default; -//** Blockquote small color -$blockquote-small-color: $gray-light !default; -//** Blockquote font size -$blockquote-font-size: ($font-size-base * 1.25) !default; -//** Blockquote border color -$blockquote-border-color: $gray-lighter !default; -//** Page header border color -$page-header-border-color: $gray-lighter !default; -//** Width of horizontal description list titles -$dl-horizontal-offset: $component-offset-horizontal !default; -//** Point at which .dl-horizontal becomes horizontal -$dl-horizontal-breakpoint: $grid-float-breakpoint !default; -//** Horizontal line color. -$hr-border: $gray-lighter !default; diff --git a/docs/_sass/vendor/bootstrap/_wells.scss b/docs/_sass/vendor/bootstrap/_wells.scss deleted file mode 100644 index b8657118..00000000 --- a/docs/_sass/vendor/bootstrap/_wells.scss +++ /dev/null @@ -1,29 +0,0 @@ -// -// Wells -// -------------------------------------------------- - - -// Base class -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: $well-bg; - border: 1px solid $well-border; - border-radius: $border-radius-base; - @include box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); - blockquote { - border-color: #ddd; - border-color: rgba(0,0,0,.15); - } -} - -// Sizes -.well-lg { - padding: 24px; - border-radius: $border-radius-large; -} -.well-sm { - padding: 9px; - border-radius: $border-radius-small; -} diff --git a/docs/_sass/vendor/bootstrap/mixins/_alerts.scss b/docs/_sass/vendor/bootstrap/mixins/_alerts.scss deleted file mode 100644 index 3faf0b5a..00000000 --- a/docs/_sass/vendor/bootstrap/mixins/_alerts.scss +++ /dev/null @@ -1,14 +0,0 @@ -// Alerts - -@mixin alert-variant($background, $border, $text-color) { - background-color: $background; - border-color: $border; - color: $text-color; - - hr { - border-top-color: darken($border, 5%); - } - .alert-link { - color: darken($text-color, 10%); - } -} diff --git a/docs/_sass/vendor/bootstrap/mixins/_background-variant.scss b/docs/_sass/vendor/bootstrap/mixins/_background-variant.scss deleted file mode 100644 index 4c7769e1..00000000 --- a/docs/_sass/vendor/bootstrap/mixins/_background-variant.scss +++ /dev/null @@ -1,12 +0,0 @@ -// Contextual backgrounds - -// [converter] $parent hack -@mixin bg-variant($parent, $color) { - #{$parent} { - background-color: $color; - } - a#{$parent}:hover, - a#{$parent}:focus { - background-color: darken($color, 10%); - } -} diff --git a/docs/_sass/vendor/bootstrap/mixins/_border-radius.scss b/docs/_sass/vendor/bootstrap/mixins/_border-radius.scss deleted file mode 100644 index ce194998..00000000 --- a/docs/_sass/vendor/bootstrap/mixins/_border-radius.scss +++ /dev/null @@ -1,18 +0,0 @@ -// Single side border-radius - -@mixin border-top-radius($radius) { - border-top-right-radius: $radius; - border-top-left-radius: $radius; -} -@mixin border-right-radius($radius) { - border-bottom-right-radius: $radius; - border-top-right-radius: $radius; -} -@mixin border-bottom-radius($radius) { - border-bottom-right-radius: $radius; - border-bottom-left-radius: $radius; -} -@mixin border-left-radius($radius) { - border-bottom-left-radius: $radius; - border-top-left-radius: $radius; -} diff --git a/docs/_sass/vendor/bootstrap/mixins/_buttons.scss b/docs/_sass/vendor/bootstrap/mixins/_buttons.scss deleted file mode 100644 index b93f84b2..00000000 --- a/docs/_sass/vendor/bootstrap/mixins/_buttons.scss +++ /dev/null @@ -1,65 +0,0 @@ -// Button variants -// -// Easily pump out default styles, as well as :hover, :focus, :active, -// and disabled options for all buttons - -@mixin button-variant($color, $background, $border) { - color: $color; - background-color: $background; - border-color: $border; - - &:focus, - &.focus { - color: $color; - background-color: darken($background, 10%); - border-color: darken($border, 25%); - } - &:hover { - color: $color; - background-color: darken($background, 10%); - border-color: darken($border, 12%); - } - &:active, - &.active, - .open > &.dropdown-toggle { - color: $color; - background-color: darken($background, 10%); - border-color: darken($border, 12%); - - &:hover, - &:focus, - &.focus { - color: $color; - background-color: darken($background, 17%); - border-color: darken($border, 25%); - } - } - &:active, - &.active, - .open > &.dropdown-toggle { - background-image: none; - } - &.disabled, - &[disabled], - fieldset[disabled] & { - &:hover, - &:focus, - &.focus { - background-color: $background; - border-color: $border; - } - } - - .badge { - color: $background; - background-color: $color; - } -} - -// Button sizes -@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) { - padding: $padding-vertical $padding-horizontal; - font-size: $font-size; - line-height: $line-height; - border-radius: $border-radius; -} diff --git a/docs/_sass/vendor/bootstrap/mixins/_center-block.scss b/docs/_sass/vendor/bootstrap/mixins/_center-block.scss deleted file mode 100644 index e06fb5e2..00000000 --- a/docs/_sass/vendor/bootstrap/mixins/_center-block.scss +++ /dev/null @@ -1,7 +0,0 @@ -// Center-align a block level element - -@mixin center-block() { - display: block; - margin-left: auto; - margin-right: auto; -} diff --git a/docs/_sass/vendor/bootstrap/mixins/_clearfix.scss b/docs/_sass/vendor/bootstrap/mixins/_clearfix.scss deleted file mode 100644 index dc3e2ab4..00000000 --- a/docs/_sass/vendor/bootstrap/mixins/_clearfix.scss +++ /dev/null @@ -1,22 +0,0 @@ -// Clearfix -// -// For modern browsers -// 1. The space content is one way to avoid an Opera bug when the -// contenteditable attribute is included anywhere else in the document. -// Otherwise it causes space to appear at the top and bottom of elements -// that are clearfixed. -// 2. The use of `table` rather than `block` is only necessary if using -// `:before` to contain the top-margins of child elements. -// -// Source: http://nicolasgallagher.com/micro-clearfix-hack/ - -@mixin clearfix() { - &:before, - &:after { - content: " "; // 1 - display: table; // 2 - } - &:after { - clear: both; - } -} diff --git a/docs/_sass/vendor/bootstrap/mixins/_forms.scss b/docs/_sass/vendor/bootstrap/mixins/_forms.scss deleted file mode 100644 index 277aa5f8..00000000 --- a/docs/_sass/vendor/bootstrap/mixins/_forms.scss +++ /dev/null @@ -1,88 +0,0 @@ -// Form validation states -// -// Used in forms.less to generate the form validation CSS for warnings, errors, -// and successes. - -@mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) { - // Color the label and help text - .help-block, - .control-label, - .radio, - .checkbox, - .radio-inline, - .checkbox-inline, - &.radio label, - &.checkbox label, - &.radio-inline label, - &.checkbox-inline label { - color: $text-color; - } - // Set the border and box shadow on specific inputs to match - .form-control { - border-color: $border-color; - @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work - &:focus { - border-color: darken($border-color, 10%); - $shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%); - @include box-shadow($shadow); - } - } - // Set validation states also for addons - .input-group-addon { - color: $text-color; - border-color: $border-color; - background-color: $background-color; - } - // Optional feedback icon - .form-control-feedback { - color: $text-color; - } -} - - -// Form control focus state -// -// Generate a customized focus state and for any input with the specified color, -// which defaults to the `$input-border-focus` variable. -// -// We highly encourage you to not customize the default value, but instead use -// this to tweak colors on an as-needed basis. This aesthetic change is based on -// WebKit's default styles, but applicable to a wider range of browsers. Its -// usability and accessibility should be taken into account with any change. -// -// Example usage: change the default blue border and shadow to white for better -// contrast against a dark gray background. -@mixin form-control-focus($color: $input-border-focus) { - $color-rgba: rgba(red($color), green($color), blue($color), .6); - &:focus { - border-color: $color; - outline: 0; - @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba); - } -} - -// Form control sizing -// -// Relative text size, padding, and border-radii changes for form controls. For -// horizontal sizing, wrap controls in the predefined grid classes. ` -{% endhighlight %} - -

- It will need to be recreated as a <select> element with - some <option> tags that have value - attributes that match the old value. -

- -{% highlight html linenos %} - -{% endhighlight %} - -

- The options that you create should have selected="selected" - set so Select2 and the browser knows that they should be selected. The - value attribute of the option should also be set to the value - that will be returned from the server for the result, so Select2 can - highlight it as selected in the dropdown. The text within the option - should also reflect the value that should be displayed by default for the - option. -

- -

Advanced matching of searches

- -

- In past versions of Select2, when matching search terms to individual - options, which limited the control that you had when displaying results, - especially in cases where there was nested data. The matcher - function was only given the individual option, even if it was a nested - options, without any context. -

- -

- With the new matcher function, only the root-level options are matched and - matchers are expected to limit the results of any children options that - they contain. This allows developers to customize how options within - groups can be displayed, and modify how the results are returned. -

- -

- A function has been created that allows old-style matcher functions to be - converted to the new style. You can retrieve the function from the - select2/compat/matcher module, which should just wrap the old - matcher function. -

- -

- So if your old code used a matcher that only displayed options if they - started with the term that was entered, it would look something like… -

- -{% highlight js linenos %} -function matchStart (term, text) { - if (text.toUpperCase().indexOf(term.toUpperCase()) == 0) { - return true; - } - - return false; -} - -$("select").select2({ - matcher: matchStart -}) -{% endhighlight %} - -

- Then in Select2 4.0, you would need to wrap the matchStart - method (or the name of the matcher you created) with a - oldMatcher method that we have created. -

- -{% highlight js linenos %} -function matchStart (term, text) { - if (text.toUpperCase().indexOf(term.toUpperCase()) == 0) { - return true; - } - - return false; -} - -$.fn.select2.amd.require(['select2/compat/matcher'], function (oldMatcher) { - $("select").select2({ - matcher: oldMatcher(matchStart) - }) -}); -{% endhighlight %} - -

- This will work for any matchers that only took in the search term and the - text of the option as parameters. If your matcher relied on the third - parameter containing the jQuery element representing the original - <option> tag, then you may need to slightly change - your matcher to expect the full JavaScript data object being passed in - instead. You can still retrieve the jQuery element from the data object - using the data.element property. -

- -

More flexible placeholders

- -

- In the most recent versions of Select2, placeholders could only be - applied to the first (typically the default) option in a - <select> if it was blank. The - placeholderOption option was added to Select2 to allow users - using the select tag to select a different option, typically - an automatically generated option with a different value. -

- -

- The placeholder option can now take an object as well as just - a string. This replaces the need for the old - placeholderOption, as now the id of the object - can be set to the value attribute of the - <option> tag. -

- -

- For a select that looks like the following, where the first option (with a - value of -1) is the placeholder option… -

- -{% highlight html linenos %} - -{% endhighlight %} - -

- You would have previously had to get the placeholder option through the - placeholderOption, but now you can do it through the - placeholder option by setting an id. -

- -{% highlight js linenos %} -$("select").select2({ - placeholder: { - id: "-1", - placeholder: "Select an option" - } -}) -{% endhighlight %} - -

- And Select2 will automatically display the placeholder when the value of - the select is -1, which it will be by default. This does not - break the old functionality of Select2 where the placeholder option was - blank by default. -

- -

Display reflects the actual order of the values

- -

- In past versions of Select2, choices were displayed in the order that - they were selected. In cases where Select2 was used on a - <select> element, the order that the server received - the selections did not always match the order that the choices were - displayed, resulting in confusion in situations where the order is - important. -

- -

- Select2 will now order selected choices in the same order that will be - sent to the server. -

- -

Changed method and option names

- -

- When designing the future option set for Select2 4.0, special care was - taken to ensure that the most commonly used options were brought over. - For the most part, the commonly used options of Select2 can still be - referenced under their previous names, but there were some changes which - have been noted. -

- -

- Removed the requirement of initSelection -

- -

- In the past, whenever you wanted to use a custom data adapter, such as - AJAX or tagging, you needed to help Select2 out in determining the initial - values that were selected. This was typically done through the - initSelection option, which took the underlying data of the - input and converted it into data objects that Select2 could use. -

- -

- This is now handled by - the data adapter in the - current method, which allows Select2 to convert the currently - selected values into data objects that can be displayed. The default - implementation converts the text and value of option elements - into data objects, and is probably suitable for most cases. An example of - the old initSelection option is included below, which - converts the value of the selected options into a data object with both - the id and text matching the selected value. -

- -{% highlight js linenos %} -{ - initSelection : function (element, callback) { - var data = []; - $(element.val()).each(function () { - data.push({id: this, text: this}); - }); - callback(data); - } -} -{% endhighlight %} - -

- When using the new current method of the custom data adapter, - this method is called any time Select2 needs a list of - the currently selected options. This is different from the old - initSelection in that it was only called once, so it could - suffer from being relatively slow to process the data (such as from a - remote data source). -

- -{% highlight js linenos %} -$.fn.select2.amd.require([ - 'select2/data/array', - 'select2/utils' -], function (ArrayData, Utils) { - function CustomData ($element, options) { - CustomData.__super__.constructor.call(this, $element, options); - } - - Utils.Extend(CustomData, ArrayData); - - CustomData.prototype.current = function (callback) { - var data = []; - var currentVal = this.$element.val(); - - if (!this.$element.prop('multiple')) { - currentVal = [currentVal]; - } - - for (var v = 0; v < currentVal.length; v++) { - data.push({ - id: currentVal[v], - text: currentVal[v] - }); - } - - callback(data); - }; - - $("#select").select2({ - dataAdapter: CustomData - }); -} -{% endhighlight %} - -

- The new current method of the data adapter works in a similar - way to the old initSelection method, with three notable - differences. The first, and most important, is that it is called - whenever the current selections are needed to ensure that Select2 - is always displaying the most accurate and up to date data. No matter - what type of element Select2 is attached to, whether it supports a - single or multiple selections, the data passed to the callback - must be an array, even if it contains one selection. - The last is that there is only one parameter, the callback to be - executed with the latest data, and the current element that Select2 is - attached to is available on the class itself as - this.$element. -

- -

- If you only need to load in the initial options once, and otherwise will - be letting Select2 handle the state of the selections, you don't need to - use a custom data adapter. You can just create the - <option> tags on your own, and Select2 will pick up - the changes. -

- -{% highlight js linenos %} -var $element = $('select').select2(); // the select element you are working with - -var $request = $.ajax({ - url: '/my/remote/source' // wherever your data is actually coming from -}); - -$request.then(function (data) { - // This assumes that the data comes back as an array of data objects - // The idea is that you are using the same callback as the old `initSelection` - - for (var d = 0; d < data.length; d++) { - var item = data[d]; - - // Create the DOM option that is pre-selected by default - var option = new Option(item.text, item.id, true, true); - - // Append it to the select - $element.append(option); - } - - // Update the selected options that are displayed - $element.trigger('change'); -}); -{% endhighlight %} - -

- Custom data adapters instead of query -

- -

- In the past, any time - you wanted to hook Select2 up to a different data source you would be - required to implement custom query and - initSelection methods. This allowed Select2 to determine the - initial selection and the list of results to display, and it would handle - everything else internally, which was fine more most people. -

- -

- The custom query and initSelection methods have - been replaced by - custom data adapters that handle - how Select2 stores and retrieves the data that will be displayed to the - user. An example of the old query option is provided below, - which is - the same as the old example, - and it generates results that contain the search term repeated a certain - number of times. -

- -{% highlight js linenos %} -{ - query: function (query) { - var data = {results: []}, i, j, s; - for (i = 1; i < 5; i++) { - s = ""; - for (j = 0; j < i; j++) {s = s + query.term;} - data.results.push({id: query.term + i, text: s}); - } - query.callback(data); - } -} -{% endhighlight %} - -

- This has been replaced by custom data adapters which define a similarly - named query method. The comparable data adapter is provided - below as an example. -

- -{% highlight js linenos %} -$.fn.select2.amd.require([ - 'select2/data/array', - 'select2/utils' -], function (ArrayData, Utils) { - function CustomData ($element, options) { - CustomData.__super__.constructor.call(this, $element, options); - } - - Utils.Extend(CustomData, ArrayData); - - CustomData.prototype.query = function (params, callback) { - var data = { - results: [] - }; - - for (var i = 1; i < 5; i++) { - var s = ""; - - for (var j = 0; j < i; j++) { - s = s + params.term; - } - - data.results.push({ - id: params.term + i, - text: s - }); - } - - callback(data); - }; - - $("#select").select2({ - dataAdapter: CustomData - }); -} -{% endhighlight %} - -

- The new query method of the data adapter is very similar to - the old query option that was passed into Select2 when - initializing it. The old query argument is mostly the same as - the new params that are passed in to query on, and the - callback that should be used to return the results is now passed in as the - second parameter. -

- -

Renamed templating options

- -

- Select2 previously provided multiple options for formatting the results - list and selected options, commonly referred to as "formatters", using the - formatSelection and formatResult options. As the - "formatters" were also used for things such as localization, - which has also changed, they have been - renamed to templateSelection and templateResult - and their signatures have changed as well. -

- -

- You should refer to the updated - documentation on templates when - migrating from previous versions of Select2. -

- -

- The id and text properties are strictly enforced -

- -

- When working with array and AJAX data in the past, Select2 allowed a - custom id function or attribute to be set in various places, - ranging from the initialization of Select2 to when the remote data was - being returned. This allowed Select2 to better integrate with existing - data sources that did not necessarily use the id attribute to - indicate the unique identifier for an object. -

- -

- Select2 no longer supports a custom id or text - to be used, but provides integration points for converting incorrect data - to the expected format. -

- -

- When working with array data -

- -

- Select2 previously supported defining array data as an object that matched - the signature of an AJAX response. A text property could be - specified that would map the given property to the text - property on the individual objects. You can now do this when initializing - Select2 by using the following jQuery code to map the old - text and id properties to the new ones. -

- -{% highlight js linenos %} -var data = $.map([ - { - pk: 1, - word: 'one' - }, - { - pk: 2, - word: 'two' - } -], function (obj) { - obj.id = obj.id || obj.pk; - obj.text = obj.text || obj.word; - - return obj; -}); -{% endhighlight %} - -

- This will result in an array of data objects that have the id - properties that match the existing pk properties and - text properties that match the existing word - properties. -

- -

- When working with remote data -

- -

- The same code that was given above can be used in the - processResults method of an AJAX call to map properties there - as well. -

- -

Renamed translation options

- -

- In previous versions of Select2, the default messages provided to users - could be localized to fit the language of the website that it was being - used on. Select2 only comes with the English language by default, but - provides - community-contributed translations for - many common languages. Many of the formatters have been moved to the - language option and the signatures of the formatters have - been changed to handle future additions. -

- -

- Declaring options using data-* attributes -

- -

- In the past, Select2 has only supported declaring a subset of options - using data-* attributes. Select2 now supports declaring all - options using the attributes, using - the format specified in the documentation. -

- -

- You could previously declare the URL that was used for AJAX requests using - the data-ajax-url attribute. While Select2 still allows for - this, the new attribute that should be used is the - data-ajax--url attribute. Support for the old attribute will - be removed in Select2 4.1. -

- -

- Although it was not documented, a list of possible tags could also be - provided using the data-select2-tags attribute and passing in - a JSON-formatted array of objects for tags. As the method for specifying - tags has changed in 4.0, you should now provide the array of objects using - the data-data attribute, which maps to - the array data option. You should also - enable tags by setting data-tags="true" on the object, to - maintain the ability for users to create their own options as well. -

- -

- If you previously declared the list of tags as… -

- -{% highlight html linenos %} - -{% endhighlight %} - -

- …then you should now declare it as… -

- -{% highlight html linenos %} - -{% endhighlight %} - -

Deprecated and removed methods

- -

- As Select2 now uses a <select> element for all data - sources, a few methods that were available by calling - .select2() are no longer required. -

- -

.select2("val")

- -

- The "val" method has been deprecated and will be removed in - Select2 4.1. The deprecated method no longer includes the - triggerChange parameter. -

- -

- You should directly call .val on the underlying - <select> element instead. If you needed the second - parameter (triggerChange), you should also call - .trigger("change") on the element. -

- -{% highlight js linenos %} -$("select").val("1").trigger("change"); // instead of $("select").select2("val", "1"); -{% endhighlight %} - -

.select2("enable")

- -

- Select2 will respect the disabled property of the underlying - select element. In order to enable or disable Select2, you should call - .prop('disabled', true/false) on the - <select> element. Support for the old methods will be - completely removed in Select2 4.1. -

- -{% highlight js linenos %} -$("select").prop("disabled", true); // instead of $("select").enable(false); -{% endhighlight %} - - - - - - \ No newline at end of file diff --git a/docs/browserconfig.xml b/docs/browserconfig.xml deleted file mode 100644 index beca4f5f..00000000 --- a/docs/browserconfig.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - #da532c - - - diff --git a/docs/community.html b/docs/community.html deleted file mode 100644 index 54830af0..00000000 --- a/docs/community.html +++ /dev/null @@ -1,154 +0,0 @@ ---- -layout: default -title: Community - Select2 -slug: community ---- - -
-
-

- Community -

-

- Select2 has an active community that enjoys helping each other out. -

-
-
- -
-
- - -

- Having trouble getting Select2 working on your website? Is it not working - together with another plugin, even though you think it should? Select2 has a - few communities that you can go to for help getting it all working together. -

- -
    -
  1. - Try sending a message to the - - Select2 discussion group - - or searching the archives. -
  2. -
  3. - Ask in the #select2 channel on - chat.freenode.net or use the - - web irc client. - -
  4. -
  5. - Raise a question on - Stack Overflow, - make sure to include the - - "jquery-select2" - - tag. -
  6. -
-
- -
- - -

- Found a problem with Select2? Feel free to open a ticket on the Select2 - repository on GitHub, but you should keep a few things in mind: -

- -
    -
  1. - Use the - - GitHub issue search - - to check if your issue has already been reported. -
  2. -
  3. - Try to isolate your problem as much as possible, so we can easily test if - the issue has been fixed. -
  4. -
  5. - Once you are sure the issue is with Select2, and not a third party - library, - - submit a ticket - - to the repository. -
  6. -
- -

- You can find more information on reporting bugs in the - - contributing guide, - - including tips on what information to include. -

-
- -
- - -

- New feature requests are usually requested by the - - Select2 community on GitHub, - - and are often fulfilled by - - fellow contributors. - -

- -
    -
  1. - Use the - - GitHub issue search - - to check if your feature has already been requested. -
  2. -
  3. - Check if it hasn't already been implemented as a - - third party plugin. - -
  4. -
  5. - Please make sure you are only requesting a single feature, and not a - collection of smaller features. -
  6. -
- -

- You can find more information on requesting new features in the - - contributing guide. - -

-
- -
- - -

- You can find more information on getting involved with Select2 in the - - contributing guide. - -

-
-
diff --git a/docs/css/bootstrap.scss b/docs/css/bootstrap.scss deleted file mode 100644 index 83fc0c7b..00000000 --- a/docs/css/bootstrap.scss +++ /dev/null @@ -1,51 +0,0 @@ ---- ---- - -/*! - * Bootstrap v3.3.6 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -// Core variables and mixins -@import "vendor/bootstrap/variables"; -@import "vendor/bootstrap/mixins"; - -// Reset and dependencies -@import "vendor/bootstrap/normalize"; -@import "vendor/bootstrap/print"; - -// Core CSS -@import "vendor/bootstrap/scaffolding"; -@import "vendor/bootstrap/type"; -@import "vendor/bootstrap/code"; -@import "vendor/bootstrap/grid"; -@import "vendor/bootstrap/tables"; -@import "vendor/bootstrap/forms"; -@import "vendor/bootstrap/buttons"; - -// Components -@import "vendor/bootstrap/component-animations"; -@import "vendor/bootstrap/dropdowns"; -@import "vendor/bootstrap/button-groups"; -@import "vendor/bootstrap/input-groups"; -@import "vendor/bootstrap/navs"; -@import "vendor/bootstrap/navbar"; -@import "vendor/bootstrap/breadcrumbs"; -@import "vendor/bootstrap/pagination"; -@import "vendor/bootstrap/pager"; -@import "vendor/bootstrap/labels"; -@import "vendor/bootstrap/badges"; -@import "vendor/bootstrap/jumbotron"; -@import "vendor/bootstrap/thumbnails"; -@import "vendor/bootstrap/alerts"; -@import "vendor/bootstrap/media"; -@import "vendor/bootstrap/list-group"; -@import "vendor/bootstrap/panels"; -@import "vendor/bootstrap/responsive-embed"; -@import "vendor/bootstrap/wells"; -@import "vendor/bootstrap/close"; - -// Utility classes -@import "vendor/bootstrap/utilities"; -@import "vendor/bootstrap/responsive-utilities"; diff --git a/docs/css/font-awesome.scss b/docs/css/font-awesome.scss deleted file mode 100644 index d72cf940..00000000 --- a/docs/css/font-awesome.scss +++ /dev/null @@ -1,16 +0,0 @@ ---- ---- - -/*! - * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */ - -$fa-font-path: "../vendor/fonts"; - -@import "vendor/font-awesome/variables"; -@import "vendor/font-awesome/mixins"; -@import "vendor/font-awesome/path"; -@import "vendor/font-awesome/core"; -@import "vendor/font-awesome/list"; -@import "vendor/font-awesome/icons"; diff --git a/docs/css/s2-docs.scss b/docs/css/s2-docs.scss deleted file mode 100644 index 6b66a37c..00000000 --- a/docs/css/s2-docs.scss +++ /dev/null @@ -1,24 +0,0 @@ ---- ---- - -@import "vendor/bootstrap/variables"; - -@import "result-repository"; -@import "sidenav"; -@import "hamburger"; -@import "code"; -@import "featurette"; -@import "layout"; -@import "nav"; -@import "footer"; -@import "alert"; -@import "home"; -@import "examples"; -@import "social"; -@import "buttons"; -@import "anchorjs"; -@import "jumbotron"; -@import "prettify"; -@import "syntax-highlighting"; -@import "typography"; -@import "dl-panels"; \ No newline at end of file diff --git a/docs/dist/.gitkeep b/docs/dist/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/examples.html b/docs/examples.html deleted file mode 100644 index aeb329ba..00000000 --- a/docs/examples.html +++ /dev/null @@ -1,256 +0,0 @@ ---- -layout: default -title: Examples - Select2 -slug: examples ---- - - - - - - -
-
-

- Examples -

-
-
- -
-
-
- - {% include examples/basics.html %} - {% include examples/placeholders.html %} - {% include examples/data.html %} - {% include examples/disabled-mode.html %} - {% include examples/disabled-results.html %} - {% include examples/multiple-max.html %} - {% include examples/hide-search.html %} - {% include examples/programmatic-control.html %} - {% include examples/tags.html %} - {% include examples/tokenizer.html %} - {% include examples/matcher.html %} - {% include examples/localization-rtl-diacritics.html %} - {% include examples/themes-templating-responsive-design.html %} - -
- -
-
- -{% include js-source-states.html %} - - diff --git a/docs/images/android-chrome-36x36.png b/docs/images/android-chrome-36x36.png deleted file mode 100644 index 12a3dc6b..00000000 Binary files a/docs/images/android-chrome-36x36.png and /dev/null differ diff --git a/docs/images/android-chrome-48x48.png b/docs/images/android-chrome-48x48.png deleted file mode 100644 index 64aa46a4..00000000 Binary files a/docs/images/android-chrome-48x48.png and /dev/null differ diff --git a/docs/images/android-chrome-72x72.png b/docs/images/android-chrome-72x72.png deleted file mode 100644 index 2c2c829b..00000000 Binary files a/docs/images/android-chrome-72x72.png and /dev/null differ diff --git a/docs/images/apple-touch-icon-57x57.png b/docs/images/apple-touch-icon-57x57.png deleted file mode 100644 index ae24323d..00000000 Binary files a/docs/images/apple-touch-icon-57x57.png and /dev/null differ diff --git a/docs/images/apple-touch-icon-60x60.png b/docs/images/apple-touch-icon-60x60.png deleted file mode 100644 index e3f8d21f..00000000 Binary files a/docs/images/apple-touch-icon-60x60.png and /dev/null differ diff --git a/docs/images/apple-touch-icon-72x72.png b/docs/images/apple-touch-icon-72x72.png deleted file mode 100644 index e5399209..00000000 Binary files a/docs/images/apple-touch-icon-72x72.png and /dev/null differ diff --git a/docs/images/apple-touch-icon-precomposed.png b/docs/images/apple-touch-icon-precomposed.png deleted file mode 100644 index 31b912e7..00000000 Binary files a/docs/images/apple-touch-icon-precomposed.png and /dev/null differ diff --git a/docs/images/apple-touch-icon.png b/docs/images/apple-touch-icon.png deleted file mode 100644 index e5399209..00000000 Binary files a/docs/images/apple-touch-icon.png and /dev/null differ diff --git a/docs/images/favicon-16x16.png b/docs/images/favicon-16x16.png deleted file mode 100644 index ab60a1d1..00000000 Binary files a/docs/images/favicon-16x16.png and /dev/null differ diff --git a/docs/images/favicon-32x32.png b/docs/images/favicon-32x32.png deleted file mode 100644 index 5319e04a..00000000 Binary files a/docs/images/favicon-32x32.png and /dev/null differ diff --git a/docs/images/favicon.ico b/docs/images/favicon.ico deleted file mode 100644 index 91dcfd50..00000000 Binary files a/docs/images/favicon.ico and /dev/null differ diff --git a/docs/images/logo.png b/docs/images/logo.png deleted file mode 100644 index 8de094fc..00000000 Binary files a/docs/images/logo.png and /dev/null differ diff --git a/docs/images/manifest.json b/docs/images/manifest.json deleted file mode 100644 index 99bc8aa4..00000000 --- a/docs/images/manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "Select2", - "icons": [ - { - "src": "\/images\/android-chrome-36x36.png?v=699Nxpjr2A", - "sizes": "36x36", - "type": "image\/png", - "density": 0.75 - }, - { - "src": "\/images\/android-chrome-48x48.png?v=699Nxpjr2A", - "sizes": "48x48", - "type": "image\/png", - "density": 1 - }, - { - "src": "\/images\/android-chrome-72x72.png?v=699Nxpjr2A", - "sizes": "72x72", - "type": "image\/png", - "density": 1.5 - } - ] -} diff --git a/docs/images/mstile-150x150.png b/docs/images/mstile-150x150.png deleted file mode 100644 index 9dede7da..00000000 Binary files a/docs/images/mstile-150x150.png and /dev/null differ diff --git a/docs/images/mstile-310x150.png b/docs/images/mstile-310x150.png deleted file mode 100644 index a266af2e..00000000 Binary files a/docs/images/mstile-310x150.png and /dev/null differ diff --git a/docs/images/mstile-70x70.png b/docs/images/mstile-70x70.png deleted file mode 100644 index f2efb68c..00000000 Binary files a/docs/images/mstile-70x70.png and /dev/null differ diff --git a/docs/images/safari-pinned-tab.svg b/docs/images/safari-pinned-tab.svg deleted file mode 100644 index 700213c4..00000000 --- a/docs/images/safari-pinned-tab.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - -Created by potrace 1.11, written by Peter Selinger 2001-2013 - - - - - diff --git a/docs/index.html b/docs/index.html index accd1db9..ea8214d6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,237 +1,12 @@ ---- -layout: home -title: Select2 - The jQuery replacement for select boxes -slug: home ---- - -
-
-

Select2

-

- The jQuery replacement for select boxes -

-

- - Download Select2 - -

-

- Currently v4.0.3 -

-
-
- -{% include notice-previous.html %} - -
-
- Select2 gives you a customizable select box with support for searching, - tagging, remote data sets, infinite scrolling, and many other highly used - options. -
- -
- -
-
-
- -

In your language

-

- Select2 comes with support for - RTL environments, - searching with diacritics and - over 40 languages built-in. -

-
- -
- -

Remote data support

-

- Using AJAX you can efficiently - search large lists of items. -

-
- -
- -

Fits in with your theme

-

- Fully skinnable, CSS built with Sass and an - optional theme for Bootstrap 3. -

-
-
- -
-
- -

Fully extensible

-

- The plugin system - allows you to easily customize Select2 to work exactly how you want it - to. -

-
- -
- -

Dynamic item creation

-

- Allow users to type in a new option and - add it on the fly. -

-
- -
- -

Full browser support

-

Support for both modern and legacy browsers is built-in, even including Internet Explorer 8.

-
-
-
- -
- -
-

- Getting started with Select2 -

- -

- In order to use Select2, you must include the JavaScript and CSS file on - your website. You can get these files built for you from many different - locations. -

- -

- Using Select2 from a CDN -

- -

- Select2 is hosted on both the - cdnjs and - jsDelivr CDNs, allowing - you to quickly include Select2 on your website. -

- -
    -
  1. -

    - Include the following lines of code in the <head> - section of your HTML. -

    - -{% highlight html %} - - -{% endhighlight %} - -
    - - Immediately following a new release, it takes some time for CDNs to - catch up and get the new versions live on the CDN. -
    -
  2. -
  3. -

    - Initialize Select2 on the <select> element that you - want to make awesome. -

    - -{% highlight html %} - -{% endhighlight %} - -
  4. -
  5. - Check out the examples page to start using - the additional features of Select2. -
  6. -
- -

- Downloading the code locally -

- -

- In some situations, you can't use Select2 from a CDN and you must include - the files through your own static file servers. -

- -
    -
  1. -

    - - Download the code - - from GitHub and copy the dist directory to your project. -

    -
  2. -
  3. -

    - Include the following lines of code in the <head> - section of your HTML. -

    - -{% highlight html %} - - -{% endhighlight %} - -
  4. -
  5. - Check out the examples page to start using - the additional features of Select2. -
  6. -
-
- -
-

- The different Select2 builds -

- -

- Select2 provides multiple builds that are tailored to different - environments where it is going to be used. If you think you need to use - Select2 in a nonstandard environment, like when you are using AMD, you - should read over the list below. -

- - - - - - - - - - - - - - - - - - -
Build nameWhen you should use it
- Standard (select2.js / select2.min.js) - - This is the build that most people should be using for Select2. It - includes the most commonly used features. -
- Full (select2.full.js / select2.full.min.js) - - You should only use this build if you need the additional features - from Select2, like the - compatibility modules or - recommended includes like - jquery.mousewheel -
-
-
+ + + + + select2 + + + + + \ No newline at end of file diff --git a/docs/options-old.html b/docs/options-old.html deleted file mode 100644 index 65690d18..00000000 --- a/docs/options-old.html +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: default -title: Options - Select2 -slug: options ---- - -
-
-

- Options -

-
-
- -
-
-
- - {% include options-old/core-options.html %} - {% include options-old/dropdown.html %} - {% include options-old/events.html %} - {% include options-old/adapters.html %} - {% include options-old/setting-default-options.html %} - {% include options-old/backwards-compatibility.html %} - -
- -
-
- - diff --git a/docs/options.html b/docs/options.html deleted file mode 100644 index 5670c1cf..00000000 --- a/docs/options.html +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: default -title: Options - Select2 -slug: options ---- - -
-
-

- Options -

-

- Select2 supports a wide variety of options that allow you to customize it to your needs. -

-
-
- -
-
-
- {% include options/introduction.html %} - {% include options/core.html %} - {% include options/data.html %} - {% include options/selections.html %} - {% include options/dropdown.html %} - {% include options/events.html %} - {% include options/compatibility.html %} -
- -
-
- - diff --git a/docs/vendor/fonts/FontAwesome.otf b/docs/vendor/fonts/FontAwesome.otf deleted file mode 100644 index 3ed7f8b4..00000000 Binary files a/docs/vendor/fonts/FontAwesome.otf and /dev/null differ diff --git a/docs/vendor/fonts/fontawesome-webfont.eot b/docs/vendor/fonts/fontawesome-webfont.eot deleted file mode 100644 index 9b6afaed..00000000 Binary files a/docs/vendor/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/docs/vendor/fonts/fontawesome-webfont.svg b/docs/vendor/fonts/fontawesome-webfont.svg deleted file mode 100644 index d05688e9..00000000 --- a/docs/vendor/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,655 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/vendor/fonts/fontawesome-webfont.ttf b/docs/vendor/fonts/fontawesome-webfont.ttf deleted file mode 100644 index 26dea795..00000000 Binary files a/docs/vendor/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/docs/vendor/fonts/fontawesome-webfont.woff b/docs/vendor/fonts/fontawesome-webfont.woff deleted file mode 100644 index dc35ce3c..00000000 Binary files a/docs/vendor/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/docs/vendor/fonts/fontawesome-webfont.woff2 b/docs/vendor/fonts/fontawesome-webfont.woff2 deleted file mode 100644 index 500e5172..00000000 Binary files a/docs/vendor/fonts/fontawesome-webfont.woff2 and /dev/null differ diff --git a/docs/vendor/images/flags/ak.png b/docs/vendor/images/flags/ak.png deleted file mode 100755 index d79dc4fe..00000000 Binary files a/docs/vendor/images/flags/ak.png and /dev/null differ diff --git a/docs/vendor/images/flags/al.png b/docs/vendor/images/flags/al.png deleted file mode 100755 index a729794e..00000000 Binary files a/docs/vendor/images/flags/al.png and /dev/null differ diff --git a/docs/vendor/images/flags/ar.png b/docs/vendor/images/flags/ar.png deleted file mode 100755 index 6357a8f6..00000000 Binary files a/docs/vendor/images/flags/ar.png and /dev/null differ diff --git a/docs/vendor/images/flags/az.png b/docs/vendor/images/flags/az.png deleted file mode 100755 index b6d8aaea..00000000 Binary files a/docs/vendor/images/flags/az.png and /dev/null differ diff --git a/docs/vendor/images/flags/ca.png b/docs/vendor/images/flags/ca.png deleted file mode 100755 index 9d6d955f..00000000 Binary files a/docs/vendor/images/flags/ca.png and /dev/null differ diff --git a/docs/vendor/images/flags/co.png b/docs/vendor/images/flags/co.png deleted file mode 100755 index 888e8308..00000000 Binary files a/docs/vendor/images/flags/co.png and /dev/null differ diff --git a/docs/vendor/images/flags/ct.png b/docs/vendor/images/flags/ct.png deleted file mode 100755 index a953918a..00000000 Binary files a/docs/vendor/images/flags/ct.png and /dev/null differ diff --git a/docs/vendor/images/flags/de.png b/docs/vendor/images/flags/de.png deleted file mode 100755 index 1bfb3bad..00000000 Binary files a/docs/vendor/images/flags/de.png and /dev/null differ diff --git a/docs/vendor/images/flags/fl.png b/docs/vendor/images/flags/fl.png deleted file mode 100755 index 199a2f16..00000000 Binary files a/docs/vendor/images/flags/fl.png and /dev/null differ diff --git a/docs/vendor/images/flags/ga.png b/docs/vendor/images/flags/ga.png deleted file mode 100755 index 03f52bb8..00000000 Binary files a/docs/vendor/images/flags/ga.png and /dev/null differ diff --git a/docs/vendor/images/flags/hi.png b/docs/vendor/images/flags/hi.png deleted file mode 100755 index 36de7a58..00000000 Binary files a/docs/vendor/images/flags/hi.png and /dev/null differ diff --git a/docs/vendor/images/flags/ia.png b/docs/vendor/images/flags/ia.png deleted file mode 100755 index c2c4cf0f..00000000 Binary files a/docs/vendor/images/flags/ia.png and /dev/null differ diff --git a/docs/vendor/images/flags/id.png b/docs/vendor/images/flags/id.png deleted file mode 100755 index bfbf897f..00000000 Binary files a/docs/vendor/images/flags/id.png and /dev/null differ diff --git a/docs/vendor/images/flags/il.png b/docs/vendor/images/flags/il.png deleted file mode 100755 index 5c13e67a..00000000 Binary files a/docs/vendor/images/flags/il.png and /dev/null differ diff --git a/docs/vendor/images/flags/in.png b/docs/vendor/images/flags/in.png deleted file mode 100755 index 5952580b..00000000 Binary files a/docs/vendor/images/flags/in.png and /dev/null differ diff --git a/docs/vendor/images/flags/ks.png b/docs/vendor/images/flags/ks.png deleted file mode 100755 index 9190b24d..00000000 Binary files a/docs/vendor/images/flags/ks.png and /dev/null differ diff --git a/docs/vendor/images/flags/ky.png b/docs/vendor/images/flags/ky.png deleted file mode 100755 index 5c8d0cad..00000000 Binary files a/docs/vendor/images/flags/ky.png and /dev/null differ diff --git a/docs/vendor/images/flags/la.png b/docs/vendor/images/flags/la.png deleted file mode 100755 index 3f2c4785..00000000 Binary files a/docs/vendor/images/flags/la.png and /dev/null differ diff --git a/docs/vendor/images/flags/ma.png b/docs/vendor/images/flags/ma.png deleted file mode 100755 index a5020813..00000000 Binary files a/docs/vendor/images/flags/ma.png and /dev/null differ diff --git a/docs/vendor/images/flags/md.png b/docs/vendor/images/flags/md.png deleted file mode 100755 index 1717a264..00000000 Binary files a/docs/vendor/images/flags/md.png and /dev/null differ diff --git a/docs/vendor/images/flags/me.png b/docs/vendor/images/flags/me.png deleted file mode 100755 index 7e696f3e..00000000 Binary files a/docs/vendor/images/flags/me.png and /dev/null differ diff --git a/docs/vendor/images/flags/mi.png b/docs/vendor/images/flags/mi.png deleted file mode 100755 index 49494fcf..00000000 Binary files a/docs/vendor/images/flags/mi.png and /dev/null differ diff --git a/docs/vendor/images/flags/mn.png b/docs/vendor/images/flags/mn.png deleted file mode 100755 index 602f36b3..00000000 Binary files a/docs/vendor/images/flags/mn.png and /dev/null differ diff --git a/docs/vendor/images/flags/mo.png b/docs/vendor/images/flags/mo.png deleted file mode 100755 index 413ea1a6..00000000 Binary files a/docs/vendor/images/flags/mo.png and /dev/null differ diff --git a/docs/vendor/images/flags/ms.png b/docs/vendor/images/flags/ms.png deleted file mode 100755 index d3e4a1cd..00000000 Binary files a/docs/vendor/images/flags/ms.png and /dev/null differ diff --git a/docs/vendor/images/flags/mt.png b/docs/vendor/images/flags/mt.png deleted file mode 100755 index 6822acb9..00000000 Binary files a/docs/vendor/images/flags/mt.png and /dev/null differ diff --git a/docs/vendor/images/flags/nc.png b/docs/vendor/images/flags/nc.png deleted file mode 100755 index 9555820d..00000000 Binary files a/docs/vendor/images/flags/nc.png and /dev/null differ diff --git a/docs/vendor/images/flags/nd.png b/docs/vendor/images/flags/nd.png deleted file mode 100755 index 87e401cf..00000000 Binary files a/docs/vendor/images/flags/nd.png and /dev/null differ diff --git a/docs/vendor/images/flags/ne.png b/docs/vendor/images/flags/ne.png deleted file mode 100755 index a69e15fc..00000000 Binary files a/docs/vendor/images/flags/ne.png and /dev/null differ diff --git a/docs/vendor/images/flags/nh.png b/docs/vendor/images/flags/nh.png deleted file mode 100755 index d6ad1cb6..00000000 Binary files a/docs/vendor/images/flags/nh.png and /dev/null differ diff --git a/docs/vendor/images/flags/nj.png b/docs/vendor/images/flags/nj.png deleted file mode 100755 index f2c64660..00000000 Binary files a/docs/vendor/images/flags/nj.png and /dev/null differ diff --git a/docs/vendor/images/flags/nm.png b/docs/vendor/images/flags/nm.png deleted file mode 100755 index c2731811..00000000 Binary files a/docs/vendor/images/flags/nm.png and /dev/null differ diff --git a/docs/vendor/images/flags/nv.png b/docs/vendor/images/flags/nv.png deleted file mode 100755 index 8f1a855d..00000000 Binary files a/docs/vendor/images/flags/nv.png and /dev/null differ diff --git a/docs/vendor/images/flags/ny.png b/docs/vendor/images/flags/ny.png deleted file mode 100755 index 794b86e3..00000000 Binary files a/docs/vendor/images/flags/ny.png and /dev/null differ diff --git a/docs/vendor/images/flags/oh.png b/docs/vendor/images/flags/oh.png deleted file mode 100755 index 08601a6d..00000000 Binary files a/docs/vendor/images/flags/oh.png and /dev/null differ diff --git a/docs/vendor/images/flags/ok.png b/docs/vendor/images/flags/ok.png deleted file mode 100755 index 543be913..00000000 Binary files a/docs/vendor/images/flags/ok.png and /dev/null differ diff --git a/docs/vendor/images/flags/or.png b/docs/vendor/images/flags/or.png deleted file mode 100755 index 846b4a69..00000000 Binary files a/docs/vendor/images/flags/or.png and /dev/null differ diff --git a/docs/vendor/images/flags/pa.png b/docs/vendor/images/flags/pa.png deleted file mode 100755 index 55f6c0ff..00000000 Binary files a/docs/vendor/images/flags/pa.png and /dev/null differ diff --git a/docs/vendor/images/flags/ri.png b/docs/vendor/images/flags/ri.png deleted file mode 100755 index 5cece5db..00000000 Binary files a/docs/vendor/images/flags/ri.png and /dev/null differ diff --git a/docs/vendor/images/flags/sc.png b/docs/vendor/images/flags/sc.png deleted file mode 100755 index 9e393039..00000000 Binary files a/docs/vendor/images/flags/sc.png and /dev/null differ diff --git a/docs/vendor/images/flags/sd.png b/docs/vendor/images/flags/sd.png deleted file mode 100755 index 154618f4..00000000 Binary files a/docs/vendor/images/flags/sd.png and /dev/null differ diff --git a/docs/vendor/images/flags/tn.png b/docs/vendor/images/flags/tn.png deleted file mode 100755 index 321b48cb..00000000 Binary files a/docs/vendor/images/flags/tn.png and /dev/null differ diff --git a/docs/vendor/images/flags/tx.png b/docs/vendor/images/flags/tx.png deleted file mode 100755 index 0914b319..00000000 Binary files a/docs/vendor/images/flags/tx.png and /dev/null differ diff --git a/docs/vendor/images/flags/ut.png b/docs/vendor/images/flags/ut.png deleted file mode 100755 index 7a01ae63..00000000 Binary files a/docs/vendor/images/flags/ut.png and /dev/null differ diff --git a/docs/vendor/images/flags/va.png b/docs/vendor/images/flags/va.png deleted file mode 100755 index ce58c015..00000000 Binary files a/docs/vendor/images/flags/va.png and /dev/null differ diff --git a/docs/vendor/images/flags/vt.png b/docs/vendor/images/flags/vt.png deleted file mode 100755 index fe1b19fe..00000000 Binary files a/docs/vendor/images/flags/vt.png and /dev/null differ diff --git a/docs/vendor/images/flags/wa.png b/docs/vendor/images/flags/wa.png deleted file mode 100755 index 0c0d8f0f..00000000 Binary files a/docs/vendor/images/flags/wa.png and /dev/null differ diff --git a/docs/vendor/images/flags/wi.png b/docs/vendor/images/flags/wi.png deleted file mode 100755 index 2569f176..00000000 Binary files a/docs/vendor/images/flags/wi.png and /dev/null differ diff --git a/docs/vendor/images/flags/wv.png b/docs/vendor/images/flags/wv.png deleted file mode 100755 index b4038996..00000000 Binary files a/docs/vendor/images/flags/wv.png and /dev/null differ diff --git a/docs/vendor/images/flags/wy.png b/docs/vendor/images/flags/wy.png deleted file mode 100755 index 82a453cc..00000000 Binary files a/docs/vendor/images/flags/wy.png and /dev/null differ diff --git a/docs/vendor/js/anchor.min.js b/docs/vendor/js/anchor.min.js deleted file mode 100755 index 68c3cb70..00000000 --- a/docs/vendor/js/anchor.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * AnchorJS - v1.1.1 - 2015-05-23 - * https://github.com/bryanbraun/anchorjs - * Copyright (c) 2015 Bryan Braun; Licensed MIT - */ -function AnchorJS(A){"use strict";this.options=A||{},this._applyRemainingDefaultOptions=function(A){this.options.icon=this.options.hasOwnProperty("icon")?A.icon:"",this.options.visible=this.options.hasOwnProperty("visible")?A.visible:"hover",this.options.placement=this.options.hasOwnProperty("placement")?A.placement:"right",this.options.class=this.options.hasOwnProperty("class")?A.class:""},this._applyRemainingDefaultOptions(A),this.add=function(A){var e,t,o,n,i,s,a,l,c,r,h,g,B,Q;if(this._applyRemainingDefaultOptions(this.options),A){if("string"!=typeof A)throw new Error("The selector provided to AnchorJS was invalid.")}else A="h1, h2, h3, h4, h5, h6";if(e=document.querySelectorAll(A),0===e.length)return!1;for(this._addBaselineStyles(),t=document.querySelectorAll("[id]"),o=[].map.call(t,function(A){return A.id}),i=0;i',B=document.createElement("div"),B.innerHTML=g,Q=B.childNodes,"always"===this.options.visible&&(Q[0].style.opacity="1"),""===this.options.icon&&(Q[0].style.fontFamily="anchorjs-icons",Q[0].style.fontStyle="normal",Q[0].style.fontVariant="normal",Q[0].style.fontWeight="normal"),"left"===this.options.placement?(Q[0].style.position="absolute",Q[0].style.marginLeft="-1em",Q[0].style.paddingRight="0.5em",e[i].insertBefore(Q[0],e[i].firstChild)):(Q[0].style.paddingLeft="0.375em",e[i].appendChild(Q[0]))}return this},this.remove=function(A){for(var e,t=document.querySelectorAll(A),o=0;othis.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('