Marijn groups #196
@@ -3,31 +3,41 @@ function placeGroupButtons() {
|
|||||||
.done(function(data) {
|
.done(function(data) {
|
||||||
var $buttonContainer = $("div.group-button-container");
|
var $buttonContainer = $("div.group-button-container");
|
||||||
|
|
||||||
if(data == 'none') {
|
if (data == 'none') {
|
||||||
$buttonContainer.append(
|
$buttonContainer.append(
|
||||||
"<button class='green group-button' value='request'>" +
|
"<button class='green group-button group-button-fixed' value='request'>" +
|
||||||
"<i class='fa fa-plus'></i> Voeg toe" +
|
"<i class='fa fa-plus'></i> Voeg toe" +
|
||||||
"</button>");
|
"</button>");
|
||||||
} else if(data == 'request') {
|
} else if (data == 'request') {
|
||||||
$buttonContainer.append(
|
$buttonContainer.append(
|
||||||
"<button class='red group-button' value='none'>" +
|
"<button class='red group-button group-button-fixed' value='none'>" +
|
||||||
"<i class='fa fa-times'></i> Trek verzoek in" +
|
"<i class='fa fa-times'></i> Trek verzoek in" +
|
||||||
"</button>");
|
"</button>");
|
||||||
|
} else if (data == 'admin') {
|
||||||
|
$buttonContainer.append(
|
||||||
|
"<button class='group-button group-button-fancy' value='admin'>" +
|
||||||
|
"<span>Instellingen</span><i class='fa fa-cogs'></i>" +
|
||||||
|
"</button>"
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$buttonContainer.append(
|
$buttonContainer.append(
|
||||||
"<button class='red group-button' value='none'>" +
|
"<button class='red group-button group-button-fancy' value='none'>" +
|
||||||
"<i class='fa fa-times'></i> Verlaat groep" +
|
"<span>Verlaat groep</span><i class='fa fa-sign-out'></i>" +
|
||||||
"</button>");
|
"</button>");
|
||||||
}
|
}
|
||||||
|
|
||||||
$buttonContainer.children().click(function() {
|
$buttonContainer.children().click(function() {
|
||||||
$.post("API/editMembership.php", { grp: groupID, role: this.value })
|
if (this.value == 'admin') {
|
||||||
.done(function() {
|
window.location.href='groupAdmin.php?groupID=' + groupID;
|
||||||
$buttonContainer.children().remove();
|
} else {
|
||||||
placeGroupButtons();
|
$.post("API/editMembership.php", {grp: groupID, role: this.value})
|
||||||
updateMenus();
|
.done(function () {
|
||||||
}).fail(function() {
|
$buttonContainer.children().remove();
|
||||||
});
|
placeGroupButtons();
|
||||||
|
updateMenus();
|
||||||
|
}).fail(function () {
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -91,7 +91,6 @@
|
|||||||
|
|
||||||
.deleteButton {
|
.deleteButton {
|
||||||
background-color: firebrick;
|
background-color: firebrick;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.deleteButton i {
|
.deleteButton i {
|
||||||
|
|||||||
@@ -31,11 +31,14 @@
|
|||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
margin: 7px 0;
|
margin: 7px 0;
|
||||||
width: 200px;
|
|
||||||
|
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.friend-button-container button, .status-buttons-container button, .group-button-fixed {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
.group-button-container button {
|
.group-button-container button {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
@@ -74,6 +77,22 @@
|
|||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.group-button-fancy span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-button-fancy:hover {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-button-fancy i {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-button-fancy:hover span {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Old */
|
/* Old */
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,20 @@ $groupinfo = getGroupSettings($_GET["groupID"]);
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="settings">
|
<div class="settings">
|
||||||
<?php if ($_SERVER["REQUEST_METHOD"] == "POST"): ?>
|
<?php if ($_SERVER["REQUEST_METHOD"] == "POST"): ?>
|
||||||
<div class='platform settings-message <?=$alertClass?>'>
|
<div class='platform settings-message <?=$alertClass?>'>
|
||||||
<?=$alertMessage?>
|
<?=$alertMessage?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<div class="platform">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label></label>
|
||||||
|
<a href="group.php?groupname=<?=$groupinfo["name"]?>">
|
||||||
|
<button class="fa fa-chevron-left"> Terug naar de groep</button>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<form class="platform" method="post">
|
<form class="platform" method="post">
|
||||||
<h5>Groep Instellingen</h5>
|
<h5>Groep Instellingen</h5>
|
||||||
<input type="hidden" name="groupID" value="<?=$_GET["groupID"]?>">
|
<input type="hidden" name="groupID" value="<?=$_GET["groupID"]?>">
|
||||||
@@ -70,9 +80,18 @@ $groupinfo = getGroupSettings($_GET["groupID"]);
|
|||||||
<button type="submit"
|
<button type="submit"
|
||||||
name="form"
|
name="form"
|
||||||
value="picture"
|
value="picture"
|
||||||
>Verander profielfoto</button>
|
class="fa fa-picture-o"
|
||||||
|
> Verander profielfoto</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
<div class="platform">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label></label>
|
||||||
|
<a href="group.php?groupname=<?=$groupinfo["name"]?>"><button class="fa fa-chevron-left"> Terug naar de groep</button></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user