From 74e11e6d2aafaac36326c96b54575fc324fe335b Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 20 Jul 2016 00:33:45 +0200 Subject: [PATCH] Improved object watch subscription ui --- wcfsetup/install/files/js/WCF.User.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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(); -- 2.20.1