From 55eb95dda83e5a061a81e641c2b8c63abde689f3 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 16 Feb 2019 23:02:53 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B9=E3=83=9E=E3=83=9B=E5=90=91=E3=81=91?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=83=A3=E3=83=BC=E3=81=A7=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=82=B8=E3=83=A3=E3=83=B3=E3=83=97=E3=82=92?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/tissue.css | 7 +++++++ public/js/tissue.js | 6 ++++++ resources/views/layouts/base.blade.php | 1 + resources/views/vendor/pagination/default.blade.php | 8 +++++++- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/public/css/tissue.css b/public/css/tissue.css index e71b920..e7bd5e6 100644 --- a/public/css/tissue.css +++ b/public/css/tissue.css @@ -53,6 +53,13 @@ border-bottom: 1px solid rgba(0, 0, 0, .125); } +.tis-page-selector { + margin-left: -1px; + width: calc(100% + 2px); + border: 1px solid #dee2e6; + border-radius: 0; +} + @media (min-width: 992px) { .tis-sidebar-info { font-size: small; diff --git a/public/js/tissue.js b/public/js/tissue.js index dab7c34..fb200fe 100644 --- a/public/js/tissue.js +++ b/public/js/tissue.js @@ -46,4 +46,10 @@ }); }; + $.fn.pageSelector = function () { + return this.on('change', function () { + location.href = $(this).find(':selected').data('href'); + }); + }; + })(jQuery); \ No newline at end of file diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index ed8851f..97a4acb 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -160,6 +160,7 @@ @endguest $('[data-toggle="tooltip"]').tooltip(); $('.alert').alert(); + $('.tis-page-selector').pageSelector(); @if (session('status')) setTimeout(function () { $('#status').alert('close'); diff --git a/resources/views/vendor/pagination/default.blade.php b/resources/views/vendor/pagination/default.blade.php index f661f12..0c5fbb3 100644 --- a/resources/views/vendor/pagination/default.blade.php +++ b/resources/views/vendor/pagination/default.blade.php @@ -42,7 +42,13 @@
  • @endif -
  • {{ $paginator->currentPage() }}
  • +
  • + +
  • @if ($paginator->hasMorePages())