mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- review Select2 CSS;
- fixes for member directory;
This commit is contained in:
+102
-81
@@ -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
@@ -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 );
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -24,6 +24,8 @@ if ( ! class_exists( 'um\core\Member_Directory_Meta' ) ) {
|
||||
var $roles = array();
|
||||
var $general_meta_joined = false;
|
||||
|
||||
var $having = '';
|
||||
var $select = '';
|
||||
var $sql_limit = '';
|
||||
var $sql_order = '';
|
||||
|
||||
@@ -592,13 +594,16 @@ if ( ! class_exists( 'um\core\Member_Directory_Meta' ) ) {
|
||||
|
||||
$order = 'ASC';
|
||||
$sortby = ! empty( $_POST['sorting'] ) ? $_POST['sorting'] : $directory_data['sortby'];
|
||||
$sortby = ( $sortby == 'other' ) ? $directory_data['sortby_custom'] : $sortby;
|
||||
|
||||
$custom_sort = array();
|
||||
$sorting_fields = maybe_unserialize( $directory_data['sorting_fields'] );
|
||||
foreach ( $sorting_fields as $field ) {
|
||||
if ( is_array( $field ) ) {
|
||||
$field_keys = array_keys( $field );
|
||||
$custom_sort[] = $field_keys[0];
|
||||
if ( ! empty( $directory_data['sorting_fields'] ) ) {
|
||||
$sorting_fields = maybe_unserialize( $directory_data['sorting_fields'] );
|
||||
foreach ( $sorting_fields as $field ) {
|
||||
if ( is_array( $field ) ) {
|
||||
$field_keys = array_keys( $field );
|
||||
$custom_sort[] = $field_keys[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,14 +727,18 @@ if ( ! class_exists( 'um\core\Member_Directory_Meta' ) ) {
|
||||
global $wpdb;
|
||||
|
||||
$user_ids = $wpdb->get_col(
|
||||
"SELECT SQL_CALC_FOUND_ROWS DISTINCT u.ID
|
||||
"SELECT SQL_CALC_FOUND_ROWS DISTINCT u.ID
|
||||
{$this->select}
|
||||
FROM {$wpdb->users} AS u
|
||||
{$sql_join}
|
||||
WHERE 1=1 {$sql_where}
|
||||
{$this->having}
|
||||
{$this->sql_order}
|
||||
{$this->sql_limit}"
|
||||
);
|
||||
|
||||
//var_dump( $wpdb->last_query );
|
||||
|
||||
$total_users = (int) $wpdb->get_var( 'SELECT FOUND_ROWS()' );
|
||||
|
||||
$pagination_data = $this->calculate_pagination( $directory_data, $total_users );
|
||||
|
||||
@@ -512,7 +512,7 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
switch ( $this->filter_types[ $filter ] ) {
|
||||
default: {
|
||||
|
||||
do_action( "um_member_directory_filter_type_{$this->filter_types[ $filter ]}", $filter, $this->filter_types );
|
||||
do_action( "um_member_directory_filter_type_{$this->filter_types[ $filter ]}", $filter, $directory_data, $unique_hash, $attrs, $default_value );
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1168,13 +1168,16 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
// sort members by
|
||||
$this->query_args['order'] = 'ASC';
|
||||
$sortby = ! empty( $_POST['sorting'] ) ? $_POST['sorting'] : $directory_data['sortby'];
|
||||
$sortby = ( $sortby == 'other' ) ? $directory_data['sortby_custom'] : $sortby;
|
||||
|
||||
$custom_sort = array();
|
||||
$sorting_fields = maybe_unserialize( $directory_data['sorting_fields'] );
|
||||
foreach ( $sorting_fields as $field ) {
|
||||
if ( is_array( $field ) ) {
|
||||
$field_keys = array_keys( $field );
|
||||
$custom_sort[] = $field_keys[0];
|
||||
if ( ! empty( $directory_data['sorting_fields'] ) ) {
|
||||
$sorting_fields = maybe_unserialize( $directory_data['sorting_fields'] );
|
||||
foreach ( $sorting_fields as $field ) {
|
||||
if ( is_array( $field ) ) {
|
||||
$field_keys = array_keys( $field );
|
||||
$custom_sort[] = $field_keys[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user