From 7de585542b98110c39bb358ec24f33566f886ebb Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Tue, 5 Oct 2010 15:21:54 +0000 Subject: [PATCH] Fix moderation actions (publish, delete) in the moderation view with virtual hosts. This is a replacement for http://dev.plone.org/plone/changeset/35608. svn path=/plone.app.discussion/trunk/; revision=40518 --- CHANGES.txt | 4 ++++ plone/app/discussion/browser/javascripts/moderation.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 58bc093..43c8694 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,10 @@ Changelog 1.0b9 (unreleased) ------------------ +- Fix moderation actions (publish, delete) in the moderation view with virtual + hosts. This is a replacement for http://dev.plone.org/plone/changeset/35608. + [timo] + - Do not show two "login to add comments" buttons when there are no comments yet. This fixes http://plone.org/products/plone.app.discussion/issues/12. [timo] diff --git a/plone/app/discussion/browser/javascripts/moderation.js b/plone/app/discussion/browser/javascripts/moderation.js index 65e152a..d3eb2de 100644 --- a/plone/app/discussion/browser/javascripts/moderation.js +++ b/plone/app/discussion/browser/javascripts/moderation.js @@ -25,7 +25,7 @@ var button = $(this); var row = $(this).parent().parent(); var form = $(row).parents("form"); - var path = $(row).find("input:checkbox").attr("value"); + var path = $(row).find("[name='selected_obj_paths:list']").attr("value"); var target = path + "/@@moderate-delete-comment"; var comment_id = $(this).attr("id"); $.ajax({ @@ -52,7 +52,7 @@ var button = $(this); var row = $(this).parent().parent(); var form = $(row).parents("form"); - var path = $(row).find("input:checkbox").attr("value"); + var path = $(row).find("[name='selected_obj_paths:list']").attr("value"); var target = path + "/@@moderate-publish-comment"; $.ajax({ type: "GET",