WP PLUGIN 修正(ファイル名・JS)

・ファイル名の綴りが間違っていたので修正
・通常ソートのリスト表示位置が、有効/無効切り替えで変わるようJSとテンプレートのPHPファイルを修正
This commit is contained in:
2021-05-13 19:43:06 +09:00
parent 9800acf02b
commit c8f482a02d
6 changed files with 47 additions and 9 deletions
+1 -1
View File
@@ -310,7 +310,7 @@ value="' . $sort_num . '">
<div class="product-list-sort-type">
<label>
<input type="hidden" name="_' . $name_key . '[' . $target_key . '][use]" value="0"' . self::set_search_normal_checked( $use, 0 ) . '>
有効<input class="' . $target_key_check_class . '" type="checkbox" name="_' . $name_key . '[' . $target_key . '][use]" value="1"' . self::set_search_normal_checked( $use, 1 ) . '>
<span class="en_dis_label">有効</span><input class="' . $target_key_check_class . '" type="checkbox" name="_' . $name_key . '[' . $target_key . '][use]" value="1"' . self::set_search_normal_checked( $use, 1 ) . '>
</label>
<label>
<input class="order_param" type="radio"
+22 -5
View File
@@ -112,7 +112,8 @@ dl.apop_setting_list dd:first-of-type {
display: flex;
}
.search_normal_sort .product-list-type-label {
.search_normal_sort .product-list-type-label,
.disable_box .product-list-type-label {
width: calc(100% / 2);
}
@@ -142,10 +143,6 @@ dl.apop_setting_list dd:first-of-type {
content: "";
}
/*.hide_list {*/
/* display: none;*/
/*}*/
.no_registered_exp {
width: 100%;
margin-top: 1em;
@@ -181,6 +178,26 @@ dl.apop_setting_list dd:first-of-type {
width: 40%;
}
.disable_normal_list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin: .5em 1em 1em 0;
}
.disable_box .product-list-sort-type label:not(:first-of-type),
.disable_box .sort_custom_field,
.disable_box .sort_custom_field_inner {
display: none;
}
.disable_box .product-list {
width: calc((100% / 2) - 20px);
display: flex;
cursor: default;
}
@media only screen and (max-width: 1264px) {
.search_normal_sort .product-list {
display: block;
+7 -2
View File
@@ -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);
}
});
}
+11
View File
@@ -28,9 +28,14 @@ $submit_type = APOP_UI::input_post_filter( 'submit_type', 'str' );
<div class="sort_box">
<?php list( $list, $alert ) = APOP_UI::create_search_normal_list( 'normal' ); ?>
<?php echo $alert; ?>
<h4>有効</h4>
<ul class="post-order-list search_normal_sort">
<?php echo $list; ?>
</ul>
<div class="disable_box">
<h4>無効</h4>
<ul class="disable_normal_list"></ul>
</div>
</div>
<div class="sort_box">
<?php echo APOP_UI::none_registered_alert_msg(); ?>
@@ -42,6 +47,7 @@ $submit_type = APOP_UI::input_post_filter( 'submit_type', 'str' );
<p class="submit post-order"><input type="submit" name="Submit" class="button-primary"
value="変更を保存"/></p>
</form>
</div>
</div>
</div>
@@ -60,9 +66,14 @@ $submit_type = APOP_UI::input_post_filter( 'submit_type', 'str' );
<div class="sort_box">
<?php list( $list, $alert ) = APOP_UI::create_search_normal_list( 'search' ); ?>
<?php echo $alert; ?>
<h4>有効</h4>
<ul class="post-order-list search_normal_sort">
<?php echo $list; ?>
</ul>
<div class="disable_box">
<h4>無効</h4>
<ul class="disable_normal_list"></ul>
</div>
</div>
<div class="sort_box">
<?php echo APOP_UI::none_registered_alert_msg(); ?>
+5
View File
@@ -40,9 +40,14 @@
<div class="sort_box">
<?php list( $list, $alert ) = APOP_UI::create_search_normal_list( 'tax', $tax_data->term_id ); ?>
<?php echo $alert; ?>
<h4>有効</h4>
<ul class="post-order-list search_normal_sort">
<?php echo $list; ?>
</ul>
<div class="disable_box">
<h4>無効</h4>
<ul class="disable_normal_list"></ul>
</div>
</div>
<input type="hidden" name="submit_type" value="<?php echo $submit_type_number; ?>">
<p class="submit post-order"><input type="submit" name="Submit"