map frontend fixes

This commit is contained in:
s416422 2019-12-07 22:49:36 +01:00
parent 9b9525b569
commit d3ab78fd82
8 changed files with 31 additions and 14 deletions

View File

@ -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 {

View File

@ -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;

View File

@ -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() {

View File

@ -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';

View File

@ -7,6 +7,7 @@
<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="{{ asset('js/map/jquery.seat-charts.min.js') }}"></script>
<link rel="stylesheet" type="text/css" href="{{ asset('css/map/seatchart.css') }}">
<title> @CHECK | @yield('map_title') </title>
@yield('map_meta')
</head>
@ -14,7 +15,7 @@
<body>
<div class="wrapper">
<a href="{{ route('user_classes') }}"> Zakończ zapisy </a>
<a href="{{ route('user_classes') }}" class="checkout-button end-button"> Zakończ zapisy </a>
@yield('map_content')
</div>

View File

@ -21,7 +21,7 @@
<div id="legend">
</div>
<div class="booking-details">
<h2> <span class="student_name"> {{ $student_name }} </span><span class="student_surname"> {{ $student_surname }} </span> </h2>
<h2 id="studentName"> <span class="student_name"> {{ $student_name }} </span><span class="student_surname"> {{ $student_surname }} </span> </h2>
<h3 class="student_id_number"> {{ $student_id_number }}</h3>
<h3>Wybrane miejsce:
<span id="selected-seats"></span>

View File

@ -28,7 +28,7 @@
<label for="student_surname"> Nazwisko studenta: </label>
<input type="text" name="student_surname" id="student_surname">
</div>
<button type="submit"> Wyślij requesta </button>
<button type="submit" class="checkout-button"> Wyślij requesta </button>
</form>
</div>
@endsection

View File

@ -11,7 +11,7 @@
<h3>{{ $student_id_number }} </h3>
<h3>wybrane miejsce:</h3>
<h3 id="selected-seats">{{ $seat_number }}</h3>
<ul id="sel-seat"> {{ $seat_number }}</ul>
<a href="{{ route('user_start_classes', [$classes_id]) }}"><button type="button" class="checkout-button">Przejdź do strony głównej &raquo;</button></a>
@endsection