An actual minimum viable product, maybe? #11
|
@ -162,7 +162,7 @@
|
|||
<a class="btn btn-danger btn-sm" href="#" id="close-review-box" style="display:none; margin-right: 10px;">
|
||||
<span class="glyphicon glyphicon-remove"></span>Cancel</a>
|
||||
<input type="hidden" id="rating_input" name="rating" value="1">
|
||||
{% csrf_token %}
|
||||
<div id="csrf-token">{% csrf_token %}</div>
|
||||
<input type="hidden" name="entity_id" value="{{ entity.pk }}">
|
||||
<button class="btn btn-success btn-lg" type="submit">Save</button>
|
||||
</div>
|
||||
|
|
|
@ -1,20 +1,5 @@
|
|||
$(function() {
|
||||
function getCookie(name) {
|
||||
var cookieValue = null;
|
||||
if (document.cookie && document.cookie != '') {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = jQuery.trim(cookies[i]);
|
||||
// Does this cookie string begin with the name we want?
|
||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
var csrftoken = getCookie('csrftoken');
|
||||
var csrftoken = $("#csrf-token input").val();
|
||||
|
||||
$(".vote-up").click(function() {
|
||||
var reviewId = $(this).attr("data-review-id");
|
||||
|
|
Loading…
Reference in New Issue