WP PLUGIN CSS修正+更新時の表示タブ修正
・カテゴリー表示等のCSSについてflexを適用 ・データ更新時に表示するタブが、POST前に開いていたタブになるようPHPとjQyeryを修正
This commit is contained in:
+8
-4
@@ -21,7 +21,7 @@ h3 {
|
|||||||
padding: .5em;
|
padding: .5em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: #ababab;
|
background: #ababab;
|
||||||
border: 1px solid #999;
|
border: 1px solid #ccc;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ h3 {
|
|||||||
.post-order-box-outer {
|
.post-order-box-outer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: -1px 0 2em;
|
margin: -1px 0 2em;
|
||||||
border: 1px solid #999;
|
border: 1px solid #ccc;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,11 +52,14 @@ h3 {
|
|||||||
|
|
||||||
.list-orders-outer {
|
.list-orders-outer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-orders-inner {
|
.list-orders-inner {
|
||||||
width: 50%;
|
width: calc((100% / 2) - 20px);
|
||||||
padding: .5em;
|
padding: .5em;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@@ -128,7 +131,7 @@ dl.apop_setting_list_dd dd input {
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
color: #4b4b4b;
|
color: #4b4b4b;
|
||||||
border: 1px solid #ababab;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_normal_sort .product-list {
|
.search_normal_sort .product-list {
|
||||||
@@ -227,6 +230,7 @@ dl.apop_setting_list_dd dd input {
|
|||||||
.apop-form_table {
|
.apop-form_table {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.apop-form_table th {
|
.apop-form_table th {
|
||||||
padding-left: .5em;
|
padding-left: .5em;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-1
@@ -19,15 +19,22 @@ jQuery(function ($) {
|
|||||||
change_normal_field_sort();
|
change_normal_field_sort();
|
||||||
|
|
||||||
function change_tab_menu() {
|
function change_tab_menu() {
|
||||||
let submit_type = $('.post-order-box-outer').data('submit_type');
|
let apop_submit_type = $('#apop_submit_type');
|
||||||
let order_nav_list = $('.post-order-nav li');
|
let order_nav_list = $('.post-order-nav li');
|
||||||
let order_box = $('.post-order-box');
|
let order_box = $('.post-order-box');
|
||||||
|
|
||||||
|
init();
|
||||||
|
click_menu();
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
let submit_type = apop_submit_type.val();
|
||||||
order_nav_list.removeClass('en');
|
order_nav_list.removeClass('en');
|
||||||
order_box.hide();
|
order_box.hide();
|
||||||
$('.post-order-nav li:eq(' + submit_type + ')').addClass('en');
|
$('.post-order-nav li:eq(' + submit_type + ')').addClass('en');
|
||||||
$('.post-order-box:eq(' + submit_type + ')').show()
|
$('.post-order-box:eq(' + submit_type + ')').show()
|
||||||
|
}
|
||||||
|
|
||||||
|
function click_menu() {
|
||||||
order_nav_list.on('click', function () {
|
order_nav_list.on('click', function () {
|
||||||
if (!$(this).hasClass('en')) {
|
if (!$(this).hasClass('en')) {
|
||||||
let target_index = $(this).index();
|
let target_index = $(this).index();
|
||||||
@@ -35,9 +42,11 @@ jQuery(function ($) {
|
|||||||
$(this).addClass('en');
|
$(this).addClass('en');
|
||||||
order_box.hide();
|
order_box.hide();
|
||||||
$('.post-order-box:eq(' + target_index + ')').show();
|
$('.post-order-box:eq(' + target_index + ')').show();
|
||||||
|
apop_submit_type.val(target_index);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function order_list() {
|
function order_list() {
|
||||||
let cat_ul_count = $('.post-order-list').length; //カテゴリ総数
|
let cat_ul_count = $('.post-order-list').length; //カテゴリ総数
|
||||||
|
|||||||
+3
-5
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
$submit_type = APOP_UI::input_post_filter( 'submit_type', 'str' );
|
$submit_type = APOP_UI::input_post_filter( 'apop_submit_type', 'str' );
|
||||||
?>
|
?>
|
||||||
<div class="post-setting-box">
|
<div class="post-setting-box">
|
||||||
<h2>並べ替え</h2>
|
<h2>並べ替え</h2>
|
||||||
@@ -12,9 +12,10 @@ $submit_type = APOP_UI::input_post_filter( 'submit_type', 'str' );
|
|||||||
<li>カスタム分類</li>
|
<li>カスタム分類</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="post-order-box-outer" data-submit_type="<?php echo $submit_type; ?>">
|
<div class="post-order-box-outer">
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<?php wp_nonce_field( 'sh_options' ); ?>
|
<?php wp_nonce_field( 'sh_options' ); ?>
|
||||||
|
<input id="apop_submit_type" type="hidden" name="apop_submit_type" value="<?php echo $submit_type; ?>">
|
||||||
<div class="post-order-box">
|
<div class="post-order-box">
|
||||||
<div class="list-orders-outer">
|
<div class="list-orders-outer">
|
||||||
<div class="list-orders-inner">
|
<div class="list-orders-inner">
|
||||||
@@ -82,7 +83,6 @@ $submit_type = APOP_UI::input_post_filter( 'submit_type', 'str' );
|
|||||||
<?php
|
<?php
|
||||||
$tax_lists = array( 'category' => APOP_UI::get_cat_tag_list( 'cat', 'category' ) );
|
$tax_lists = array( 'category' => APOP_UI::get_cat_tag_list( 'cat', 'category' ) );
|
||||||
$tax_title_text = 'カテゴリー';
|
$tax_title_text = 'カテゴリー';
|
||||||
$submit_type_number = 2;
|
|
||||||
?>
|
?>
|
||||||
<?php include APOP_PLUGIN_PATH . 'template/order_parts_taxonomy.php'; ?>
|
<?php include APOP_PLUGIN_PATH . 'template/order_parts_taxonomy.php'; ?>
|
||||||
</div>
|
</div>
|
||||||
@@ -92,7 +92,6 @@ $submit_type = APOP_UI::input_post_filter( 'submit_type', 'str' );
|
|||||||
<?php
|
<?php
|
||||||
$tax_lists = array( 'tag_id' => APOP_UI::get_cat_tag_list( 'tag', 'post_tag' ) );
|
$tax_lists = array( 'tag_id' => APOP_UI::get_cat_tag_list( 'tag', 'post_tag' ) );
|
||||||
$tax_title_text = 'タグ';
|
$tax_title_text = 'タグ';
|
||||||
$submit_type_number = 3;
|
|
||||||
?>
|
?>
|
||||||
<?php include APOP_PLUGIN_PATH . 'template/order_parts_taxonomy.php'; ?>
|
<?php include APOP_PLUGIN_PATH . 'template/order_parts_taxonomy.php'; ?>
|
||||||
</div>
|
</div>
|
||||||
@@ -102,7 +101,6 @@ $submit_type = APOP_UI::input_post_filter( 'submit_type', 'str' );
|
|||||||
<?php
|
<?php
|
||||||
$tax_lists = array( 'taxonomy' => APOP_UI::get_cat_tag_list( 'tax', 'taxonomy' ) );
|
$tax_lists = array( 'taxonomy' => APOP_UI::get_cat_tag_list( 'tax', 'taxonomy' ) );
|
||||||
$tax_title_text = 'カスタム分類';
|
$tax_title_text = 'カスタム分類';
|
||||||
$submit_type_number = 4;
|
|
||||||
?>
|
?>
|
||||||
<?php include APOP_PLUGIN_PATH . 'template/order_parts_taxonomy.php'; ?>
|
<?php include APOP_PLUGIN_PATH . 'template/order_parts_taxonomy.php'; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php if ( isset( $tax_lists, $tax_title_text, $submit_type_number ) ): ?>
|
<?php if ( isset( $tax_lists, $tax_title_text ) ): ?>
|
||||||
<?php foreach ( $tax_lists as $tax_key => $tax_list ) : ?>
|
<?php foreach ( $tax_lists as $tax_key => $tax_list ) : ?>
|
||||||
<div class="list-orders-outer">
|
<div class="list-orders-outer">
|
||||||
<?php if ( count( $tax_list ) > 0 ): ?>
|
<?php if ( count( $tax_list ) > 0 ): ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user