An actual minimum viable product, maybe? #11

Merged
andrewlalis merged 43 commits from develop into master 2018-10-12 18:19:41 +00:00
2 changed files with 2 additions and 17 deletions
Showing only changes of commit b798898076 - Show all commits

View File

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

View File

@ -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");