駐輪場検索修正 #45

Merged
y.higashide merged 1 commits from main_higashide into main 2025-10-07 18:07:19 +09:00
Showing only changes of commit 89465021e4 - Show all commits

View File

@ -17,8 +17,6 @@
</div>
<div class="card-body">
<form class="row form" method="GET" action="">
<input type="hidden" name="sort" value="{{ request('sort', 'park_id') }}">
<input type="hidden" name="order" value="{{ request('order', 'asc') }}">
<div class="w-100 alert alert-success">
<h6><a class="text-success" data-toggle="collapse" href="#search-option" role="button"
aria-expanded="false" aria-controls="search-option">絞込み条件を追加する</a></h6>
@ -57,25 +55,13 @@
<table id="searchTable" class="tablesorter table table-striped">
<thead>
<tr>
<th class="header">
駐輪場名
<a href="{{ request()->fullUrlWithQuery(['sort' => 'park_ruby', 'order' => 'asc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-up-fill"></i></a>
<a href="{{ request()->fullUrlWithQuery(['sort' => 'park_ruby', 'order' => 'desc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-down-fill"></i></a>
</th>
<th class="header">
市町村名
<a href="{{ request()->fullUrlWithQuery(['sort' => 'city_id', 'order' => 'asc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-up-fill"></i></a>
<a href="{{ request()->fullUrlWithQuery(['sort' => 'city_id', 'order' => 'desc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-down-fill"></i></a>
</th>
<th class="header">
駅名
<a href="{{ request()->fullUrlWithQuery(['sort' => 'station_name_ruby', 'order' => 'asc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-up-fill"></i></a>
<a href="{{ request()->fullUrlWithQuery(['sort' => 'station_name_ruby', 'order' => 'desc', 'page' => 1]) }}" class="text-success"><i class="bi bi-caret-down-fill"></i></a>
</th>
<th class="header">自転車</th>
<th class="header">原付</th>
<th class="header">自動二輪</th>
<th class="header">自動車</th>
<th class="header" style="cursor:default; pointer-events: none; background-color: #d4edda !important;">駐輪場名</th>
<th class="header" style="cursor:default; pointer-events: none;">市町村名</th>
<th class="header" style="cursor:default; pointer-events: none;">駅名</th>
<th class="header" style="cursor:default; pointer-events: none;">自転車</th>
<th class="header" style="cursor:default; pointer-events: none;">原付</th>
<th class="header" style="cursor:default; pointer-events: none;">自動二輪</th>
<th class="header" style="cursor:default; pointer-events: none;">自動車</th>
</tr>
</thead>
<tbody>
@ -202,16 +188,4 @@
</div>
</div>
</div>
<script>
document.querySelectorAll('#searchTable th a, #searchTable .header a').forEach(function(el) {
el.addEventListener('click', function(e) {
// サーバーに遷移させる
window.location.href = el.href;
// 既存のJSによるイベントを止める
e.stopImmediatePropagation();
e.preventDefault();
return false;
}, true); // trueでキャプチャフェーズに
});
</script>
@endsection