summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7206ade)
+ award_points: function(id) {\r
+ alert('ok');\r
+ },\r
+\r
insert_comment: function(post_id, comment_id, comment, username, profile_url, delete_url, edit_url, convert_url) {\r
var $container = $('#comments-container-' + post_id);\r
var skeleton = $('#new-comment-skeleton-' + post_id).html().toString();\r
insert_comment: function(post_id, comment_id, comment, username, profile_url, delete_url, edit_url, convert_url) {\r
var $container = $('#comments-container-' + post_id);\r
var skeleton = $('#new-comment-skeleton-' + post_id).html().toString();\r
<div class="award_points_slider"></div>
<div class="award_points_slider"></div>
+<input type="hidden" name="points" id="points_input" value="0" />
+
<script>
$('.award_points_slider').slider({
min: 1, max: {{ user.reputation }},
slide: function(evt, ui) {
$('#reputation_points_award').html(ui.value)
<script>
$('.award_points_slider').slider({
min: 1, max: {{ user.reputation }},
slide: function(evt, ui) {
$('#reputation_points_award').html(ui.value)
+ $('#points_input').val(ui.value)
}
});
</script>
\ No newline at end of file
}
});
</script>
\ No newline at end of file
if not user.is_authenticated():
raise AnonymousNotAllowedException(_('award'))
if not user.is_authenticated():
raise AnonymousNotAllowedException(_('award'))
- return render_to_response("node/award_points.html", { 'user' : user, 'awarded_user' : awarded_user, })
- # Display the template
- return render_to_response('node/permanent_link.html', { 'url' : url, })
+ if not request.POST:
+ return render_to_response("node/award_points.html", { 'user' : user, 'awarded_user' : awarded_user, })
+ else:
+ points = int(request.POST['points'])
+ return { 'message' : _("You have awarded %s with %d points") % (awarded_user, points) }
\ No newline at end of file