Deprecate the legacy label chooser
authorAlexander Ebert <ebert@woltlab.com>
Sun, 8 Oct 2023 15:58:56 +0000 (17:58 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 8 Oct 2023 15:58:56 +0000 (17:58 +0200)
com.woltlab.wcf/templates/__labelSelection.tpl
com.woltlab.wcf/templates/categoryArticleList.tpl
com.woltlab.wcf/templates/unreadArticleList.tpl
com.woltlab.wcf/templates/watchedArticleList.tpl
wcfsetup/install/files/js/WCF.Label.js

index 89fbb841d2e231c8910d7ae58285eafadc8f4392..6e06afe13adb2ec561214663ae16c3b531dd4289 100644 (file)
@@ -1,3 +1,4 @@
+{* @deprecated 6.1 Use the new `__labelPickerGroup` template instead. *}
 {foreach from=$labelGroups item=labelGroup}
        {if $labelGroup|count}
                <dt><label>{$labelGroup->getTitle()}</label></dt>
index 12411e94f4a9cdecbb762dbb4e974dc6405fcf41..f41a7f9ca760e11df916bd01bb27aa98e43e09fb 100644 (file)
@@ -36,7 +36,7 @@
                                
                                <div class="boxContent">
                                        <dl>
-                                               {include file='__labelSelection'}
+                                               {include file='__labelPickerGroup'}
                                        </dl>
                                        <div class="formSubmit">
                                                <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
                                </div>
                        </section>
                </form>
-               
-               <script data-relocate="true">
-                       $(function() {
-                               WCF.Language.addObject({
-                                       'wcf.label.none': '{jslang}wcf.label.none{/jslang}',
-                                       'wcf.label.withoutSelection': '{jslang}wcf.label.withoutSelection{/jslang}'
-                               });
-                               
-                               new WCF.Label.Chooser({ {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '#sidebarForm', undefined, true);
-                       });
-               </script>
        {/if}
 {/capture}
 
index 140321095b1bc9891c28113c9013cc947bfeb143..0377ded7824db462eaf3b08379c1c22ad368c9d7 100644 (file)
@@ -17,7 +17,7 @@
                                
                                <div class="boxContent">
                                        <dl>
-                                               {include file='__labelSelection'}
+                                               {include file='__labelPickerGroup'}
                                        </dl>
                                        <div class="formSubmit">
                                                <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
                                </div>
                        </section>
                </form>
-               
-               <script data-relocate="true">
-                       $(function() {
-                               WCF.Language.addObject({
-                                       'wcf.label.none': '{jslang}wcf.label.none{/jslang}',
-                                       'wcf.label.withoutSelection': '{jslang}wcf.label.withoutSelection{/jslang}'
-                               });
-                               
-                               new WCF.Label.Chooser({ {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '#sidebarForm', undefined, true);
-                       });
-               </script>
        {/if}
 {/capture}
 
index 179cf697587aa9f52a29825c5aeb14fc3f67e4f0..4c622eb302eab4a25883c9381c1d3e4e85807960 100644 (file)
@@ -15,7 +15,7 @@
                                
                                <div class="boxContent">
                                        <dl>
-                                               {include file='__labelSelection'}
+                                               {include file='__labelPickerGroup'}
                                        </dl>
                                        <div class="formSubmit">
                                                <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
                                </div>
                        </section>
                </form>
-               
-               <script data-relocate="true">
-                       $(function() {
-                               WCF.Language.addObject({
-                                       'wcf.label.none': '{jslang}wcf.label.none{/jslang}',
-                                       'wcf.label.withoutSelection': '{jslang}wcf.label.withoutSelection{/jslang}'
-                               });
-                               
-                               new WCF.Label.Chooser({ {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '#sidebarForm', undefined, true);
-                       });
-               </script>
        {/if}
 {/capture}
 
index d62a2ad5940d6fb84d638e263ea68a3d0ee81295..cd8c2c83af21b0cdf0735ea0c470adb7f2d1cc03 100644 (file)
@@ -12,6 +12,7 @@ WCF.Label = {};
  * @param      string          containerSelector
  * @param      string          submitButtonSelector
  * @param      boolean         showWithoutSelection
+ * @deprecated 6.1 Use the new `LabelPicker` PHP API
  */
 WCF.Label.Chooser = Class.extend({
        /**