From: Marcel Werk Date: Tue, 16 Aug 2022 11:35:52 +0000 (+0200) Subject: Document the deprecation of WCF.User.ObjectWatch.Subscribe X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a07e516a16f7f3c4ddaeaba3ce14cc353dd035db;p=GitHub%2FWoltLab%2Fwoltlab.github.io.git Document the deprecation of WCF.User.ObjectWatch.Subscribe --- diff --git a/docs/migration/wsc55/deprecations_removals.md b/docs/migration/wsc55/deprecations_removals.md index 9fa12f74..74afe07a 100644 --- a/docs/migration/wsc55/deprecations_removals.md +++ b/docs/migration/wsc55/deprecations_removals.md @@ -44,6 +44,8 @@ With version 6.0, we have deprecated certain components and removed several othe ### JavaScript +- `WCF.User.ObjectWatch.Subscribe` ([WoltLab/WCF#4962](https://github.com/WoltLab/WCF/pull/4962)) + ### Database Tables ### Templates diff --git a/docs/migration/wsc55/javascript.md b/docs/migration/wsc55/javascript.md index 16c03bf7..9fb0c977 100644 --- a/docs/migration/wsc55/javascript.md +++ b/docs/migration/wsc55/javascript.md @@ -3,3 +3,14 @@ ## Minimum requirements The ECMAScript target version has been increased to es2019 from es2017. + +## Subscribe Button (WCF.User.ObjectWatch.Subscribe) + +We have replaced the old jQuery-based `WCF.User.ObjectWatch.Subscribe` with a more modern replacement `WoltLabSuite/Core/Ui/User/ObjectWatch`. + +The new implementation comes with a ready-to-use template (`__userObjectWatchButton`) for use within `contentInteractionButtons`: +```smarty +{include file='__userObjectWatchButton' isSubscribed=$isSubscribed objectType='foo.bar' objectID=$id} +``` + +See [WoltLab/WCF#4962](https://github.com/WoltLab/WCF/pull/4962/) for details.