Improved keyboard-based navigation
authorMarcel Werk <burntime@woltlab.com>
Thu, 28 Aug 2014 15:24:19 +0000 (17:24 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 28 Aug 2014 15:24:19 +0000 (17:24 +0200)
com.woltlab.wcf/templates/header.tpl
wcfsetup/install/files/js/WCF.User.js
wcfsetup/install/files/js/WCF.js

index 31c26fe760fb054a4d8a588962e350353a1308ce..524e5bd957534418f30328ef09ae95c9b89d9eb9 100644 (file)
@@ -39,7 +39,7 @@
                        
                        <ul class="navigationIcons">
                                <li id="toBottomLink"><a href="{$__wcf->getAnchor('bottom')}" title="{lang}wcf.global.scrollDown{/lang}" class="jsTooltip"><span class="icon icon16 icon-arrow-down"></span> <span class="invisible">{lang}wcf.global.scrollDown{/lang}</span></a></li>
-                               <li id="sitemap" class="jsOnly"><a title="{lang}wcf.page.sitemap{/lang}" class="jsTooltip"><span class="icon icon16 icon-sitemap"></span> <span class="invisible">{lang}wcf.page.sitemap{/lang}</span></a></li>
+                               <li id="sitemap" class="jsOnly"><a href="#" title="{lang}wcf.page.sitemap{/lang}" class="jsTooltip"><span class="icon icon16 icon-sitemap"></span> <span class="invisible">{lang}wcf.page.sitemap{/lang}</span></a></li>
                                {if $headerNavigation|isset}{@$headerNavigation}{/if}
                                {event name='navigationIcons'}
                        </ul>
index 41357e17718261649305cf7d0099dcd75fb9dfc8..6c3bb8d49e593656d5d1bf78771bbbc930d5e72e 100644 (file)
@@ -2726,6 +2726,7 @@ WCF.User.ObjectWatch.Subscribe = Class.extend({
         * @param       object          event
         */
        _click: function(event) {
+               event.preventDefault();
                var $button = $(event.currentTarget);
                
                this._proxy.setOption('data', {
index 51843602612aa4f75d6485748e3c95489c50a404..251ed77cba3b32b0a367d74297c7a9053f80fe2b 100755 (executable)
@@ -9935,7 +9935,9 @@ WCF.Sitemap = Class.extend({
        /**
         * Handles clicks on the sitemap icon.
         */
-       _click: function() {
+       _click: function(event) {
+               event.preventDefault();
+               
                if (this._dialog === null) {
                        this._dialog = $('<div id="sitemapDialog" />').appendTo(document.body);
                        
@@ -10159,7 +10161,7 @@ WCF.Style.Chooser = Class.extend({
         * Initializes the style chooser class.
         */
        init: function() {
-               $('<li class="styleChooser"><a>' + WCF.Language.get('wcf.style.changeStyle') + '</a></li>').appendTo($('#footerNavigation > ul.navigationItems')).click($.proxy(this._showDialog, this));
+               $('<li class="styleChooser"><a href="#">' + WCF.Language.get('wcf.style.changeStyle') + '</a></li>').appendTo($('#footerNavigation > ul.navigationItems')).click($.proxy(this._showDialog, this));
                
                this._proxy = new WCF.Action.Proxy({
                        success: $.proxy(this._success, this)
@@ -10170,6 +10172,8 @@ WCF.Style.Chooser = Class.extend({
         * Displays the style chooser dialog.
         */
        _showDialog: function() {
+               event.preventDefault();
+               
                if (this._dialog === null) {
                        this._dialog = $('<div id="styleChooser" />').hide().appendTo(document.body);
                        this._loadDialog();