From 4fa3f476d43c97ea6b7b86ce7e363f18de18766d Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 25 Jan 2010 11:43:29 +0000 Subject: [PATCH] allow to show the full text of a comment in the moderation view. svn path=/plone.app.discussion/trunk/; revision=33400 --- docs/HISTORY.txt | 6 ++++++ .../browser/javascripts/moderation.js | 21 +++++++++++++++++++ plone/app/discussion/browser/moderation.pt | 8 ++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/docs/HISTORY.txt b/docs/HISTORY.txt index 326f452..a577649 100644 --- a/docs/HISTORY.txt +++ b/docs/HISTORY.txt @@ -1,6 +1,12 @@ Changelog ========= +1.0b3 (XXXX-XX-XX) +------------------ + +* Bugfix for #2281226: Moderation View: Comments disappear when hitting the 'Apply' button without choosing a bulk action. +* Allow to show the full text of a comment in the moderation view. + 1.0b2 (2010-01-22) ------------------ diff --git a/plone/app/discussion/browser/javascripts/moderation.js b/plone/app/discussion/browser/javascripts/moderation.js index 69325da..8b05bb5 100644 --- a/plone/app/discussion/browser/javascripts/moderation.js +++ b/plone/app/discussion/browser/javascripts/moderation.js @@ -103,4 +103,25 @@ jq(document).ready(function() { } }); + /***************************************************************** + * Show full text of a comment. + *****************************************************************/ + jq(".show-full-comment-text").click(function(e) { + e.preventDefault(); + var target = jq(this).attr("href"); + var td = jq(this).parent(); + jq.ajax({ + type: "GET", + url: target, + data: "", + success: function(data){ + // show full text + td.replaceWith("" + data + ""); + }, + error: function(msg){ + alert("Error getting full comment text:" + target); + } + }); + }); + }); \ No newline at end of file diff --git a/plone/app/discussion/browser/moderation.pt b/plone/app/discussion/browser/moderation.pt index c537ced..bd59173 100644 --- a/plone/app/discussion/browser/moderation.pt +++ b/plone/app/discussion/browser/moderation.pt @@ -99,7 +99,13 @@ tal:content="item/Title" /> - + + + show full comment text +