Updating Select2 JS to 3.4.1

This commit is contained in:
AppleGrew (applegrew) 2013-07-06 10:04:18 +05:30
parent fd6357b827
commit fe1fb4fd76
7 changed files with 975 additions and 435 deletions

8
README
View file

@ -49,6 +49,14 @@ Special Thanks
Changelog Summary
=================
### v4.1.0
* Updated Select2 to version 3.4.1. **Please note**, that if you need any of the Select2 locale files, then you need to download them yourself from http://ivaynberg.github.com/select2/ and add to your project.
* Address isssue[#36](https://github.com/applegrew/django-select2/issues/36) - Fix importerror under django1.6.
* Fuxed the way `setup.py` handles unicode files while minfying them during package build.
* Address isssue[#39](https://github.com/applegrew/django-select2/issues/39) - MultipleSelect2HiddenInput.render() should use mark_safe().
* Address isssue[#45](https://github.com/applegrew/django-select2/issues/45) - MultipleSelect2HiddenInput returns bad has_changed value.
### v4.0.0
* Main version number bumped to bring your attention to the fact that the default Id generation scheme has now changed. Now Django Select2 will use hashed paths of fields to generate their Ids. The old scheme of generating random Ids are still there. You can enable that by setting `GENERATE_RANDOM_SELECT2_ID` to `True`.

View file

@ -49,6 +49,14 @@ Special Thanks
Changelog Summary
=================
### v4.1.0
* Updated Select2 to version 3.4.1. **Please note**, that if you need any of the Select2 locale files, then you need to download them yourself from http://ivaynberg.github.com/select2/ and add to your project.
* Address isssue[#36](https://github.com/applegrew/django-select2/issues/36) - Fix importerror under django1.6.
* Fuxed the way `setup.py` handles unicode files while minfying them during package build.
* Address isssue[#39](https://github.com/applegrew/django-select2/issues/39) - MultipleSelect2HiddenInput.render() should use mark_safe().
* Address isssue[#45](https://github.com/applegrew/django-select2/issues/45) - MultipleSelect2HiddenInput returns bad has_changed value.
### v4.0.0
* Main version number bumped to bring your attention to the fact that the default Id generation scheme has now changed. Now Django Select2 will use hashed paths of fields to generate their Ids. The old scheme of generating random Ids are still there. You can enable that by setting `GENERATE_RANDOM_SELECT2_ID` to `True`.

View file

@ -77,7 +77,7 @@ The view - `Select2View`, exposed here is meant to be used with 'Heavy' fields a
import logging
logger = logging.getLogger(__name__)
__version__ = "4.0.0"
__version__ = "4.1.0"
__RENDER_SELECT2_STATICS = False
__ENABLE_MULTI_PROCESS_SUPPORT = False

View file

@ -1,13 +1,14 @@
/*
Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
*/
.select2-container {
margin: 0;
position: relative;
display: inline-block;
/* inline-block for ie7 */
zoom: 1;
*display: inline;
vertical-align: top;
vertical-align: middle;
}
.select2-container,
@ -81,7 +82,11 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
background-image: linear-gradient(top, #eeeeee 0%,#ffffff 90%);
}
.select2-container .select2-choice span {
.select2-container.select2-allowclear .select2-choice .select2-chosen {
margin-right: 42px;
}
.select2-container .select2-choice > .select2-chosen {
margin-right: 26px;
display: block;
overflow: hidden;
@ -94,11 +99,11 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
}
.select2-container .select2-choice abbr {
display: block;
display: none;
width: 12px;
height: 12px;
position: absolute;
right: 26px;
right: 24px;
top: 8px;
font-size: 1px;
@ -109,22 +114,45 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
cursor: pointer;
outline: 0;
}
.select2-container.select2-allowclear .select2-choice abbr {
display: inline-block;
}
.select2-container .select2-choice abbr:hover {
background-position: right -11px;
cursor: pointer;
}
.select2-drop-mask {
.select2-drop-undermask {
border: 0;
margin: 0;
padding: 0;
position: absolute;
left: 0;
top: 0;
z-index: 9998;
background-color: transparent;
filter: alpha(opacity=0);
}
.select2-drop-mask {
border: 0;
margin: 0;
padding: 0;
position: absolute;
left: 0;
top: 0;
z-index: 9998;
/* styles required for IE to work */
background-color: #fff;
opacity: 0;
filter: alpha(opacity=0);
}
.select2-drop {
width: 100%;
margin-top:-1px;
margin-top: -1px;
position: absolute;
z-index: 9999;
top: 100%;
@ -143,6 +171,15 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
}
.select2-drop-auto-width {
border-top: 1px solid #aaa;
width: auto;
}
.select2-drop-auto-width .select2-search {
padding-top: 4px;
}
.select2-drop.select2-drop-above {
margin-top: 1px;
border-top: 1px solid #aaa;
@ -157,8 +194,17 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
}
.select2-container .select2-choice div {
display: block;
.select2-drop-active {
border: 1px solid #5897fb;
border-top: none;
}
.select2-drop.select2-drop-above.select2-drop-active {
border-top: 1px solid #5897fb;
}
.select2-container .select2-choice .select2-arrow {
display: inline-block;
width: 18px;
height: 100%;
position: absolute;
@ -184,7 +230,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%);
}
.select2-container .select2-choice div b {
.select2-container .select2-choice .select2-arrow b {
display: block;
width: 100%;
height: 100%;
@ -205,12 +251,6 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
white-space: nowrap;
}
.select2-search-hidden {
display: block;
position: absolute;
left: -10000px;
}
.select2-search input {
width: 100%;
height: auto !important;
@ -288,12 +328,26 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
}
.select2-dropdown-open .select2-choice div {
.select2-dropdown-open.select2-drop-above .select2-choice,
.select2-dropdown-open.select2-drop-above .select2-choices {
border: 1px solid #5897fb;
border-top-color: transparent;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, white), color-stop(0.5, #eeeeee));
background-image: -webkit-linear-gradient(center top, white 0%, #eeeeee 50%);
background-image: -moz-linear-gradient(center top, white 0%, #eeeeee 50%);
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
background-image: -ms-linear-gradient(bottom, #ffffff 0%,#eeeeee 50%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
background-image: linear-gradient(bottom, #ffffff 0%,#eeeeee 50%);
}
.select2-dropdown-open .select2-choice .select2-arrow {
background: transparent;
border-left: none;
filter: none;
}
.select2-dropdown-open .select2-choice div b {
.select2-dropdown-open .select2-choice .select2-arrow b {
background-position: -18px 1px;
}
@ -310,6 +364,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
.select2-results ul.select2-result-sub {
margin: 0;
padding-left: 0;
}
.select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
@ -335,6 +390,8 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
margin: 0;
cursor: pointer;
min-height: 1em;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
@ -407,14 +464,14 @@ disabled look for disabled choices in the results dropdown
cursor: default;
}
.select2-container.select2-container-disabled .select2-choice div {
.select2-container.select2-container-disabled .select2-choice .select2-arrow {
background-color: #f4f4f4;
background-image: none;
border-left: 0;
}
.select2-container.select2-container-disabled .select2-choice abbr {
display: none
display: none;
}
@ -527,7 +584,7 @@ disabled look for disabled choices in the results dropdown
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
}
.select2-container-multi .select2-choices .select2-search-choice span {
.select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
cursor: default;
}
.select2-container-multi .select2-choices .select2-search-choice-focus {
@ -573,8 +630,8 @@ disabled look for disabled choices in the results dropdown
background-color: #f4f4f4;
}
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close {
display: none;
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none;
background:none;
}
/* end multiselect */
@ -584,15 +641,35 @@ disabled look for disabled choices in the results dropdown
text-decoration: underline;
}
.select2-offscreen {
.select2-offscreen, .select2-offscreen:focus {
clip: rect(0 0 0 0);
width: 1px;
height: 1px;
border: 0;
margin: 0;
padding: 0;
overflow: hidden;
position: absolute;
left: -10000px;
outline: 0;
left: 0px;
}
.select2-display-none {
display: none;
}
.select2-measure-scrollbar {
position: absolute;
top: -10000px;
left: -10000px;
width: 100px;
height: 100px;
overflow: scroll;
}
/* Retina-ize icons */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) {
.select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice div b {
.select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice .select2-arrow b {
background-image: url('select2x2.png') !important;
background-repeat: no-repeat !important;
background-size: 60px 40px !important;

File diff suppressed because it is too large Load diff

23
django_select2/static/js/select2.min.js vendored Normal file → Executable file

File diff suppressed because one or more lines are too long

Binary file not shown.