WP PLUGIN バグ修正(カスタムフィールドの値がない場合)
・配列の初期化書式を書き換え ・ソートのカスタムフィールドを4つに変更 ・ソートのJSでカスタムフィールドをdisabledにしないよう変更
This commit is contained in:
@@ -16,7 +16,6 @@ jQuery(function ($) {
|
||||
change_search_per_page();
|
||||
change_tax_per_page();
|
||||
|
||||
change_custom_field_sort();
|
||||
change_normal_field_sort();
|
||||
|
||||
function change_tab_menu() {
|
||||
@@ -143,28 +142,6 @@ jQuery(function ($) {
|
||||
});
|
||||
}
|
||||
|
||||
function change_custom_field_sort() {
|
||||
let s_box = $('.sort_box');
|
||||
let custom_field_check = $('.custom_field_check');
|
||||
|
||||
s_box.find(custom_field_check).each(function () {
|
||||
if ($(this).prop('checked') == false) {
|
||||
$(this).parents('.product-list-sort-type').find('.custom_field_key').prop('disabled', true);
|
||||
$(this).parents('.product-list-sort-type').find('.custom_field_meta_value').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
custom_field_check.on('click', function () {
|
||||
if ($(this).prop('checked') == true) {
|
||||
$(this).parents('.product-list-sort-type').find('.custom_field_key').prop('disabled', false);
|
||||
$(this).parents('.product-list-sort-type').find('.custom_field_meta_value').prop('disabled', false);
|
||||
} else {
|
||||
$(this).parents('.product-list-sort-type').find('.custom_field_key').val('').prop('disabled', true);
|
||||
$(this).parents('.product-list-sort-type').find('.custom_field_meta_value').prop('disabled', true);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function change_normal_field_sort() {
|
||||
let s_box = $('.sort_box');
|
||||
let targets = '.custom_field_check, .sort_date_check, .sort_title_check, .sort_ID_check, .sort_modified_check';
|
||||
|
||||
Reference in New Issue
Block a user