feature 1538: "select all" (+none, +invert) on user comments validation screen.
git-svn-id: http://piwigo.org/svn/trunk@5381 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
0197899306
commit
6d00630332
5 changed files with 88 additions and 63 deletions
|
|
@ -1,3 +1,32 @@
|
|||
{literal}
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$(".checkComment").click(function () {
|
||||
var checkbox = $(this).children("input[type=checkbox]");
|
||||
$(checkbox).attr('checked', !$(checkbox).is(':checked'));
|
||||
});
|
||||
|
||||
$("#commentSelectAll").click(function () {
|
||||
$(".checkComment input[type=checkbox]").attr('checked', true);
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#commentSelectNone").click(function () {
|
||||
$(".checkComment input[type=checkbox]").attr('checked', false);
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#commentSelectInvert").click(function () {
|
||||
$(".checkComment input[type=checkbox]").each(function() {
|
||||
$(this).attr('checked', !$(this).is(':checked'));
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
<div class="titrePage">
|
||||
<h2>{'Waiting'|@translate} {$TABSHEET_TITLE}</h2>
|
||||
</div>
|
||||
|
|
@ -7,24 +36,33 @@
|
|||
{if !empty($comments) }
|
||||
<form method="post" action="{$F_ACTION}">
|
||||
|
||||
{foreach from=$comments item=comment}
|
||||
<table width="99%">
|
||||
{foreach from=$comments item=comment name=comment}
|
||||
<tr valign="top" class="{if $smarty.foreach.comment.index is odd}row2{else}row1{/if}">
|
||||
<td style="width:50px;" class="checkComment">
|
||||
<input type="checkbox" name="comments[]" value="{$comment.ID}">
|
||||
</td>
|
||||
<td>
|
||||
<div class="comment">
|
||||
<a class="illustration" href="{$comment.U_PICTURE}"><img src="{$comment.TN_SRC}"></a>
|
||||
<p class="commentHeader"><strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
|
||||
<blockquote>{$comment.CONTENT}</blockquote>
|
||||
</div>
|
||||
<ul class="actions">
|
||||
<li><label><input type="radio" name="action-{$comment.ID}" value="reject">{'Reject'|@translate}</label></li>
|
||||
<li><label><input type="radio" name="action-{$comment.ID}" value="validate">{'Validate'|@translate}</label></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
<p class="checkActions">
|
||||
{'Select:'|@translate}
|
||||
<a href="#" id="commentSelectAll">{'All'|@translate}</a>,
|
||||
<a href="#" id="commentSelectNone">{'None'|@translate}</a>,
|
||||
<a href="#" id="commentSelectInvert">{'Invert'|@translate}</a>
|
||||
</p>
|
||||
|
||||
<p class="bottomButtons">
|
||||
<input type="hidden" name="list" value="{$LIST}">
|
||||
<input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}>
|
||||
<input class="submit" type="submit" name="validate-all" value="{'Validate All'|@translate}" {$TAG_INPUT_ENABLED}>
|
||||
<input class="submit" type="submit" name="reject-all" value="{'Reject All'|@translate}" {$TAG_INPUT_ENABLED}>
|
||||
<input class="submit" type="reset" value="{'Reset'|@translate}">
|
||||
<input class="submit" type="submit" name="validate" value="{'Validate'|@translate}" {$TAG_INPUT_ENABLED}>
|
||||
<input class="submit" type="submit" name="reject" value="{'Reject'|@translate}" {$TAG_INPUT_ENABLED}>
|
||||
</p>
|
||||
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue