From c25557650f82ea11656a71171cee7e95301eb7f3 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 29 Jun 2009 09:54:53 +0000 Subject: [PATCH] add "select all" JS to select all comments in the moderate comments view. svn path=/plone.app.discussion/trunk/; revision=27714 --- .../browser/javascripts/moderation.js | 21 +++++++++++++++++ plone/app/discussion/browser/moderation.pt | 23 ++----------------- .../profiles/default/jsregistry.xml | 7 +++++- 3 files changed, 29 insertions(+), 22 deletions(-) create mode 100644 plone/app/discussion/browser/javascripts/moderation.js diff --git a/plone/app/discussion/browser/javascripts/moderation.js b/plone/app/discussion/browser/javascripts/moderation.js new file mode 100644 index 0000000..817ac71 --- /dev/null +++ b/plone/app/discussion/browser/javascripts/moderation.js @@ -0,0 +1,21 @@ +jq(document).ready(function() { + + /***************************************************************** + * Check all checkboxes. + *****************************************************************/ + jq("input[name='check_all']").click(function(){ + if(jq(this).val()==0){ + jq(this).parents("table") + .find("input:checkbox") + .attr("checked","checked") + .val("1"); + } + else{ + jq(this).parents("table") + .find("input:checkbox") + .attr("checked","") + .val("0"); + } + }); + + }); \ No newline at end of file diff --git a/plone/app/discussion/browser/moderation.pt b/plone/app/discussion/browser/moderation.pt index 3d5ee72..9fda7ce 100644 --- a/plone/app/discussion/browser/moderation.pt +++ b/plone/app/discussion/browser/moderation.pt @@ -19,15 +19,8 @@ $.post(target, params, function(data) { $(row).fadeOut("normal", function() { $(this).remove(); - if($('#review-comments tbody tr').length == 0) { - $('#comments-help').fadeOut(); - $('#review-comments').fadeOut("normal", function() { - $('#no-comments-message').fadeIn(); - }); - } }); }); - }); });})(jQuery); @@ -92,19 +85,7 @@ - - - - + @@ -143,7 +124,7 @@
- Select: - - All - -
Commenter Date In Response To - +
+