Eventplanner
- cleaned up urls - permissions
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
|
||||
request = $.ajax( {
|
||||
type: "PUT",
|
||||
url: "/eventParticipation/" + p.data("username") + "/" + p.data("event-id"),
|
||||
url: "{% url 'event_api' %}",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(putObject)
|
||||
});
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
$.ajax( {
|
||||
type: "PUT",
|
||||
url: "/eventParticipation/" + $(this).data("username") + "/" + $(this).data("event-id"),
|
||||
url: "{% url 'event_api' %}",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(putObject)
|
||||
});
|
||||
|
||||
@@ -29,9 +29,14 @@
|
||||
{% addtoblock "js" %}
|
||||
<script>
|
||||
|
||||
{% if not perms.eventplanner.change_others_participation %}
|
||||
$(".eventButton").attr('disabled', 'disabled');
|
||||
{% endif %}
|
||||
|
||||
$('.eventButton').tooltip()
|
||||
|
||||
$(".eventButton").click( function () {
|
||||
$(".eventButton").click( function (e) {
|
||||
e.preventDefault();
|
||||
$(this).removeClass("btn-danger")
|
||||
.removeClass("btn-warning")
|
||||
.removeClass("btn-success");
|
||||
@@ -57,8 +62,10 @@
|
||||
$('#saveButton').removeAttr('disabled');
|
||||
});
|
||||
|
||||
$("#saveButton").click( function() {
|
||||
|
||||
|
||||
|
||||
$("#saveButton").click( function(e) {
|
||||
e.preventDefault();
|
||||
arr = [];
|
||||
|
||||
$('.userEventTableData').each( function() {
|
||||
@@ -74,7 +81,7 @@
|
||||
|
||||
$.ajax( {
|
||||
type: "PUT",
|
||||
url: "/eventParticipation/",
|
||||
url: "{% url 'event_api' %}",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(arr)
|
||||
});
|
||||
@@ -146,11 +153,16 @@
|
||||
|
||||
</div><!--/row-->
|
||||
|
||||
|
||||
|
||||
{% if perms.eventplanner.change_others_participation %}
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<button id="saveButton" class="btn btn-primary" disabled="true" >Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user