From de0600b75c3eeff15352f58e2631f2e19da4b252 Mon Sep 17 00:00:00 2001 From: Mateja Date: Sun, 8 Nov 2020 20:17:01 +0100 Subject: Show special call description. --- resources/js/reserve.js | 9 +++++++++ resources/views/layouts/app.blade.php | 2 +- resources/views/pages/reserve.blade.php | 10 ++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 resources/js/reserve.js (limited to 'resources') diff --git a/resources/js/reserve.js b/resources/js/reserve.js new file mode 100644 index 0000000..7a20c37 --- /dev/null +++ b/resources/js/reserve.js @@ -0,0 +1,9 @@ +jQuery('select#special-call').change(setCallDesc); +jQuery(document).ready(setCallDesc); + +function setCallDesc() { + sign = jQuery('select#special-call').first().val(); + jQuery.get('/special-calls/show/' + sign, function (data, status) { + jQuery('div#call-desc').html(data); + }); +} diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 8d2d01a..3cb8667 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -16,7 +16,7 @@
@yield('content')
- + @yield('scripts') diff --git a/resources/views/pages/reserve.blade.php b/resources/views/pages/reserve.blade.php index 16bdda5..868ae24 100644 --- a/resources/views/pages/reserve.blade.php +++ b/resources/views/pages/reserve.blade.php @@ -31,6 +31,12 @@ @enderror +
+
+
+
+
+
@@ -229,3 +235,7 @@
@endsection() + +@section('scripts') + +@endsection -- cgit v1.2.3