-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update select2 dist to 4.0.3 Removes the old select2 3.5.2 files, and add select2 4.0.3, including all the i18n files (we're not using these yet, but we could be). * Update Select2 field init calls for 4.0.3 Updates the select initialization syntax to work with the latest Select2 plugin version. Replaces the old initSelection methods with templating methods on the ajax data adapter. Should be completely functional except for the initial selection. * Update sortable attribute for new selectors Updates the sortable property of multiple select boxes to account for the new selectors used in Select2 4.0.3 * Update model on updates to select element Make sure to save these attributes, even when the field is multiple. This is necessary because otherwise a select field updates its value as an array. * Coerce select field value to string when saving to model The shortcode attribute kind of has to be a string, so we should make sure it's set as a string when saving to the model. * Get preselection & sorting working with all select2 fields Selecting terms in, reordering, saving changes to, and reopening with preselected results now work for user, post, and term selection fields - both singular and multiple. * Refactor all select2 fields to use a common base class Working on getting rid of a lot of code duplication by makins all of these select2-powered fields inherit from a common base class. * Remove inline styles We can easily enough just build these styles into our stylesheet, so there's no need to do this nonsense, printing the same styles on the page three separate times. * Remove blank option on term select field Left over from when I was trying a different approach to this field. * Select2 v4 styles * Select2 input changed - check if is array not is object * Select2 callback Return empty results not null * Tidy SCSS
- Loading branch information
1 parent
8d2f567
commit 0ac7ac1
Showing
72 changed files
with
13,431 additions
and
5,447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.edit-shortcode-form { | ||
.select2-container { | ||
min-width: 300px; | ||
} | ||
|
||
.select2-container a { | ||
transition: none; | ||
-webkit-transition: none; | ||
} | ||
|
||
.select2-drop { | ||
z-index: 160001; | ||
} | ||
|
||
.select2 li { | ||
margin: 0; | ||
} | ||
|
||
.select2-selection__rendered { | ||
vertical-align: top; | ||
} | ||
|
||
.select2-container .select2-search--inline .select2-search__field { | ||
margin-top: 7px; | ||
} | ||
|
||
.select2-container--default .select2-selection--multiple { | ||
border-radius: 0; | ||
border-color: #ddd; | ||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07); | ||
background-color: #fff; | ||
color: #333; | ||
outline: none; | ||
} | ||
|
||
.select2-container--default.select2-container--focus .select2-selection--multiple { | ||
border-color: #5b9dd9; | ||
box-shadow: 0 0 2px rgba(30,140,190,.8); | ||
} | ||
|
||
} | ||
|
||
.select2-container { | ||
z-index: 160000; // Make sure Select2 UI is visible above media modal | ||
max-width: 300px; | ||
} | ||
|
||
.select2-results li { | ||
margin: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,3 +159,4 @@ | |
} | ||
|
||
@import 'field-image'; | ||
@import 'select2-fields'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.