From bc259b46ca34a6597973d2604870b7139655387c Mon Sep 17 00:00:00 2001 From: Zambom Date: Tue, 11 Oct 2016 20:05:24 -0300 Subject: [PATCH] Adding answer edited confirmation message [Issue: #164] --- forum/static/js/forum.js | 4 +++- forum/templates/post_answers/post_answer_list.html | 2 +- forum/templates/post_answers/post_answer_render.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/forum/static/js/forum.js b/forum/static/js/forum.js index 4eda997..8ea7658 100644 --- a/forum/static/js/forum.js +++ b/forum/static/js/forum.js @@ -259,7 +259,7 @@ function answer(id, url) { * Function to load form to edit post answer * */ -function edit_post_answer(url, answer_id) { +function edit_post_answer(url, answer_id, success_message) { $.ajax({ url: url, success: function(data) { @@ -273,6 +273,8 @@ function edit_post_answer(url, answer_id) { url: frm.attr('action'), data: frm.serialize(), success: function (data) { + alertify.success(success_message); + $("#answer_"+answer_id).parent().after(data); frm.parent().parent().remove(); }, diff --git a/forum/templates/post_answers/post_answer_list.html b/forum/templates/post_answers/post_answer_list.html index b068305..dd9561b 100644 --- a/forum/templates/post_answers/post_answer_list.html +++ b/forum/templates/post_answers/post_answer_list.html @@ -14,7 +14,7 @@ more_horiz diff --git a/forum/templates/post_answers/post_answer_render.html b/forum/templates/post_answers/post_answer_render.html index 094b019..1db908d 100644 --- a/forum/templates/post_answers/post_answer_render.html +++ b/forum/templates/post_answers/post_answer_render.html @@ -12,7 +12,7 @@ more_horiz -- libgit2 0.21.2