Ignore:
Timestamp:
Nov 23, 2010, 2:50:41 PM (13 years ago)
Author:
rvelices
Message:

small javascript and css simplification

Location:
trunk/admin/themes/default/template
Files:
2 edited

Legend:

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

    r6363 r7852  
    5555
    5656        <p>
     57                        {literal}
     58                        <script type="text/javascript">
     59                        jQuery(document).ready(function(){
     60
     61                                jQuery("#checkAllLink").click(function () {
     62                                        jQuery("#c13y input[type=checkbox]").attr('checked', true);
     63                                        return false;
     64                                });
     65
     66                                jQuery("#uncheckAllLink").click(function () {
     67                                        jQuery("#c13y input[type=checkbox]").attr('checked', false);
     68                                        return false;
     69                                });
     70
     71                        });
     72                        function DeselectAll( formulaire )
     73                        {
     74                                var elts = formulaire.elements;
     75                                for(var i=0; i <elts.length; i++)
     76                                {
     77                                        if (elts[i].type=='checkbox')
     78                                                elts[i].checked = false;
     79                                }
     80                        }
     81                        </script>
     82                        {/literal}
    5783          {if $c13y_show_submit_ignore}
    58               <a href="#" onclick="SelectAll(document.getElementById('c13y')); return false;">{'Check all'|@translate}</a>
    59             / <a href="#" onclick="DeselectAll(document.getElementById('c13y')); return false;">{'Uncheck all'|@translate}</a>
     84              <a href="#" id="checkAllLink">{'Check all'|@translate}</a>
     85            / <a href="#" id="uncheckAllLink">{'Uncheck all'|@translate}</a>
    6086          {/if}
    6187          {if isset($c13y_do_check)}
  • trunk/admin/themes/default/template/notification_by_mail.tpl

    r6363 r7852  
    11
    22{include file='include/autosize.inc.tpl'}
     3{literal}
     4<script type="text/javascript">
     5jQuery(document).ready(function(){
     6
     7        jQuery("#checkAllLink").click(function () {
     8                jQuery("#notification_by_mail input[type=checkbox]").attr('checked', true);
     9                return false;
     10        });
     11
     12        jQuery("#uncheckAllLink").click(function () {
     13                jQuery("#notification_by_mail input[type=checkbox]").attr('checked', false);
     14                return false;
     15        });
     16
     17});
     18</script>
     19{/literal}
    320
    421<div class="titrePage">
     
    98115      </table>
    99116      <p>
    100           <a href="#" onclick="SelectAll(document.getElementById('notification_by_mail')); return false;">{'Check all'|@translate}</a>
    101         / <a href="#" onclick="DeselectAll(document.getElementById('notification_by_mail')); return false;">{'Uncheck all'|@translate}</a>
     117          <a href="#" id="checkAllLink">{'Check all'|@translate}</a>
     118        / <a href="#" id="uncheckAllLink">{'Uncheck all'|@translate}</a>
    102119      </p>
    103120    </fieldset>
Note: See TracChangeset for help on using the changeset viewer.