Improved keyboard-based navigation
authorMarcel Werk <burntime@woltlab.com>
Fri, 29 Aug 2014 19:49:46 +0000 (21:49 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 29 Aug 2014 19:49:46 +0000 (21:49 +0200)
wcfsetup/install/files/js/WCF.Like.js
wcfsetup/install/files/js/WCF.Moderation.js
wcfsetup/install/files/js/WCF.js

index d8d9d7ed69616a3435c55593327e0ca734404172..7d8b6a7e37912ae063b4649850c817501bfc7177 100644 (file)
@@ -202,8 +202,8 @@ WCF.Like = Class.extend({
         * @param       integer         containerID
         */
        _createWidget: function(containerID) {
-               var $likeButton = $('<li class="wcfLikeButton"><a title="'+WCF.Language.get('wcf.like.button.like')+'" class="jsTooltip"><span class="icon icon16 icon-thumbs-up-alt" /> <span class="invisible">'+WCF.Language.get('wcf.like.button.like')+'</span></a></li>');
-               var $dislikeButton = $('<li class="wcfDislikeButton"><a title="'+WCF.Language.get('wcf.like.button.dislike')+'" class="jsTooltip"><span class="icon icon16 icon-thumbs-down-alt" /> <span class="invisible">'+WCF.Language.get('wcf.like.button.dislike')+'</span></a></li>');
+               var $likeButton = $('<li class="wcfLikeButton"><a href="#" title="'+WCF.Language.get('wcf.like.button.like')+'" class="jsTooltip"><span class="icon icon16 icon-thumbs-up-alt" /> <span class="invisible">'+WCF.Language.get('wcf.like.button.like')+'</span></a></li>');
+               var $dislikeButton = $('<li class="wcfDislikeButton"><a href="#" title="'+WCF.Language.get('wcf.like.button.dislike')+'" class="jsTooltip"><span class="icon icon16 icon-thumbs-down-alt" /> <span class="invisible">'+WCF.Language.get('wcf.like.button.dislike')+'</span></a></li>');
                if (!this._enableDislikes) $dislikeButton.hide();
                
                if (!this._allowForOwnContent && (WCF.User.userID == this._containers[containerID].data('userID'))) {
@@ -260,6 +260,7 @@ WCF.Like = Class.extend({
         * @param       object          event
         */
        _click: function(event) {
+               event.preventDefault();
                var $button = $(event.currentTarget);
                if ($button === null) {
                        console.debug("[WCF.Like] Unable to find target button, aborting.");
index a7e44355076e94a9b8f8d638f33534914cb216db..a9aa06a40e9f70b632271d8831d74e89b3f3e49e 100644 (file)
@@ -387,6 +387,7 @@ WCF.Moderation.Report.Content = Class.extend({
         * @param       object          event
         */
        _click: function(event) {
+               event.preventDefault();
                this._objectID = $(event.currentTarget).data('objectID');
                
                this._proxy.setOption('data', {
index 034f699bd9bb1d00f9cb7ddbdbb8e78700280b2e..424c4721415525b09a5aaccebd5cbc61800f1a21 100755 (executable)
@@ -8110,6 +8110,7 @@ WCF.InlineEditor = Class.extend({
         * @param       object          event
         */
        _show: function(event) {
+               event.preventDefault();
                var $elementID = $(event.currentTarget).data('elementID');
                
                // build dropdown