add "select all" JS to select all comments in the moderate comments view.

svn path=/plone.app.discussion/trunk/; revision=27714
This commit is contained in:
Timo Stollenwerk 2009-06-29 09:54:53 +00:00
parent 906fa4ce7e
commit c25557650f
3 changed files with 29 additions and 22 deletions

View File

@ -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");
}
});
});

View File

@ -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);
</script>
@ -92,19 +85,7 @@
<table id="review-comments" class="listing" style="width: 100%" tal:condition="items">
<thead>
<tr>
<th colspan="7" class="nosort"
i18n:translate="label_select_all">
Select:
<a tal:attributes="href string:#"
id="foldercontents-selectall"
i18n:name="label_link_all"
i18n:translate="label_all">
All
</a>
</th>
</tr>
<tr>
<th class="nosort"> </th>
<th class="nosort"><input name="check_all" type="checkbox" value="0" /></th>
<th i18n:translate="heading_author">Commenter</th>
<th i18n:translate="heading_date">Date</th>
<th i18n:translate="heading_context">In Response To</th>
@ -143,7 +124,7 @@
</td>
<td tal:content="structure python:view.cook(item.Description)" />
<td style="width: 11em">
<td style="width: 11em;">
<form action=""
class="background-form"
method="post"

View File

@ -3,6 +3,11 @@
<javascript
id="++resource++plone.app.discussion.javascripts/reply_to_comment_form.js"
cacheable="False" compression="safe" cookable="False"
enabled="True" expression="" inline="False"
enabled="True" expression="" inline="False"
/>
<javascript
id="++resource++plone.app.discussion.javascripts/moderation.js"
cacheable="False" compression="safe" cookable="False"
enabled="True" expression="" inline="False"
/>
</object>