Marijn groups #196

Merged
11166932 merged 1 commits from marijn-groups into master 2017-02-02 19:44:31 +01:00
4 changed files with 66 additions and 19 deletions

View File

@@ -5,22 +5,31 @@ function placeGroupButtons() {
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() {
if (this.value == 'admin') {
window.location.href='groupAdmin.php?groupID=' + groupID;
} else {
$.post("API/editMembership.php", {grp: groupID, role: this.value}) $.post("API/editMembership.php", {grp: groupID, role: this.value})
.done(function () { .done(function () {
$buttonContainer.children().remove(); $buttonContainer.children().remove();
@@ -28,6 +37,7 @@ function placeGroupButtons() {
updateMenus(); updateMenus();
}).fail(function () { }).fail(function () {
}); });
}
}); });
}); });

View File

@@ -91,7 +91,6 @@
.deleteButton { .deleteButton {
background-color: firebrick; background-color: firebrick;
} }
.deleteButton i { .deleteButton i {

View File

@@ -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 */

View File

@@ -11,6 +11,16 @@ $groupinfo = getGroupSettings($_GET["groupID"]);
<?=$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"
class="fa fa-picture-o"
> Verander profielfoto</button> > 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>