Add a script to add support for RTL when enabled to fix chosen. Fixes #3604
@coenjacobs maybe for .14?
This commit is contained in:
parent
e5c8ed0383
commit
d1b020b661
File diff suppressed because one or more lines are too long
|
@ -3140,11 +3140,6 @@ table.bar_chart {
|
|||
|
||||
/* Chosen multiselect enhancement
|
||||
----------------------------------*/
|
||||
#woocommerce_allowed_countries_chosen, #woocommerce_file_download_method_chosen {
|
||||
.chosen-search {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.chosen-container-single .chosen-single {
|
||||
height: 24px;
|
||||
line-height: 25px;
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
jQuery(document).ready(function($) {
|
||||
|
||||
// Fix Chosen for RTL
|
||||
$('.chosen_select, .chosen_select_nostd, .woocommerce_attributes select.multiselect, select.country_select, select.state_select, select#dropdown_shop_coupon_type, select[name=m], select#dropdown_shop_order_status').addClass('chosen-rtl');
|
||||
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
jQuery(document).ready(function(e){e(".chosen_select, .chosen_select_nostd, .woocommerce_attributes select.multiselect, select.country_select, select.state_select, select#dropdown_shop_coupon_type, select[name=m], select#dropdown_shop_order_status").addClass("chosen-rtl")});
|
|
@ -220,6 +220,11 @@ class WC_Admin_Assets {
|
|||
wp_enqueue_script( 'flot-pie', WC()->plugin_url() . '/assets/js/admin/jquery.flot.pie' . $suffix . '.js', array( 'jquery', 'flot' ), '1.0' );
|
||||
wp_enqueue_script( 'flot-stack', WC()->plugin_url() . '/assets/js/admin/jquery.flot.stack' . $suffix . '.js', array( 'jquery', 'flot' ), '1.0' );
|
||||
}
|
||||
|
||||
// Chosen RTL
|
||||
if ( is_rtl() ) {
|
||||
wp_enqueue_script( 'chosen-rtl', WC()->plugin_url() . '/assets/js/chosen/chosen-rtl' . $suffix . '.js', array( 'jquery' ), $woocommerce->version, true );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue