Delete Posts!
This commit is contained in:
@@ -46,14 +46,16 @@ function postPost() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(window).on("load", function() {
|
$(window).on("load", function() {
|
||||||
$(".modal-close").click(function () {
|
$(".modal-close").click(function (){closeModal()});
|
||||||
$(".modal").hide();
|
|
||||||
scrollbarMargin(0, 'auto');
|
|
||||||
$('#modal-response').hide();
|
|
||||||
$('.modal-default').show();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function closeModal() {
|
||||||
|
$(".modal").hide();
|
||||||
|
scrollbarMargin(0, 'auto');
|
||||||
|
$('#modal-response').hide();
|
||||||
|
$('.modal-default').show();
|
||||||
|
}
|
||||||
|
|
||||||
var masonryMode = 0;
|
var masonryMode = 0;
|
||||||
var windowWidth = $(window).width();
|
var windowWidth = $(window).width();
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
function postComment(buttonValue) {
|
function postComment(buttonValue) {
|
||||||
formData = $("#newcommentform").serializeArray();
|
formData = $("#newcommentform").serializeArray();
|
||||||
formData.push({name: "button", value: buttonValue});
|
formData.push({name: "button", value: buttonValue});
|
||||||
@@ -31,6 +32,8 @@ function deletePost(postID) {
|
|||||||
alert("Je account is bevroren, dus je kan geen posts verwijderen. Contacteer een admin als je denkt dat dit onjuist is.");
|
alert("Je account is bevroren, dus je kan geen posts verwijderen. Contacteer een admin als je denkt dat dit onjuist is.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
closeModal();
|
||||||
|
masonry(masonryMode);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -83,4 +83,21 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deleteButton {
|
||||||
|
background-color: firebrick;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.deleteButton i {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deleteButton:hover span {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deleteButton span {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -6,9 +6,14 @@ session_start();
|
|||||||
?>
|
?>
|
||||||
<div class='post-header header'>
|
<div class='post-header header'>
|
||||||
<h4><?=$post['title']?></h4>
|
<h4><?=$post['title']?></h4>
|
||||||
<form onsubmit="return false;" id="deletepostform">
|
<?php if (checkPermissionOnPost($postID, $_SESSION["userID"])) {?>
|
||||||
<button onclick="deletePost('<?=$postID?>')" type="submit">verwijder post<br /></button>
|
<button class="deleteButton"
|
||||||
</form>
|
onclick="deletePost('<?=$postID?>')"
|
||||||
|
type="submit">
|
||||||
|
<i class="fa fa-trash"></i>
|
||||||
|
<span>Verwijder post</span>
|
||||||
|
</button><br />
|
||||||
|
<?php } ?>
|
||||||
<span class='postinfo'>
|
<span class='postinfo'>
|
||||||
gepost door <?=$fullname?>,
|
gepost door <?=$fullname?>,
|
||||||
<span class='posttime' title='<?=$post['creationdate']?>'>
|
<span class='posttime' title='<?=$post['creationdate']?>'>
|
||||||
|
|||||||
Reference in New Issue
Block a user