From: Marcel Werk Date: Tue, 19 Jul 2016 22:33:45 +0000 (+0200) Subject: Improved object watch subscription ui X-Git-Tag: 3.0.0_Beta_1~1036 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=74e11e6d2aafaac36326c96b54575fc324fe335b;p=GitHub%2FWoltLab%2FWCF.git Improved object watch subscription ui --- diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index 97dc371dc3..7dc244e6dd 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -2823,6 +2823,7 @@ WCF.User.ObjectWatch.Subscribe = Class.extend({ // bind event listeners $(this._buttonSelector).each($.proxy(function(index, button) { var $button = $(button); + $button.addClass('pointer'); var $objectID = $button.data('objectID'); this._buttons[$objectID] = $button.click($.proxy(this._click, this)); }, this)); @@ -2945,8 +2946,13 @@ WCF.User.ObjectWatch.Subscribe = Class.extend({ $button.data('isSubscribed', true); } else { - $icon.removeClass('fa-bookmark').addClass('fa-bookmark-o'); - $button.data('isSubscribed', false); + if ($button.data('removeOnUnsubscribe')) { + $button.parent().remove(); + } + else { + $icon.removeClass('fa-bookmark').addClass('fa-bookmark-o'); + $button.data('isSubscribed', false); + } if (this._reloadOnUnsubscribe) { window.location.reload();