Ignore:
Timestamp:
Mar 26, 2010, 2:37:20 PM (14 years ago)
Author:
plg
Message:

feature 1538: "select all" (+none, +invert) on user comments validation screen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/comments.tpl

    r5123 r5381  
     1{literal}
     2<script>
     3$(document).ready(function(){
     4  $(".checkComment").click(function () {
     5    var checkbox = $(this).children("input[type=checkbox]");
     6    $(checkbox).attr('checked', !$(checkbox).is(':checked'));
     7  });
     8
     9  $("#commentSelectAll").click(function () {
     10    $(".checkComment input[type=checkbox]").attr('checked', true);
     11    return false;
     12  });
     13
     14  $("#commentSelectNone").click(function () {
     15    $(".checkComment input[type=checkbox]").attr('checked', false);
     16    return false;
     17  });
     18
     19  $("#commentSelectInvert").click(function () {
     20    $(".checkComment input[type=checkbox]").each(function() {
     21      $(this).attr('checked', !$(this).is(':checked'));
     22    });
     23    return false;
     24  });
     25
     26});
     27</script>
     28{/literal}
     29
    130<div class="titrePage">
    231  <h2>{'Waiting'|@translate} {$TABSHEET_TITLE}</h2>
     
    837<form method="post" action="{$F_ACTION}">
    938 
    10   {foreach from=$comments item=comment}
     39<table width="99%">
     40  {foreach from=$comments item=comment name=comment}
     41  <tr valign="top" class="{if $smarty.foreach.comment.index is odd}row2{else}row1{/if}">
     42    <td style="width:50px;" class="checkComment">
     43      <input type="checkbox" name="comments[]" value="{$comment.ID}">
     44    </td>
     45    <td>
    1146  <div class="comment">
    1247    <a class="illustration" href="{$comment.U_PICTURE}"><img src="{$comment.TN_SRC}"></a>
     
    1449    <blockquote>{$comment.CONTENT}</blockquote>
    1550  </div>
    16     <ul class="actions">
    17       <li><label><input type="radio" name="action-{$comment.ID}" value="reject">{'Reject'|@translate}</label></li>
    18       <li><label><input type="radio" name="action-{$comment.ID}" value="validate">{'Validate'|@translate}</label></li>
    19     </ul>
     51    </td>
     52  </tr>
    2053  {/foreach}
     54</table>
     55
     56  <p class="checkActions">
     57    {'Select:'|@translate}
     58    <a href="#" id="commentSelectAll">{'All'|@translate}</a>,
     59    <a href="#" id="commentSelectNone">{'None'|@translate}</a>,
     60    <a href="#" id="commentSelectInvert">{'Invert'|@translate}</a>
     61  </p>
    2162
    2263  <p class="bottomButtons">
    23     <input type="hidden" name="list" value="{$LIST}">
    24     <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}>
    25     <input class="submit" type="submit" name="validate-all" value="{'Validate All'|@translate}" {$TAG_INPUT_ENABLED}>
    26     <input class="submit" type="submit" name="reject-all" value="{'Reject All'|@translate}" {$TAG_INPUT_ENABLED}>
    27     <input class="submit" type="reset" value="{'Reset'|@translate}">
     64    <input class="submit" type="submit" name="validate" value="{'Validate'|@translate}" {$TAG_INPUT_ENABLED}>
     65    <input class="submit" type="submit" name="reject" value="{'Reject'|@translate}" {$TAG_INPUT_ENABLED}>
    2866  </p>
    2967
Note: See TracChangeset for help on using the changeset viewer.