1
0
mirror of synced 2024-11-22 04:56:08 +03:00
Commit Graph

141 Commits

Author SHA1 Message Date
Florian Kissling
80dbd692db Don't show line numbers for one line code examples. 2015-04-28 01:17:01 +02:00
Florian Kissling
33b637dbf9 Ditch wrong .lead copy. 2015-04-28 01:16:18 +02:00
Florian Kissling
f73dc290fd Move most of the default CSS to partials/Sass. 2015-04-28 01:15:49 +02:00
Florian Kissling
a2b31e2240 Add animation to the "hamburger icon".
Courtesy of Julien Melissas, ref. http://codepen.io/JulienMelissas/pen/LEBGLj
2015-04-27 09:35:29 +02:00
Florian Kissling
7b62c7d444 Remove icon. 2015-04-27 09:31:42 +02:00
Florian Kissling
25a69716ac Add sidebar anchor navigation. 2015-04-27 09:31:28 +02:00
Florian Kissling
b68a7b38a0 Remove explicit "Home" link. 2015-04-25 04:35:55 +02:00
Florian Kissling
25ba1ef1f3 Prettify <pre> on homepage. 2015-04-25 04:34:15 +02:00
Florian Kissling
8a1a35aa15 Make "Download" button stand out a little more. 2015-04-24 03:41:08 +02:00
Florian Kissling
d813feaa7b Simplify homepage .jumbotron. 2015-04-24 03:38:00 +02:00
Florian Kissling
0474e69e6e Add .s2-docs-container to enable anchor.js. 2015-04-24 03:37:20 +02:00
Florian Kissling
15f9922437 Add .navbar-default. 2015-04-24 03:36:45 +02:00
Florian Kissling
481a2f89c9 Add ID. 2015-04-24 03:17:34 +02:00
Florian Kissling
69d8ac4485 Whitespace. 2015-04-24 03:10:54 +02:00
Florian Kissling
96cb7f56ae Move Google Analytics script to include. 2015-04-24 03:09:41 +02:00
Florian Kissling
d98cbcec21 Add a fixed sidebar with anchor navigation to the sidebar.
Borrowed from the Bootstrap doc implementation.
2015-04-24 03:02:56 +02:00
Florian Kissling
f8ecee7783 Add .jumbotron with headline and dummy .lead. 2015-04-24 02:56:28 +02:00
Florian Kissling
5a44b40ee6 Move .lead into .jumbotron. 2015-04-24 02:55:57 +02:00
Florian Kissling
a0b7afbf2f Add .jumbotron to #pre-release. 2015-04-24 02:55:26 +02:00
Florian Kissling
80899d973f A first shot at improving the .jumbotron styles. 2015-04-22 18:08:11 +02:00
Florian Kissling
8b344f18b7 Don't override Bootstraps default body font-size. 2015-04-22 18:06:42 +02:00
Florian Kissling
439e834b38 Group buttons for "Programmatic access" and "Disabled mode" demos.
This also gets rid of the colored buttons in favor of `.btn-default`, prevents wrapping of the "Destroy" button of the first button group of the "Programmatic access" demos to a second line and consistently places buttons below the Select2 widgets they apply to.

Ref. http://getbootstrap.com/components/#btn-groups.
2015-04-22 18:05:59 +02:00
Florian Kissling
102cadf02b Switch to the regular (white) Bootstrap navbar. 2015-04-22 17:42:40 +02:00
Florian Kissling
7bf7ab16c7 Separate "Release notes" from the "4.0 Announcement".
While the latter is part of the docs, the "Release notes" are linked to the GitHub "Releases" section; thus the added divider.
2015-04-22 17:42:11 +02:00
Florian Kissling
49c03ba6cf Remove code example text shadow. 2015-04-22 17:38:47 +02:00
Florian Kissling
ae80d23421 Remove the "About" section on the homepage.
With the additional footer navigation in place, it should be safe to remove these.
2015-04-09 21:19:22 +02:00
Florian Kissling
92052cb600 Expand footer navigation mimicking the Bootstrap docs footer.
Adds

 * version information
 * links to the GitHub repository, issues and releases
 * links to the examples and options
 * a link to the 3.5.2 docs

to the footer as well as namespaced styles for the footer in general as well as all the above.
2015-04-09 21:00:52 +02:00
Florian Kissling
df2122c00f Add anchor.js for pages using the default layout.
* adds styles for anchor.js (similar to the official Bootstrap docs)
 * currently results some of the generated links to have a suffix (e. g. examples.html#templating-1) added due to sections having the same ID as the headline copy that we want to link to
2015-04-09 20:27:45 +02:00
Kevin Brown
878de20d44 Fix typo in documentation
This closes https://github.com/select2/select2/issues/3213.
2015-04-02 11:29:44 -04:00
Tyler Pearson
c0dadf44a1 Fix misspelling 2015-03-19 20:58:57 -07:00
Kevin Brown
69e2d73c42 Bump version numbers for rc.2 2015-03-14 20:51:32 -04:00
Kevin Brown
a06379ce8d Normalize ids to string for remote data
This also fixes an issue where we were using the `full_name` for
the value instead of the `id` in the example, which technically
wasn't correct.

This closes https://github.com/select2/select2/issues/3148.
2015-03-14 20:36:06 -04:00
Kevin Brown
e5d97e0de0 Fixed the emphasis in the release announcement 2015-03-14 20:06:26 -04:00
Kevin Brown
d146313256 More about initSelection
In the past, `initSelection` was used for loading in data objects
for the pre-selected options. Now that Select2 is using a `<select>`
element, there is no need for doing this because the `<option>`
elements should provide the relevant information. So you can now
just pull this information from the remote data source
(or static array, in some cases) and build out the `<option>`
elements manually.

In most cases you don't need to go the full length with a custom
data adapter, but instead are just looking to pre-load elements on
the initial page load.

This improves https://github.com/select2/select2/issues/3116.
2015-03-14 19:58:50 -04:00
Kevin Brown
aa8978e551 Rip out the old AMD docs 2015-03-14 19:49:47 -04:00
Kevin Brown
d3c887286d Update CDN version numbers 2015-03-01 22:09:37 -05:00
Kevin Brown
9d6752e3ea Bumping version numbers for rc.1 release 2015-03-01 21:30:37 -05:00
Kevin Brown
5c9dc0e509 Added example for hiding search
This also fixes a possible issue where the `< 0` fallback would
not be used because the `minimumResultsForSearch` check would
always return false and never load in the module.

This closes https://github.com/select2/select2/pull/3077.
2015-02-27 20:37:48 -05:00
Kevin Brown
5ec852e18c Added documentation for <input type="text" />
This adds basic documentation explaining that there are compatibility
decorators for `<input type="text" />` support. This is not fully
compatible with all features and requires the use of an external
adapter like the `ArrayAdapter` or `AjaxAdapter` to provide a
reasonable way to query results.

This also triggers a warning if the adapter is used with a hidden
input, as the degraded functionality when there is no JavaScript
support should be discouraged.
2015-02-27 18:38:16 -05:00
Kevin Brown
5b95c0e834 Clarified the documentation README [ci skip]
The documentation README was previously intended to be read from
the documentation repository, not from the source repository.
This had the potential to give off the impression that documentation
pull requests were not allowed, when exactly the opposite is the
case.  The README has been improved to make it more clear how to
contribute pull requests to update the documentation.

Thanks to Brent Connor [1] for pointing out this issue over at
Stack Overflow [2].

[1]: https://stackoverflow.com/users/3954106/brent-connor
[2]: http://stackoverflow.com/q/28705192/359284
2015-02-24 17:27:16 -05:00
Kevin Brown
dc2f6d451a Fix example code for the old matcher 2015-02-24 14:18:07 -05:00
Kevin Brown
4271b10531 Add docs for three more options
This adds documentation for the follow options

- `minimumInputLength`
- `maximumInputLength`
- `minimumResultsForSearch`

This closes https://github.com/select2/select2/issues/3035.
2015-02-14 16:53:17 -05:00
Stephan Groß
a5532ee8a8 Fix typos 2015-02-13 11:36:21 +01:00
Kevin Brown
9d4ec4f85b Add templating documentation
This adds documentation for the `templateResult` and
`templateSelection` options.  The fact that placeholders and
custom messages are templated was noted, although most people
should be using the standard `text` property that they provide
anyway.  This fixes the templating link provided in the release
announcement to link to the correct location in the documentation.

This also adds support for the `templateSelection` function to
return a DocumentFragment or jQuery compatible object to be
passed back and rendered.

This closes https://github.com/select2/select2/issues/3005.
This closes https://github.com/select2/select2/issues/3019.
2015-02-09 19:27:10 -05:00
Kevin Brown
c9a8508a39 Add back closeOnSelect option
The `closeOnSelect` option was previously used to control whether
or not the dropdown was closed when an option was selected.  This
could be simulated by triggering the `open` event after the `close`
event was received, but it makes sense to abstract it out into a
decorator.

This also adds support for not closing the dropdown when the control
key is being held.  This is useful when multiple options need to be
selected in quick succession, so the dropdown does not have to be
reopened.

This also adds documentation that covers both changes.

This closes https://github.com/select2/select2/pull/2735.
This closes https://github.com/select2/select2/issues/3017.
2015-02-09 18:54:19 -05:00
Kevin Brown
caeb0ec9b7 Add jQuery 1.x data attribute note
This adds a note about how nested data attributes do not work in
jQuery 1.x due to a bug with the `$.fn.data` method.

This is for https://github.com/select2/select2/issues/2969.
2015-02-09 17:43:16 -05:00
Kevin Brown
8aca7a4085 Added templating example
This also fixes the case where `templateResult` does not return a
string, where it will fall back to jQuery to set the value of the
option.  This allows for the `templateResult` function to return a
jQuery or DOM element that contains the templated data.

Just like with the translation methods, only strings returned from
`templateResult` will be escaped.

The old flag icons have been transferred from the old repository to
the documentation, for use in the templates.  Unfortunately I cannot
find a license for them, but I suspect a license isn't actually
needed considering the state flags are public.

This closes https://github.com/select2/select2/issues/3005.
This closes https://github.com/select2/select2/issues/818.
2015-02-09 17:35:40 -05:00
Kevin Brown
bcc43139fd Merge pull request #3006 from WouterSioen/patch-1
Add rel=stylesheet to the cdn link.

Closes https://github.com/select2/select2/issues/3020.
2015-02-07 12:51:43 -05:00
Kevin Brown
7155adc718 Split out formatRepo and formatRepoSelection
This splits out the two templating functions that are referenced in
the documentation. The two functions were previously available in
the source code, but they were not named with the method names that
the documentation referred to.

This closes https://github.com/select2/select2/issues/2993.
2015-02-06 20:08:28 -05:00
Kevin Brown
631ae06c8d Fix broken Placeholder.js links
It appears as though GitHub has stopped serving the Placeholder.js
GitHub Pages site.  This broke placeholder support on older versions
of IE in the documentation and broke the link we had to the
polyfill.  Since the repository is still online, and the
documentation should work without an internet connection, the
JavaScript files have been pulled into the documentation folder.
2015-02-06 19:34:48 -05:00