[-] MO productcomments :
- Module was broken and works now - A message is displayed to indicate when a comment has been added. - Error li are correctly indented #PNM-753 #PNM-1601 #PNM-1660 #PNM-1609 #PNM-1491 #PNM-1311 #PNM-1233 #PNM-1232 #PNM-937 #PNM-775
This commit is contained in:
@@ -56,11 +56,11 @@ $(function() {
|
||||
e.preventDefault();
|
||||
|
||||
// Form element
|
||||
|
||||
|
||||
url_options = parseInt(productcomments_url_rewrite) ? '?' : '&';
|
||||
$.ajax({
|
||||
url: productcomments_controller_url + url_options + 'action=add_comment&secure_key=' + secure_key + '&rand=' + new Date().getTime(),
|
||||
data: $('#fancybox-content form').serialize(),
|
||||
data: $('#id_new_comment_form').serialize(),
|
||||
type: 'POST',
|
||||
headers: { "cache-control": "no-cache" },
|
||||
dataType: "json",
|
||||
@@ -68,7 +68,9 @@ $(function() {
|
||||
if (data.result)
|
||||
{
|
||||
$.fancybox.close();
|
||||
document.location.href = document.location.href;
|
||||
var buttons = {};
|
||||
buttons[productcomment_ok] = "productcommentRefreshPage";
|
||||
fancyChooseBox(productcomment_added, productcomment_title, buttons);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -83,3 +85,7 @@ $(function() {
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
function productcommentRefreshPage() {
|
||||
window.location.reload();
|
||||
}
|
||||
Reference in New Issue
Block a user