Dotclear

Changeset 2029:d946a1b81456 for admin


Ignore:
Timestamp:
09/22/13 21:12:39 (12 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

Simplify javascript; move css stuff in css file !

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/prelude.js

    r2009 r2029  
    1 // Accessibility links thks to vie-publique.fr 
    2 aFocus = function() { 
    3      if(document.getElementById("prelude")) { 
    4           var aElts = document.getElementById("prelude").getElementsByTagName("A"); 
    5           for (var i=0; i<aElts.length; i++) { 
    6                aElts[i].className="hidden"; 
    7                aElts[i].onfocus=function() { 
     1$(function() { 
     2     if ($('#prelude').length > 0) { 
     3          $('#prelude a') 
     4               .addClass('hidden') 
     5               .focus(function() { 
    86                    $('#prelude a').removeClass('hidden'); 
    9                     $('#wrapper').css('padding-top', '1em'); // il vaudrait mieux ajouter une class with-prelude … 
    10                     $('#help-button').css('top', '1em'); // … mais addClass ne marche pas (?) 
    11                     $('#collapser').css('top', '1em'); 
    12                } 
    13           } 
     7                    $('#wrapper, #help-button, #collapser').addClass('with-prelude'); 
     8               }); 
    149     } 
    15 } 
    16 // events onload 
    17 function addLoadEvent(func) { 
    18      if (window.addEventListener) 
    19           window.addEventListener("load", func, false); 
    20      else if (window.attachEvent) 
    21           window.attachEvent("onload", func); 
    22 } 
    23 addLoadEvent(aFocus); 
     10}); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map