Changeset 2429


Ignore:
Timestamp:
3/10/2012 2:15:54 AM (3 years ago)
Author:
lowjoel
Message:

Fixed the theme font-size switcher code.

Location:
branches/website/forumTheme/Templates/forumTheme/template
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/website/forumTheme/Templates/forumTheme/template/overall_header.html

    r2426 r2429  
    8787<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" /> 
    8888 
    89 <link href="{T_THEME_PATH}/normal.css" rel="stylesheet" type="text/css" title="A" /> 
    90 <link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" /> 
    91 <link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" /> 
     89<link href="{T_THEME_PATH}/normal.css" rel="stylesheet" type="text/css" class="fontsize-switcher" title="A" /> 
     90<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" class="fontsize-switcher" title="A+" /> 
     91<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" class="fontsize-switcher" title="A++" /> 
    9292 
    9393<!-- IF S_CONTENT_DIRECTION eq 'rtl' --> 
  • branches/website/forumTheme/Templates/forumTheme/template/styleswitcher.js

    r2423 r2429  
    114114function getActiveStyleSheet() 
    115115{ 
     116    var links = document.getElementsByTagName('link'); 
    116117    var i, a; 
    117118 
    118     for (i = 0; (a = document.getElementsByTagName('link')[i]); i++) 
     119    for (i = 0; (a = links[i]) != null; i++) 
    119120    { 
    120         if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title') && !a.disabled) 
     121        if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title') && a.className == 'fontsize-switcher' && !a.disabled) 
    121122        { 
     123            alert('answer: ' + a.getAttribute('title')) 
    122124            return a.getAttribute('title'); 
    123125        } 
     
    145147    } 
    146148 
    147     document.cookie = name + '=' + value + expires + style_cookie_settings; 
     149    document.cookie = name + '=' + value + expires; 
    148150} 
    149151 
Note: See TracChangeset for help on using the changeset viewer.