From d3ab78fd828f5640b739d302916b4df4de5429c2 Mon Sep 17 00:00:00 2001 From: s416422 Date: Sat, 7 Dec 2019 22:49:36 +0100 Subject: [PATCH] map frontend fixes --- public/css/map/koncowastrona.css | 3 ++- public/css/map/seatchart.css | 4 ++++ public/js/map/seatchart-custom.js | 21 +++++++++++++-------- public/js/map/seatchart.js | 8 +++++++- resources/views/layouts/map.blade.php | 3 ++- resources/views/map/seat_map.blade.php | 2 +- resources/views/map/start_map.blade.php | 2 +- resources/views/map/summary_map.blade.php | 2 +- 8 files changed, 31 insertions(+), 14 deletions(-) diff --git a/public/css/map/koncowastrona.css b/public/css/map/koncowastrona.css index 6c68a36..f82d79a 100644 --- a/public/css/map/koncowastrona.css +++ b/public/css/map/koncowastrona.css @@ -21,11 +21,12 @@ body { font-size: 22px; } -#selected-seats { +#sel-seat { font-size: 30px; text-shadow: 1px 1px 1px rgb(160, 160, 160); margin-top: -15px; margin-bottom: 100px; + padding: 0; } button { diff --git a/public/css/map/seatchart.css b/public/css/map/seatchart.css index 92085ff..d60de81 100644 --- a/public/css/map/seatchart.css +++ b/public/css/map/seatchart.css @@ -144,6 +144,10 @@ span.seatCharts-legendDescription { box-shadow: 0 0 #b85a5b; background-color: #3654ff; } +a.checkout-button { + color: black; + text-decoration: none; +} #selected-seats { list-style-type: none; diff --git a/public/js/map/seatchart-custom.js b/public/js/map/seatchart-custom.js index 9285b9a..3a90530 100644 --- a/public/js/map/seatchart-custom.js +++ b/public/js/map/seatchart-custom.js @@ -8,16 +8,21 @@ function savePlaceNumber() { } function toggleButtonAvailability() { - const button = $('.checkout-button')[0]; + const buttons = $('.checkout-button'); const selected_place = $('.selected')[0]; - if(!selected_place){ - $(button).css('pointer-events', 'none'); - $(button).css('cursor', 'unset'); + buttons.each(function(e) { + if(!$(this).hasClass('end-button')) { + if(!selected_place){ + $(this).css('pointer-events', 'none'); + $(this).css('cursor', 'unset'); + + } else { + $(this).css('pointer-events', 'unset'); + $(this).css('cursor', 'pointer'); + } + } + }) - } else { - $(button).css('pointer-events', 'unset'); - $(button).css('cursor', 'pointer'); - } } function checkForUnavailablePlaces() { diff --git a/public/js/map/seatchart.js b/public/js/map/seatchart.js index 5a33bc9..d69e69d 100644 --- a/public/js/map/seatchart.js +++ b/public/js/map/seatchart.js @@ -2,7 +2,10 @@ var firstSeatLabel = 1; $(document).ready(function() { var $cart = $('#selected-seats'), + seatNumber = '', + placeNumber = ('#sel-seat'), $counter = $('#counter'), + $name = $('#studentName'), $total = $('#total'), sc = $('#seat-map').seatCharts({ map: [ @@ -45,7 +48,9 @@ var firstSeatLabel = 1; .attr('id', 'cart-item-'+this.settings.id) .data('seatId', this.settings.id) .appendTo($cart); - + + seatNumber = 'rząd: ' + this.settings.row + ' miejsce: ' + this.settings.label; + localStorage.setItem('myElement', seatNumber); /* * Lets update the counter and total * @@ -64,6 +69,7 @@ var firstSeatLabel = 1; //remove the item from our cart $('#cart-item-'+this.settings.id).remove(); + $('#item-'+this.settings.id).remove(); //seat has been vacated return 'available'; diff --git a/resources/views/layouts/map.blade.php b/resources/views/layouts/map.blade.php index 91a461e..1179044 100644 --- a/resources/views/layouts/map.blade.php +++ b/resources/views/layouts/map.blade.php @@ -7,6 +7,7 @@ + @CHECK | @yield('map_title') @yield('map_meta') @@ -14,7 +15,7 @@
- Zakończ zapisy + Zakończ zapisy @yield('map_content')
diff --git a/resources/views/map/seat_map.blade.php b/resources/views/map/seat_map.blade.php index 8f16643..658bdcd 100644 --- a/resources/views/map/seat_map.blade.php +++ b/resources/views/map/seat_map.blade.php @@ -21,7 +21,7 @@
-

{{ $student_name }} {{ $student_surname }}

+

{{ $student_name }} {{ $student_surname }}

{{ $student_id_number }}

Wybrane miejsce: diff --git a/resources/views/map/start_map.blade.php b/resources/views/map/start_map.blade.php index 14b6ee6..f37038b 100644 --- a/resources/views/map/start_map.blade.php +++ b/resources/views/map/start_map.blade.php @@ -28,7 +28,7 @@

- + @endsection diff --git a/resources/views/map/summary_map.blade.php b/resources/views/map/summary_map.blade.php index 33713d9..4076cce 100644 --- a/resources/views/map/summary_map.blade.php +++ b/resources/views/map/summary_map.blade.php @@ -11,7 +11,7 @@

{{ $student_id_number }}

wybrane miejsce:

-

{{ $seat_number }}

+ @endsection