diff options
Diffstat (limited to 'phpBB/styles/prosilver')
| -rw-r--r-- | phpBB/styles/prosilver/template/overall_header.html | 2 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/styleswitcher.js | 38 |
2 files changed, 36 insertions, 4 deletions
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 9d4162591a..1ec9041b49 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -136,7 +136,7 @@ <ul class="linklist navlinks"> <li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>‹</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li> - <li class="rightside"><a href="#" onclick="fontsizeup(); return false;" onkeypress="fontsizeup(); return false;" class="fontsize" title="{L_CHANGE_FONT_SIZE}">{L_CHANGE_FONT_SIZE}</a></li> + <li class="rightside"><a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="{L_CHANGE_FONT_SIZE}">{L_CHANGE_FONT_SIZE}</a></li> <!-- IF U_EMAIL_TOPIC --><li class="rightside"><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}" class="sendemail">{L_EMAIL_TOPIC}</a></li><!-- ENDIF --> <!-- IF U_EMAIL_PM --><li class="rightside"><a href="{U_EMAIL_PM}" title="{L_EMAIL_PM}" class="sendemail">{L_EMAIL_PM}</a></li><!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/styleswitcher.js b/phpBB/styles/prosilver/template/styleswitcher.js index 203d8e4c21..b6ba1ecdae 100644 --- a/phpBB/styles/prosilver/template/styleswitcher.js +++ b/phpBB/styles/prosilver/template/styleswitcher.js @@ -1,6 +1,12 @@ -function fontsizeup() +function fontsizeup(event) { + // Skip tabs + if (event && getKeyCode(event) == 9) + { + return true; + } + var active = getActiveStyleSheet(); switch (active) @@ -29,11 +35,19 @@ function fontsizeup() setActiveStyleSheet('A'); break; } + + return false; } -function fontsizedown() +function fontsizedown(event) { - active = getActiveStyleSheet(); + // Skip tabs + if (event && getKeyCode(event) == 9) + { + return true; + } + + var active = getActiveStyleSheet(); switch (active) { @@ -60,6 +74,24 @@ function fontsizedown() setActiveStyleSheet('A--'); break; } + + return false; +} + +function getKeyCode(event) +{ + // IE doesn't fire the onkeypress event for tabs + // Reference: http://www.quirksmode.org/js/keys.html + + var code = (event.keyCode) ? event.keyCode : 0; + + // Probably using FF + if (!code && event.charCode) + { + code = event.charCode; + } + + return code; } function setActiveStyleSheet(title) |
