Simplify js.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 7 Jan 2011 20:14:06 +0000 (21:14 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 7 Jan 2011 20:14:06 +0000 (21:14 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
12 files changed:
htdocs/javascript/xorg.js
templates/admin/user.tpl
templates/emails/antispam.tpl
templates/emails/index.tpl
templates/emails/send.tpl
templates/fusionax/ids.tpl
templates/fusionax/import.tpl
templates/payment/xnet.tpl
templates/platal/preferences.tpl
templates/search/adv.form.tpl
templates/search/index.tpl
templates/search/quick.form.tpl

index 8805ed4..192d1ca 100644 (file)
@@ -516,7 +516,7 @@ function sendTestEmail(token, hruid)
  * The real OnLoad
  */
 
-$(document).ready(function() {
+$(function() {
     auto_links();
     getNow();
     setInterval(getNow, 1000);
index 10ad40a..2f448ea 100644 (file)
@@ -93,7 +93,7 @@ function ban_read()
     document.forms.bans.read_perm.value = "!xorg.*";
 }
 
-$(document).ready(function() {
+$(function() {
   $('#tabs').tabs();
   $('.ui-tabs-nav li').width('24%')
     .click(function() { $(this).children('a').click() });
index f588dc3..628cf37 100644 (file)
@@ -24,7 +24,7 @@
 
 <script type="text/javascript">//<![CDATA[
   {literal}
-  $(document).ready(function() {
+  $(function() {
       var url = '{/literal}{$globals->baseurl}/emails/antispam/{literal}';
       var msg = "Le changement de réglage de l'antispam a bien été effectué.";
       $(':radio[name=statut_filtre]').change(function() {
index 69aef02..de94958 100644 (file)
@@ -25,7 +25,7 @@
 {literal}
 <script type="text/javascript">
   //<![CDATA[
-  $(document).ready(function() {
+  $(function() {
       var url = '{/literal}{$globals->baseurl}/emails/best/{literal}';
       var tok = '{/literal}{xsrf_token}{literal}';
       var msg = "Le changement a bien été effectué.";
index 263fce4..24189b2 100644 (file)
       saveMessage();
       return true;
     });
-  $(document).ready(
+  $(
     function() {
       // Remove empty options in select (they were added only for HTML
       // compatibility).
       $('#cc_contacts option[value=""]').remove();
     });
 
-    $(document).ready(function() {
+    $(function() {
       $("[name='to']").focus();
     });
   {/literal}
index 3ffa0e7..f103aec 100644 (file)
@@ -66,7 +66,7 @@ trouver une correspondance entre les personnes renseignés dans ces annuaires.<b
 <script type="text/javascript">
 {literal}
 //<!--
-$(document).ready(function() {
+$(function() {
     $('#autolink a.fusion-action').click(function(a){
         $.get(a.currentTarget.href,{},function(){
             $(a.currentTarget).hide();
index 0b01fff..deb7ec6 100644 (file)
@@ -23,7 +23,7 @@
 <script type="text/javascript">
 {literal}
 //<!--
-    $(document).ready(function() {
+    $(function() {
         $('#fusionax_import input').click(function() {
             $('#fusionax input').hide();
             $('#fusionax').append('Lancement de l\'import.<br/>');
index b318a2f..3dbe870 100644 (file)
@@ -24,7 +24,7 @@
 {literal}
 <script type="text/javascript">
 //<![CDATA[
-$(document).ready(function() {
+$(function() {
 {/literal}
   location.hash = "#{$anchor}";
 {literal}
index 61c00d3..985ed11 100644 (file)
@@ -27,7 +27,7 @@
 <script type="text/javascript">
 {literal}
 /* <![CDATA[ */
-$(document).ready(function() {
+$(function() {
   $("form input:radio").change(function() {
     $("#form").submit();
   });
index 1622e76..d3bc2d8 100644 (file)
       }
     }
 
-  $(document).ready(function() {
+  $(function() {
       $(".autocompleteTarget").hide();
       $(".autocomplete").show().each(function() {
         targeted = $("../.autocompleteTarget",this)[0];
@@ -285,7 +285,7 @@ function cleanForm(f) {
               f.egal2.value = '>=';
             }
           }
-          $(document).ready(function() { updatepromofields($('select[name=egal1]')[0]); });
+          $(function() { updatepromofields($('select[name=egal1]')[0]); });
           {/literal}
         /*]]>*/</script>
         <select name="egal1" onchange="updatepromofields(this)" style="text-align:center">
index 904e6ed..b8988b3 100644 (file)
@@ -47,7 +47,7 @@
   {if $search_results_nb eq 1}{literal}
     <script type="text/javascript">
       // popup automatically if only one result
-      $(document).ready(function() {
+      $(function() {
         $('#content a.popup2').click();
       });
     </script>
index e05423d..f513fc4 100644 (file)
@@ -66,7 +66,7 @@
 {if $show_js}
 {literal}
 <script type="text/javascript">
-  $(document).ready(function() {
+  $(function() {
     $("#quick_form input[name='quick']").focus();
   });
 </script>