- review Select2 CSS;

- fixes for member directory;
This commit is contained in:
nikitasinelnikov
2020-01-29 13:22:03 +02:00
parent 345c05838c
commit f7bbafda7b
5 changed files with 143 additions and 97 deletions
+102 -81
View File
@@ -831,11 +831,11 @@ small.um-max-filesize span{
right: 10px;
}
/* Select2 4.0*/
/* Customize Select2 CSS */
.select2-container.select2-container--open {
z-index: 9999999;
}
.select2.select2-container .select2-selection{
.select2.select2-container .select2-selection {
display: block !important;
height: 40px;
padding: 0 0 0 12px !important;
@@ -860,10 +860,24 @@ small.um-max-filesize span{
background-color: #fff !important;
border: 1px solid #ddd !important;
}
.select2.select2-container .select2-selection .select2-selection__arrow b[role=presentation]{
display:none;
.select2.select2-container .select2-selection .select2-selection__arrow {
display: inline-block !important;
width: 34px !important;
height: 100% !important;
position: absolute !important;
right: 0 !important;
top: 0 !important;
-moz-border-radius: 0 2px 2px 0 !important;
-webkit-border-radius: 0 2px 2px 0 !important;
border-radius: 0 2px 2px 0 !important;
background-clip: padding-box !important;
text-align: center !important;
background: transparent !important;
border-left: 0 !important;
}
.select2.select2-container .select2-selection .select2-selection__arrow:before{
.select2.select2-container .select2-selection .select2-selection__arrow:before {
content: "\f3d0" !important;
font-size: 27px !important;
font-family: "Ionicons" !important;
@@ -873,120 +887,127 @@ small.um-max-filesize span{
line-height: 35px;
color: #aaaaaa;
}
.select2.select2-container .select2-selection .select2-selection__arrow {
display: inline-block !important;
width: 34px !important;
height: 100% !important;
position: absolute !important;
right: 0 !important;
top: 0 !important;
-moz-border-radius: 0 2px 2px 0 !important;
-webkit-border-radius: 0 2px 2px 0 !important;
border-radius: 0 2px 2px 0 !important;
background-clip: padding-box !important;
text-align: center !important;
background: transparent !important;
border-left: 0 !important;
.select2.select2-container .select2-selection .select2-selection__arrow b[role="presentation"] {
display:none;
}
.select2-container.select2-container--open .select2-dropdown{
.select2-container.select2-container--open .select2-dropdown {
border: 1px solid #ddd !important;
border-radius: 0;
}
.select2-results li{
.select2-container.select2-container--open .select2-dropdown .select2-results li {
list-style: none;
display: list-item;
background-image: none;
font-size: 15px;
margin: 5px !important;
padding: 3px 0 !important;
color: #666 !important;
}
.select2-results li {
padding: 3px 7px 4px !important;
cursor: pointer;
min-height: 1em !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 37px;
.select2.select2-container .select2-selection.select2-selection--multiple {
height: auto !important;
line-height: 0.8 !important;
}
.select2-results li.select2-results__option.select2-results__option--highlighted{
.select2-container--default .select2-selection--single .select2-selection__rendered {
padding-left: 0 !important;
line-height: 37px;
}
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
line-height: 37px;
box-sizing: border-box;
list-style: none;
margin: 0;
padding-left: 0 !important;
padding-right: 30px;
width: 100%;
font-size: 13px;
}
.select2-results li.select2-results__option.select2-results__option--highlighted {
background: none !important;
background: #f4f4f4 !important;
color: #666 !important;
}
.select2-container--default .select2-results__option[aria-selected=true] {
.select2-container--default .select2-results__option[aria-selected="true"] {
background-color: #ddd;
}
.select2-selection__clear{
.select2-container--default .select2-selection--single .select2-selection__clear,
.select2-container--default .select2-selection--multiple .select2-selection__clear {
right: 10px;
font-size: 30px;
color: #aaaaaa !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
box-sizing: border-box;
list-style: none;
margin: 0;
padding: 0px;
width: 100%;
line-height: 20px;
font-size: 13px;
}
.select2.select2-container .select2-selection.select2-selection--multiple {
height: auto !important;
margin: 0 !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__clear {
cursor: pointer;
float: right;
top: -6px;
margin-right: -9px;
font-size: 15px;
position: absolute;
position: absolute;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice{
.select2-container--default .select2-selection--multiple .select2-selection__choice {
padding: 3px 3px 3px 5px;
}
.select2-container .select2-search--inline {
line-height: 38px;
.um .um-form .select2-container .select2-search.select2-search--inline > input {
border: none !important;
padding: 0 !important;
border-radius: 0 !important;
}
.um-field-select .um-field-area .um-field-icon,
.um-field-multiselect .um-field-area .um-field-icon{
z-index: 99999999;
}
.um-field-select .um-field-area.um-field-area-has-icon .select2-selection__rendered{
text-indent: 20px;
}
.um-field-multiselect .um-field-area.um-field-area-has-icon ul:first-child{
margin-left: 30px !important;
.um .um-form .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
overflow-x: hidden;
text-overflow: ellipsis;
max-width: 100%;
box-sizing: border-box;
}
/*
- Multi-select
*/
.um-field .select2-selection--multiple .select2-search{
clear: both;
float: none;
margin-right: 12px;
padding-top: 0.5rem;
position: relative;
/*.um-field .select2-selection--multiple .select2-search{*/
/*clear: both;*/
/*float: none;*/
/*margin-right: 12px;*/
/*padding-top: 0.5rem;*/
/*position: relative;*/
/*}*/
/*.um-field .select2-selection--multiple .select2-search:first-of-type{*/
/*padding-top: 12px;*/
/*}*/
/*.um-field .select2-selection--multiple .select2-search::before {*/
/*content: "\f21f";*/
/*font-family: "Ionicons";*/
/*font-size: 1.4rem;*/
/*line-height: 2rem;*/
/*right: 0.3rem;*/
/*position: absolute;*/
/*}*/
/*.um-field .select2-selection--multiple .select2-search input.select2-search__field{*/
/*background-color: rgba(128,128,128,0.1) !important;*/
/*height: 2rem !important;*/
/*width: 100% !important;*/
/*}*/
/* @todo maybe deprecated and used only for select and multiselect */
.um-field-select .um-field-area .um-field-icon,
.um-field-multiselect .um-field-area .um-field-icon {
z-index: 99999999;
}
.um-field .select2-selection--multiple .select2-search:first-of-type{
padding-top: 12px;
.um-field-select .um-field-area.um-field-area-has-icon .select2-selection__rendered {
text-indent: 20px;
}
.um-field .select2-selection--multiple .select2-search::before {
content: "\f21f";
font-family: "Ionicons";
font-size: 1.4rem;
line-height: 2rem;
right: 0.3rem;
position: absolute;
}
.um-field .select2-selection--multiple .select2-search input.select2-search__field{
background-color: rgba(128,128,128,0.1) !important;
height: 2rem !important;
width: 100% !important;
.um-field-multiselect .um-field-area.um-field-area-has-icon ul:first-child {
margin-left: 30px !important;
}
+16 -3
View File
@@ -300,12 +300,14 @@ function um_ajax_get_members( directory, args ) {
if ( typeof value != 'undefined' ) {
request[ filter_name ] = value.split( '||' );
}
} else {
} else if ( filter.hasClass( 'um-text-filter-type' ) && filter.find('input[type="text"]').length ) {
var filter_name = filter.find('input[type="text"]').attr('name');
var value = um_get_data_for_directory( directory, 'filter_' + filter_name );
if ( typeof value != 'undefined' ) {
request[ filter_name ] = value;
}
} else {
request = wp.hooks.applyFilters( 'um_member_directory_custom_filter_handler', request, filter, directory );
}
});
}
@@ -491,7 +493,7 @@ function um_get_filters_data( directory ) {
filters_data.push( {'name':filter_name, 'label':filter_title, 'value_label':filter_value_title, 'value':filter_value[ i ], 'type':filter_type} );
});
} else if( filter.find('input[type="text"]').length ) {
} else if( filter.hasClass('um-text-filter-type') && filter.find('input[type="text"]').length ) {
filter_type = 'text';
filter_name = filter.find('input[type="text"]').attr('name');
@@ -530,6 +532,10 @@ function um_get_filters_data( directory ) {
filter_title = filter.find('div.um-slider-range').data('label');
filters_data.push( {'name':filter_name, 'label':filter_title, 'value_label':filter_value_title, 'value':[filter_value_from, filter_value_to], 'type':filter_type} );
} else {
filters_data = wp.hooks.applyFilters( 'um_member_directory_get_filter_data', filters_data, directory, filter );
}
});
@@ -1067,7 +1073,7 @@ jQuery(document.body).ready( function() {
return;
}
um_members_show_preloader(directory);
um_members_show_preloader( directory );
var removeItem = jQuery(this).data('value');
var filter_name = jQuery(this).data('name');
@@ -1138,6 +1144,8 @@ jQuery(document.body).ready( function() {
jQuery( '.um-search-filter #' + filter_name + '_from' ).val('');
jQuery( '.um-search-filter #' + filter_name + '_to' ).val('');
} else {
wp.hooks.doAction( 'um_member_directory_filter_remove', type, directory, filter_name, removeItem );
}
@@ -1256,6 +1264,8 @@ jQuery(document.body).ready( function() {
jQuery( '.um-search-filter #' + filter_name + '_from' ).val('');
jQuery( '.um-search-filter #' + filter_name + '_to' ).val('');
} else {
wp.hooks.doAction( 'um_member_directory_clear_filters', type, directory, filter_name, removeItem );
}
});
@@ -1302,6 +1312,7 @@ jQuery(document.body).ready( function() {
* First Page Loading
*/
wp.hooks.doAction( 'um_member_directory_on_first_pages_loading' );
//Init Directories
jQuery( '.um-directory' ).each( function() {
@@ -1562,6 +1573,8 @@ jQuery(document.body).ready( function() {
});
wp.hooks.doAction( 'um_member_directory_on_init', directory, hash );
var ignore_after_search = false;
ignore_after_search = wp.hooks.applyFilters( 'um_member_directory_ignore_after_search', ignore_after_search );
+1 -1
View File
File diff suppressed because one or more lines are too long