v1.5.12 Added the last things to the preview function, its all working now
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
<strong><label for="accountable">Aktivitets ansvarlig</label></strong>
|
||||
<p id="accountable"></p>
|
||||
<hr>
|
||||
<img src="{{ asset(\App\Resource::query()->where("id", "=", $events->resource_id)->first()->filename) }}">
|
||||
<img id="eventimg">
|
||||
<p id="description"></p>
|
||||
</center>
|
||||
</div>
|
||||
@@ -96,6 +96,11 @@
|
||||
$("#date").html(l.date);
|
||||
$("#accountable").html(l.accountable);
|
||||
$("#description").html(l.description);
|
||||
|
||||
if (l.filename)
|
||||
$("#eventimg").attr('src', l.filename);
|
||||
|
||||
|
||||
},
|
||||
error:function (data) {
|
||||
console.log(data);
|
||||
@@ -105,11 +110,23 @@
|
||||
|
||||
function closeModal() {
|
||||
modalNews.style.display = "none";
|
||||
|
||||
$("#name").html('');
|
||||
$("#date").html('');
|
||||
$("#accountable").html('');
|
||||
$("#description").html('');
|
||||
$("#eventimg").attr('src', '');
|
||||
}
|
||||
|
||||
window.onmousedown = function(event) {
|
||||
if (event.target == modalNews) {
|
||||
modalNews.style.display = "none";
|
||||
|
||||
$("#name").html('');
|
||||
$("#date").html('');
|
||||
$("#accountable").html('');
|
||||
$("#description").html('');
|
||||
$("#eventimg").attr('src', '');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
<center>
|
||||
<h1 id="name"></h1>
|
||||
<hr>
|
||||
<img id="eventimg">
|
||||
<strong><label for="guide_articles">Vejledning</label></strong>
|
||||
<p id="guide_articles"></p>
|
||||
</center>
|
||||
@@ -116,7 +117,9 @@
|
||||
console.log(l);
|
||||
$("#name").html(l.name);
|
||||
$("#guide_articles").html(l.guide_articles);
|
||||
//We need to add guide_category_id and resource_id
|
||||
if (l.filename)
|
||||
$("#eventimg").attr('src', l.filename);
|
||||
|
||||
},
|
||||
error:function (data) {
|
||||
console.log(data);
|
||||
@@ -126,11 +129,17 @@
|
||||
|
||||
function closeModal() {
|
||||
modalNews.style.display = "none";
|
||||
$("#name").html('');
|
||||
$("#guide_articles").html('');
|
||||
$("#eventimg").attr('src', '');
|
||||
}
|
||||
|
||||
window.onmousedown = function(event) {
|
||||
if (event.target == modalNews) {
|
||||
modalNews.style.display = "none";
|
||||
$("#name").html('');
|
||||
$("#guide_articles").html('');
|
||||
$("#eventimg").attr('src', '');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -98,6 +98,11 @@
|
||||
|
||||
function closeModal() {
|
||||
modalNews.style.display = "none";
|
||||
$("#week").html('');
|
||||
$("#monday").html('');
|
||||
$("#tuesday").html('');
|
||||
$("#wednesday").html('');
|
||||
$("#thursday").html('');
|
||||
}
|
||||
|
||||
window.onmousedown = function(event) {
|
||||
|
||||
@@ -93,11 +93,17 @@
|
||||
|
||||
function closeModal() {
|
||||
modalNews.style.display = "none";
|
||||
$("#titleEvent").html('');
|
||||
$("#dateEvent").html('');
|
||||
$("#descriptionEvent").html('');
|
||||
}
|
||||
|
||||
window.onmousedown = function(event) {
|
||||
if (event.target == modalNews) {
|
||||
modalNews.style.display = "none";
|
||||
$("#titleEvent").html('');
|
||||
$("#dateEvent").html('');
|
||||
$("#descriptionEvent").html('');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user