WP PLUGIN 修正(ファイル名・JS)
・ファイル名の綴りが間違っていたので修正 ・通常ソートのリスト表示位置が、有効/無効切り替えで変わるようJSとテンプレートのPHPファイルを修正
This commit is contained in:
+7
-2
@@ -168,17 +168,22 @@ jQuery(function ($) {
|
||||
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';
|
||||
|
||||
s_box.find(targets).each(function () {
|
||||
if ($(this).prop('checked') == false) {
|
||||
$(this).parents('.product-list-sort-type').find('.order_param').prop('disabled', true);
|
||||
let disable_list = $(this).parents('.sort_box').find('.disable_normal_list');
|
||||
$(this).parents('li').appendTo(disable_list);
|
||||
}
|
||||
});
|
||||
$(targets).on('click', function () {
|
||||
if ($(this).prop('checked') == true) {
|
||||
$(this).parents('.product-list-sort-type').find('.order_param').prop('disabled', false)
|
||||
$(this).parents('.product-list-sort-type').find('.order_param').prop('disabled', false);
|
||||
let enable_list = $(this).parents('.sort_box').find('.post-order-list');
|
||||
$(this).parents('li').appendTo(enable_list).removeClass('no_order').hide().fadeIn(200);
|
||||
} else {
|
||||
$(this).parents('.product-list-sort-type').find('.order_param').prop('disabled', true);
|
||||
let disable_list = $(this).parents('.sort_box').find('.disable_normal_list');
|
||||
$(this).parents('li').appendTo(disable_list).addClass('no_order').hide().fadeIn(200);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user