v1.5.15a - Changes by Anders

This commit is contained in:
2021-04-27 12:27:46 +02:00
parent e5126ae5ae
commit cb690a470d
8 changed files with 180 additions and 35 deletions
@@ -40,7 +40,7 @@
<tr id="guide_row_{{ $guide->id }}" data-id="guide_category_row{{ \App\GuidesCategory::query()->where('id', '=', $guide->guide_category_id)->first()->id }}">
<td>{{$guide->name}}</td>
<td>{{ \App\GuidesCategory::query()->where('id', '=', $guide->guide_category_id)->first()->guidesCategoryName }}</td>
<td><a id="preview" onclick="modalNewsContent({{$guide->id}})" style="cursor: pointer" ><img class="w-100" src="{{ asset('/images/icons/preview-dark.svg') }}" alt="preview"></a></td>
<td><a id="preview" onclick="modalGuidesContent({{$guide->id}})" style="cursor: pointer" ><img class="w-100" src="{{ asset('/images/icons/preview-dark.svg') }}" alt="preview"></a></td>
@if(auth()->user()->can('guides.edit'))
<td><a href="{{ route("guides.edit", [ "guide" => $guide ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
@endif
@@ -89,7 +89,7 @@
</div>
<div id="newsModal" class="modal zindex-100">
<div id="guidesModal" class="modal zindex-100">
<div id="modal-content" class="modal-content text-black d-block w-50">
<span class="close" onclick="closeModal()">&times;</span>
<center>
@@ -104,9 +104,9 @@
@endsection
@section('scripts')
<script>
var modalNews = document.getElementById("newsModal");
var modalGuides = document.getElementById("guidesModal");
function modalNewsContent(id) {
function modalGuidesContent(id) {
$.ajax({
type: 'get',
url: '{{route('guides.preview')}}',
@@ -128,15 +128,15 @@
}
function closeModal() {
modalNews.style.display = "none";
modalGuides.style.display = "none";
$("#name").html('');
$("#guide_articles").html('');
$("#eventimg").attr('src', '');
}
window.onmousedown = function(event) {
if (event.target == modalNews) {
modalNews.style.display = "none";
if (event.target == modalGuides) {
modalGuides.style.display = "none";
$("#name").html('');
$("#guide_articles").html('');
$("#eventimg").attr('src', '');