Ignore:
Timestamp:
May 22, 2011, 12:34:18 PM (13 years ago)
Author:
mistic100
Message:

code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Comments_on_Albums/template/coa_admin_comments.tpl

    r9641 r10984  
    11{* this is a copy of admin/theme/defaults/template/comments.tpl a bit modified *}
    2        
     2 
    33{literal}
    44<script type="text/javascript">
    5         $(document).ready(function(){
    6                 $(".checkComment").click(function(event) {
    7                         if (event.target.type !== 'checkbox') {
    8                                 var checkbox = $(this).children("input[type=checkbox]");
    9                                 $(checkbox).attr('checked', !$(checkbox).is(':checked'));
    10                         }
    11                 });
    12                 $("#commentSelectAll").click(function () {
    13                         $(".checkComment input[type=checkbox]").attr('checked', true);
    14                         return false;
    15                 });
    16                 $("#commentSelectNone").click(function () {
    17                         $(".checkComment input[type=checkbox]").attr('checked', false);
    18                         return false;
    19                 });
    20                 $("#commentSelectInvert").click(function () {
    21                         $(".checkComment input[type=checkbox]").each(function() {
    22                                 $(this).attr('checked', !$(this).is(':checked'));
    23                         });
    24                         return false;
    25                 });
    26         });
     5  $(document).ready(function(){
     6    $(".checkComment").click(function(event) {
     7      if (event.target.type !== 'checkbox') {
     8        var checkbox = $(this).children("input[type=checkbox]");
     9        $(checkbox).attr('checked', !$(checkbox).is(':checked'));
     10      }
     11    });
     12    $("#commentSelectAll").click(function () {
     13      $(".checkComment input[type=checkbox]").attr('checked', true);
     14      return false;
     15    });
     16    $("#commentSelectNone").click(function () {
     17      $(".checkComment input[type=checkbox]").attr('checked', false);
     18      return false;
     19    });
     20    $("#commentSelectInvert").click(function () {
     21      $(".checkComment input[type=checkbox]").each(function() {
     22        $(this).attr('checked', !$(this).is(':checked'));
     23      });
     24      return false;
     25    });
     26  });
    2727</script>
    2828{/literal}
    2929
    3030<div class="titrePage">
    31         <h2>{'Waiting'|@translate}</h2>
     31  <h2>{'Waiting'|@translate}</h2>
    3232</div>
    3333
     
    3737<form method="post" action="{$F_ACTION}">
    3838
    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>
    46                                 <div class="comment">
    47                                         <a class="illustration" href="{$comment.CAT_URL}">{$comment.CAT_NAME}</a>
    48                                         <p class="commentHeader"><strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
    49                                         <blockquote>{$comment.CONTENT}</blockquote>
    50                                 </div>
    51                         </td>
    52                 </tr>
    53         {/foreach}
    54         </table>
     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>
     46        <div class="comment">
     47          <a class="illustration" href="{$comment.CAT_URL}">{$comment.CAT_NAME}</a>
     48          <p class="commentHeader"><strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
     49          <blockquote>{$comment.CONTENT}</blockquote>
     50        </div>
     51      </td>
     52    </tr>
     53  {/foreach}
     54  </table>
    5555
    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>
     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>
    6262
    63         <p class="bottomButtons">
    64                 <input class="submit" type="submit" name="validate_albums" value="{'Validate'|@translate}">
    65                 <input class="submit" type="submit" name="reject_albums" value="{'Reject'|@translate}">
    66         </p>
     63  <p class="bottomButtons">
     64    <input class="submit" type="submit" name="validate_albums" value="{'Validate'|@translate}">
     65    <input class="submit" type="submit" name="reject_albums" value="{'Reject'|@translate}">
     66  </p>
    6767
    6868</form>
Note: See TracChangeset for help on using the changeset viewer.