themes/oxygen/header.tpl
changeset 57 b354deeaa4c4
parent 32 4d87aad3c4c0
child 71 21770a1a5213
equal deleted inserted replaced
56:eb8eacb056d1 57:b354deeaa4c4
    20         if(elem.style.display=='none')
    20         if(elem.style.display=='none')
    21         {
    21         {
    22           elem.style.display = 'block';
    22           elem.style.display = 'block';
    23           counter.style.display = 'none';
    23           counter.style.display = 'none';
    24           elem.parentNode.style.width = '156px';
    24           elem.parentNode.style.width = '156px';
    25           createCookie(side+'_sidebar', 'open', 365);
    25           if ( !KILL_SWITCH )
       
    26           {
       
    27             createCookie(side+'_sidebar', 'open', 365);
       
    28           }
    26         } else {
    29         } else {
    27           elem.style.display = 'none';
    30           elem.style.display = 'none';
    28           counter.style.display = 'block';
    31           counter.style.display = 'block';
    29           elem.parentNode.style.width = '25px';
    32           elem.parentNode.style.width = '25px';
    30           createCookie(side+'_sidebar', 'collapsed', 365);
    33           if ( !KILL_SWITCH )
       
    34           {
       
    35             createCookie(side+'_sidebar', 'collapsed', 365);
       
    36           }
    31         }
    37         }
    32       }
    38       }
    33       
    39       
    34       /*
    40       /*
    35       window.onload = function() {
    41       window.onload = function() {
    41         if(typeof mdgInnerLoader == 'function')
    47         if(typeof mdgInnerLoader == 'function')
    42           mdgInnerLoader();
    48           mdgInnerLoader();
    43       }
    49       }
    44       */
    50       */
    45       
    51       
    46       addOnloadHook(function() {
    52       if ( typeof(KILL_SWITCH) != 'undefined' )
    47           if(typeof readCookie == 'function')
    53       {
    48           {
    54         if ( !KILL_SWITCH )
    49             if(readCookie('left_sidebar') =='collapsed') collapseSidebar('left');
    55         {
    50             if(readCookie('right_sidebar')=='collapsed') collapseSidebar('right');
    56           var oxygenSidebarSetup = function() {
    51           }
    57               if(typeof readCookie == 'function')
    52         });
    58               {
       
    59                 if(readCookie('left_sidebar') =='collapsed') collapseSidebar('left');
       
    60                 if(readCookie('right_sidebar')=='collapsed') collapseSidebar('right');
       
    61               }
       
    62             };
       
    63           addOnloadHook(oxygenSidebarSetup);
       
    64         }
       
    65       }
    53       
    66       
    54       function ajaxRenameInline()
    67       function ajaxRenameInline()
    55       {
    68       {
       
    69         if ( KILL_SWITCH )
       
    70           return false;
    56         // This trick is _so_ vBulletin...
    71         // This trick is _so_ vBulletin...
    57         elem = document.getElementById('h2PageName');
    72         elem = document.getElementById('h2PageName');
    58         if(!elem) return;
    73         if(!elem) return;
    59         elem.style.display = 'none';
    74         elem.style.display = 'none';
    60         name = elem.innerHTML;
    75         name = elem.innerHTML;