Remove the legacy user panel
authorAlexander Ebert <ebert@woltlab.com>
Mon, 8 Aug 2022 17:00:32 +0000 (19:00 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 9 Aug 2022 11:11:25 +0000 (13:11 +0200)
com.woltlab.wcf/templateDelete.xml
com.woltlab.wcf/templates/moderationQueueList.tpl [deleted file]
com.woltlab.wcf/templates/notificationListUserPanel.tpl [deleted file]
com.woltlab.wcf/templates/user.tpl
wcfsetup/install/files/js/WCF.Moderation.js
wcfsetup/install/files/js/WCF.User.js
wcfsetup/install/files/js/WCF.js
wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueAction.class.php
wcfsetup/install/files/lib/data/user/notification/UserNotificationAction.class.php
wcfsetup/install/files/style/ui/dropdownInteractive.scss [deleted file]
wcfsetup/install/files/style/ui/wsc31.scss

index f92065e1e1d6884d4597875dc20ccea15a503fb9..94ab04a98d0c9da4db4f924f2cf29a1ba2fcd0e6 100644 (file)
@@ -1,54 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/2019/templateDelete.xsd">
        <delete>
-               <template>__dialogForm</template>
-               <template>__formFieldFooter</template>
-               <template>__multifactorBackupCodeField</template>
-               <template>__multifactorDisableExplanation</template>
-               <template>__multifactorEmailCodeField</template>
-               <template>__multifactorManageInitialBackup</template>
-               <template>__multifactorTotpCodeField</template>
-               <template>__objectActionDeleteIcon</template>
-               <template>__objectActionToogleIcon</template>
-               <template>__signatureMaxImageDimensions</template>
-               <template>avatarCropDialog</template>
-               <template>boxArticleListSidebar</template>
-               <template>boxMostActiveMembers</template>
-               <template>boxMostLikedMembers</template>
-               <template>boxNewestMembers</template>
-               <template>codeBBCodeTag</template>
-               <template>cookiePolicy</template>
-               <template>dashboard</template>
-               <template>dashboardBoxContent</template>
-               <template>dashboardBoxPaidSubscriptions</template>
-               <template>dashboardBoxRecentActivity</template>
-               <template>dashboardBoxRecentActivitySidebar</template>
-               <template>dashboardBoxRegisterButton</template>
-               <template>dashboardBoxSidebar</template>
-               <template>dashboardBoxSignedInAs</template>
-               <template>dashboardBoxStatsSidebar</template>
-               <template>email</template>
-               <template>email_mail</template>
-               <template>emailTextPlain</template>
-               <template>footerMenu</template>
-               <template>mail</template>
-               <template>mainMenu</template>
-               <template>mainMenuSubMenu</template>
-               <template>multifactorManageEmail</template>
-               <template>notificationListOustanding</template>
-               <template>pageLogo</template>
-               <template>pageMenuMobile</template>
-               <template>pageNavbarBottom</template>
-               <template>privacyPolicy</template>
-               <template>quoteBBCodeTag</template>
-               <template>reactionTabbedUserList</template>
-               <template>reactionTypeIcon</template>
-               <template>searchArea</template>
-               <template>searchResult</template>
-               <template>shareButtonsPrivacySettings</template>
-               <template>sitemap</template>
-               <template>sitemapUserAccount</template>
-               <template>spoilerBBCodeTag</template>
-               <template>userHeader</template>
+               <template>moderationQueueList</template>
+               <template>notificationListUserPanel</template>
        </delete>
 </data>
diff --git a/com.woltlab.wcf/templates/moderationQueueList.tpl b/com.woltlab.wcf/templates/moderationQueueList.tpl
deleted file mode 100644 (file)
index b47d254..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{foreach from=$queues item=queue}
-       <li class="moderationQueueEntry{if $queue->isNew()} interactiveDropdownItemOutstanding{/if}" data-link="{$queue->getLink()}" data-object-id="{@$queue->queueID}" data-is-read="{if $queue->isNew()}false{else}true{/if}">
-               <div class="box48">
-                       <div>
-                               {@$queue->getUserProfile()->getAvatar()->getImageTag(48)}
-                       </div>
-                       <div>
-                               <h3>
-                                       <span class="badge label">{$queue->getLabel()}</span>
-                                       <a href="{@$queue->getLink()}">{$queue->getAffectedObject()->getTitle()}</a>
-                               </h3>
-                               <small>{if $queue->getUserProfile()->userID}{user object=$queue->getUserProfile()}{else}{$queue->getAffectedObject()->getUsername()}{/if} <span class="separatorLeft">{@$queue->lastChangeTime|time}</span></small>
-                       </div>
-               </div>
-       </li>
-{/foreach}
diff --git a/com.woltlab.wcf/templates/notificationListUserPanel.tpl b/com.woltlab.wcf/templates/notificationListUserPanel.tpl
deleted file mode 100644 (file)
index 924b98c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{foreach from=$notifications[notifications] item=notification}
-       <li class="notificationItem{if $notification[event]->getAuthors()|count > 1} groupedNotificationItem{/if}{if !$notification[event]->isConfirmed()} interactiveDropdownItemOutstanding{/if}" data-link="{if $notification[event]->isConfirmed()}{$notification[event]->getLink()}{else}{link controller='NotificationConfirm' id=$notification[notificationID]}{/link}{/if}" data-link-replace-all="{if $notification[event]->isConfirmed()}false{else}true{/if}" data-object-id="{@$notification[notificationID]}" data-is-read="{if $notification[event]->isConfirmed()}true{else}false{/if}">
-               <div class="box48">
-                       <div>
-                               {if $notification[event]->getAuthors()|count < 2}
-                                       {@$notification[event]->getAuthor()->getAvatar()->getImageTag(48)}
-                               {else}
-                                       <span class="icon icon48 fa-users"></span>
-                               {/if}
-                       </div>
-                       
-                       <div>
-                               <h3>{@$notification[event]->getMessage()}</h3>
-                               <small>{@$notification[time]|time}</small>
-                       </div>
-               </div>
-       </li>
-{/foreach}
index 361d97dc5ff997cf7db0f170de877505cb0835fb..b8faa9988909580ab28dc82b5fceb60fa8856c2d 100644 (file)
                                        'wcf.user.editProfile': '{jslang}wcf.user.editProfile{/jslang}'
                                });
                                
-                               var userProfileEditor = new WCF.User.Profile.Editor({@$user->userID}, {if $editOnInit}true{else}false{/if});
-                               {if $__wcf->getUser()->userID == $user->userID}
-                                       var editLink = elBySel('.interactiveDropdownItemsUserMenu .jsUserPanelEditProfile');
-                                       if (editLink) {
-                                               editLink.addEventListener('click', function (event) {
-                                                       userProfileEditor._beginEdit(event);
-                                                       
-                                                       WCF.CloseOverlayHandler.forceExecution();
-                                               });
-                                       }
-                               {/if}
+                               new WCF.User.Profile.Editor({@$user->userID}, {if $editOnInit}true{else}false{/if});
                        {/if}
                        
                        {if $followingCount > 7}
index 424adb88c46760ea29a98adca1bcc38e11c14c18..cde82784589a12e43491a9b3f494bd217a8bf8d8 100644 (file)
@@ -395,13 +395,6 @@ if (COMPILER_TARGET_DEFAULT) {
                 * @param        jQuery                jqXHR
                 */
                _success: function (data, textStatus, jqXHR) {
-                       // update dropdown
-                       var dropdown = WCF.Dropdown.Interactive.Handler.getDropdown('outstandingModeration');
-                       if (dropdown) {
-                               dropdown.getLinkList().find('.interactiveDropdownItemMarkAllAsRead').remove();
-                               dropdown.getItemList().find('.interactiveDropdownItemMarkAsRead').remove();
-                       }
-                       
                        // remove badge in userpanel
                        $('#outstandingModeration .badgeUpdate').remove();
                        
index 5d6a9410422057dafb581de388747ef9e692000c..ac92587ce25e828b4dc33b5b91d155bb04f1eab3 100644 (file)
@@ -8,455 +8,6 @@
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  */
 
-/**
- * Namespace for User Panel classes.
- */
-WCF.User.Panel = { };
-
-if (COMPILER_TARGET_DEFAULT) {
-       /**
-        * Abstract implementation for user panel items providing an interactive dropdown.
-        *
-        * @param        jQuery                triggerElement
-        * @param        string                identifier
-        * @param        object                options
-        * @deprecated 5.5  Implement `WoltLabSuite/Core/Ui/User/Menu/Data/Provider` instead.
-        */
-       WCF.User.Panel.Abstract = Class.extend({
-               /**
-                * counter badge
-                * @var        jQuery
-                */
-               _badge: null,
-               
-               /**
-                * interactive dropdown instance
-                * @var        WCF.Dropdown.Interactive.Instance
-                */
-               _dropdown: null,
-               
-               /**
-                * dropdown identifier
-                * @var        string
-                */
-               _identifier: '',
-               
-               /**
-                * true if data should be loaded using an AJAX request
-                * @var        boolean
-                */
-               _loadData: true,
-               
-               /**
-                * header icon to mark all items belonging to this user panel item as read
-                * @var        jQuery
-                */
-               _markAllAsReadLink: null,
-               
-               /**
-                * list of options required to dropdown initialization and UI features
-                * @var        object
-                */
-               _options: {},
-               
-               /**
-                * action proxy
-                * @var        WCF.Action.Proxy
-                */
-               _proxy: null,
-               
-               /**
-                * trigger element
-                * @var        jQuery
-                */
-               _triggerElement: null,
-               
-               /**
-                * @var        Element
-                */
-               _button: null,
-               
-               /**
-                * @var        Function
-                */
-                _callbackFocus: null,
-               
-               /**
-                * @var {string}
-                */
-               _callbackCloseUuid: '',
-               
-               /**
-                * @var        boolean
-                */
-               _wasInsideDropdown: false,
-               
-               /**
-                * Initializes the WCF.User.Panel.Abstract class.
-                *
-                * @param        jQuery                triggerElement
-                * @param        string                identifier
-                * @param        object                options
-                */
-               init: function (triggerElement, identifier, options) {
-                       this._dropdown = null;
-                       this._loadData = true;
-                       this._identifier = identifier;
-                       this._triggerElement = triggerElement;
-                       this._options = options;
-                       this._callbackFocus = null;
-                       this._callbackCloseUuid = '';
-                       
-                       this._proxy = new WCF.Action.Proxy({
-                               showLoadingOverlay: false,
-                               success: $.proxy(this._success, this)
-                       });
-                       
-                       this._triggerElement.click($.proxy(this.toggle, this));
-                       this._button = elBySel('a', this._triggerElement[0]);
-                       if (this._button) {
-                               elAttr(this._button, 'role', 'button');
-                               elAttr(this._button, 'tabindex', '0');
-                               elAttr(this._button, 'aria-haspopup', true);
-                               elAttr(this._button, 'aria-expanded', false);
-                       }
-                       
-                       if (this._options.showAllLink) {
-                               this._triggerElement.dblclick($.proxy(this._dblClick, this));
-                       }
-                       
-                       var $badge = this._triggerElement.find('span.badge');
-                       if ($badge.length) {
-                               this._badge = $badge;
-                       }
-
-                       require(["WoltLabSuite/Core/Event/Handler"], (EventHandler) => {
-                               EventHandler.add("com.woltlab.wcf.pageMenu", "legacyMenu", (data) => {
-                                       data.panels.push({
-                                               api: {
-                                                       getDropdown: () => this._dropdown,
-                                                       open: () => {
-                                                               if (this._dropdown === null) {
-                                                                       this._dropdown = this._initDropdown();
-                                                               }
-
-                                                               this._dropdown.open();
-
-                                                               if (!this._loadData) {
-                                                                       // check if there are outstanding items but there are no outstanding ones in the current list
-                                                                       if (this._badge !== null) {
-                                                                               var $count = parseInt(this._badge.text()) || 0;
-                                                                               if ($count && !this._dropdown.getItemList().children('.interactiveDropdownItemOutstanding').length) {
-                                                                                       this._loadData = true;
-                                                                               }
-                                                                       }
-                                                               }
-                                                               
-                                                               if (this._loadData) {
-                                                                       this._loadData = false;
-                                                                       this._load();
-                                                               }
-                                                       },
-                                                       close: () => {
-                                                               if (this._dropdown === null) {
-                                                                       this._dropdown = this._initDropdown();
-                                                               }
-
-                                                               this._dropdown.close();
-                                                       },
-                                               },
-                                               element: triggerElement[0],
-                                       });
-                               });
-                       });
-               },
-               
-               /**
-                * Toggles the interactive dropdown.
-                *
-                * @param        {Event?}        event
-                * @return        {boolean}
-                */
-               toggle: function (event) {
-                       if (event instanceof Event) {
-                               event.preventDefault();
-                       }
-                       
-                       if (this._dropdown === null) {
-                               this._dropdown = this._initDropdown();
-                       }
-                       
-                       if (this._dropdown.toggle()) {
-                               if (!this._loadData) {
-                                       // check if there are outstanding items but there are no outstanding ones in the current list
-                                       if (this._badge !== null) {
-                                               var $count = parseInt(this._badge.text()) || 0;
-                                               if ($count && !this._dropdown.getItemList().children('.interactiveDropdownItemOutstanding').length) {
-                                                       this._loadData = true;
-                                               }
-                                       }
-                               }
-                               
-                               if (this._loadData) {
-                                       this._loadData = false;
-                                       this._load();
-                               }
-                               
-                               elAttr(this._button, 'aria-expanded', true);
-                               if (this._callbackFocus === null) {
-                                       this._callbackFocus = this._maintainFocus.bind(this);
-                               }
-                               document.body.addEventListener('focus', this._callbackFocus, { capture: true });
-                               
-                               this._callbackCloseUuid = WCF.System.Event.addListener('WCF.Dropdown.Interactive.Instance', 'close', (function (data) {
-                                       if (data.instance === this._dropdown) {
-                                               WCF.System.Event.removeListener('WCF.Dropdown.Interactive.Instance', 'close', this._callbackCloseUuid);
-                                               document.body.removeEventListener('focus', this._callbackFocus, { capture: true });
-                                       }
-                               }).bind(this));
-                       }
-                       else {
-                               elAttr(this._button, 'aria-expanded', false);
-                               
-                               WCF.System.Event.removeListener('WCF.Dropdown.Interactive.Instance', 'close', this._callbackCloseUuid);
-                               document.body.removeEventListener('focus', this._callbackFocus, { capture: true });
-                       }
-                       
-                       return false;
-               },
-               
-               /**
-                * Forward to original URL by double clicking the trigger element.
-                *
-                * @param        object                event
-                * @return        boolean
-                */
-               _dblClick: function (event) {
-                       event.preventDefault();
-                       
-                       window.location = this._options.showAllLink;
-                       
-                       return false;
-               },
-               
-               /**
-                * Initializes the dropdown on first usage.
-                *
-                * @return        WCF.Dropdown.Interactive.Instance
-                */
-               _initDropdown: function () {
-                       var $dropdown = WCF.Dropdown.Interactive.Handler.create(this._triggerElement, this._identifier, this._options);
-                       $('<li class="loading"><span class="icon icon24 fa-spinner" /> <span>' + WCF.Language.get('wcf.global.loading') + '</span></li>').appendTo($dropdown.getItemList());
-                       
-                       return $dropdown;
-               },
-               
-               /**
-                * Loads item list data via AJAX.
-                */
-               _load: function () {
-                       // override this in your own implementation to fetch display data
-               },
-               
-               /**
-                * Handles successful AJAX requests.
-                *
-                * @param        object                data
-                */
-               _success: function (data) {
-                       if (data.returnValues.template !== undefined) {
-                               var $itemList = this._dropdown.getItemList().empty();
-                               $(data.returnValues.template).appendTo($itemList);
-                               
-                               if (!$itemList.children().length) {
-                                       $('<li class="noItems">' + this._options.noItems + '</li>').appendTo($itemList);
-                               }
-                               
-                               if (this._options.enableMarkAsRead) {
-                                       var $outstandingItems = this._dropdown.getItemList().children('.interactiveDropdownItemOutstanding');
-                                       if (this._markAllAsReadLink === null && $outstandingItems.length) {
-                                               var $button = this._markAllAsReadLink = $('<li class="interactiveDropdownItemMarkAllAsRead"><a href="#" title="' + WCF.Language.get('wcf.global.button.markAllAsRead') + '" class="jsTooltip"><span class="icon icon24 fa-check" /></a></li>').appendTo(this._dropdown.getLinkList());
-                                               $button.click((function (event) {
-                                                       this._dropdown.close();
-                                                       
-                                                       this._markAllAsRead();
-                                                       
-                                                       return false;
-                                               }).bind(this));
-                                       }
-                                       
-                                       $outstandingItems.each((function (index, item) {
-                                               var $item = $(item).addClass('interactiveDropdownItemOutstandingIcon');
-                                               var $objectID = $item.data('objectID');
-                                               
-                                               var $button = $('<div class="interactiveDropdownItemMarkAsRead"><a href="#" title="' + WCF.Language.get('wcf.global.button.markAsRead') + '" class="jsTooltip"><span class="icon icon16 fa-check" /></a></div>').appendTo($item);
-                                               $button.click((function (event) {
-                                                       this._markAsRead(event, $objectID);
-                                                       
-                                                       return false;
-                                               }).bind(this));
-                                       }).bind(this));
-                               }
-                               
-                               this._dropdown.getItemList().children().each(function (index, item) {
-                                       var $item = $(item);
-                                       var $link = $item.data('link');
-                                       
-                                       if ($link) {
-                                               if ($.browser.msie) {
-                                                       $item.click(function (event) {
-                                                               if (event.target.tagName !== 'A') {
-                                                                       window.location = $link;
-                                                                       
-                                                                       return false;
-                                                               }
-                                                       });
-                                               }
-                                               else {
-                                                       $item.addClass('interactiveDropdownItemShadow');
-                                                       $('<a href="' + $link + '" class="interactiveDropdownItemShadowLink" />').appendTo($item);
-                                               }
-                                               
-                                               if ($item.data('linkReplaceAll')) {
-                                                       $item.find('> .box48 a:not(.userLink)').prop('href', $link);
-                                               }
-                                       }
-                               });
-                               
-                               this._dropdown.rebuildScrollbar();
-                       }
-                       
-                       if (data.returnValues.totalCount !== undefined) {
-                               this.updateBadge(data.returnValues.totalCount);
-                       }
-                       
-                       if (this._options.enableMarkAsRead) {
-                               if (data.returnValues.markAsRead) {
-                                       var $item = this._dropdown.getItemList().children('li[data-object-id=' + data.returnValues.markAsRead + ']');
-                                       if ($item.length) {
-                                               $item.removeClass('interactiveDropdownItemOutstanding').data('isRead', true);
-                                               $item.children('.interactiveDropdownItemMarkAsRead').remove();
-                                       }
-                               }
-                               else if (data.returnValues.markAllAsRead) {
-                                       this.resetItems();
-                                       this.updateBadge(0);
-                               }
-                       }
-               },
-               
-               /**
-                * Marks an item as read.
-                *
-                * @param        object                event
-                * @param        integer                objectID
-                */
-               _markAsRead: function (event, objectID) {
-                       // override this in your own implementation to mark an item as read
-               },
-               
-               /**
-                * Marks all items as read.
-                */
-               _markAllAsRead: function () {
-                       // override this in your own implementation to mark all items as read
-               },
-               
-               /**
-                * Updates the badge's count or removes it if count reaches zero. Passing a negative number is undefined.
-                *
-                * @param        integer                count
-                */
-               updateBadge: function (count) {
-                       count = parseInt(count) || 0;
-                       
-                       if (count) {
-                               if (this._badge === null) {
-                                       this._badge = $('<span class="badge badgeUpdate" />').appendTo(this._triggerElement.children('a'));
-                                       this._badge.before(' ');
-                               }
-                               
-                               this._badge.text(count);
-                       }
-                       else if (this._badge !== null) {
-                               this._badge.remove();
-                               this._badge = null;
-                       }
-                       
-                       if (this._options.enableMarkAsRead) {
-                               if (!count && this._markAllAsReadLink !== null) {
-                                       this._markAllAsReadLink.remove();
-                                       this._markAllAsReadLink = null;
-                               }
-                       }
-                       
-                       WCF.System.Event.fireEvent('com.woltlab.wcf.userMenu', 'updateBadge', {
-                               count: count,
-                               identifier: this._identifier
-                       });
-               },
-               
-               /**
-                * Resets the dropdown's inner item list.
-                */
-               resetItems: function () {
-                       // this method could be called from outside, but the dropdown was never
-                       // toggled and thus never initialized
-                       if (this._dropdown !== null) {
-                               this._dropdown.resetItems();
-                               this._loadData = true;
-                       }
-               },
-               
-               /**
-                * @param {Event} event
-                */
-               _maintainFocus: function(event) {
-                       // Ignore a focus shift that was not the result of a keyboard interaction.
-                       if (document.activeElement && !document.activeElement.classList.contains('focus-visible')) {
-                               return;
-                       }
-                       
-                       var dropdown = this._dropdown.getContainer()[0];
-                       
-                       if (!dropdown.contains(event.target)) {
-                               if (this._wasInsideDropdown) {
-                                       this._button.focus();
-                                       this._wasInsideDropdown = false;
-                               }
-                               else {
-                                       elBySel('a', dropdown).focus();
-                               }
-                       }
-                       else {
-                               this._wasInsideDropdown = true;
-                       }
-               }
-       });
-}
-else {
-       WCF.User.Panel.Abstract = Class.extend({
-               _badge: {},
-               _dropdown: {},
-               _identifier: "",
-               _loadData: true,
-               _markAllAsReadLink: {},
-               _options: {},
-               _proxy: {},
-               _triggerElement: {},
-               init: function() {},
-               toggle: function() {},
-               _dblClick: function() {},
-               _initDropdown: function() {},
-               _load: function() {},
-               _success: function() {},
-               _markAsRead: function() {},
-               _markAllAsRead: function() {},
-               updateBadge: function() {},
-               resetItems: function() {}
-       });
-}
-
 /**
  * UserProfile namespace
  */
index d49fe2188d350a1696f6ddca960d75572ca77bf8..a8923f88b7154a059e81f50f0326591430d24704 100755 (executable)
@@ -955,344 +955,7 @@ WCF.Dropdown = {
        }
 };
 
-/**
- * Namespace for interactive dropdowns.
- */
-WCF.Dropdown.Interactive = { };
-
 if (COMPILER_TARGET_DEFAULT) {
-       /**
-        * General interface to create and manage interactive dropdowns.
-        * 
-        * @deprecated 5.5 Use `WoltLabSuite/Core/Ui/User/Menu/Manager` instead.
-        */
-       WCF.Dropdown.Interactive.Handler = {
-               /**
-                * global container for interactive dropdowns
-                * @var        jQuery
-                */
-               _dropdownContainer: null,
-               
-               /**
-                * list of dropdown instances by identifier
-                * @var        object<WCF.Dropdown.Interactive.Instance>
-                */
-               _dropdownMenus: {},
-               
-               /**
-                * Creates a new interactive dropdown instance.
-                *
-                * @param        jQuery                triggerElement
-                * @param        string                identifier
-                * @param        object                options
-                * @return        WCF.Dropdown.Interactive.Instance
-                */
-               create: function (triggerElement, identifier, options) {
-                       if (this._dropdownContainer === null) {
-                               this._dropdownContainer = $('<div class="dropdownMenuContainer" />').appendTo(document.body);
-                               WCF.CloseOverlayHandler.addCallback('WCF.Dropdown.Interactive.Handler', $.proxy(this.closeAll, this));
-                       }
-                       
-                       var $instance = new WCF.Dropdown.Interactive.Instance(this._dropdownContainer, triggerElement, identifier, options);
-                       this._dropdownMenus[identifier] = $instance;
-                       
-                       return $instance;
-               },
-               
-               /**
-                * Opens an interactive dropdown, returns false if identifier is unknown.
-                *
-                * @param        string                identifier
-                * @return        boolean
-                */
-               open: function (identifier) {
-                       if (this._dropdownMenus[identifier]) {
-                               this._dropdownMenus[identifier].open();
-                               
-                               return true;
-                       }
-                       
-                       return false;
-               },
-               
-               /**
-                * Closes an interactive dropdown, returns false if identifier is unknown.
-                *
-                * @param        string                identifier
-                * @return        boolean
-                */
-               close: function (identifier) {
-                       if (this._dropdownMenus[identifier]) {
-                               this._dropdownMenus[identifier].close();
-                               
-                               return true;
-                       }
-                       
-                       return false;
-               },
-               
-               /**
-                * Closes all interactive dropdowns.
-                */
-               closeAll: function () {
-                       for (var instance in this._dropdownMenus) {
-                               if (this._dropdownMenus.hasOwnProperty(instance)) {
-                                       this._dropdownMenus[instance].close();
-                               }
-                       }
-               },
-               
-               getOpenDropdown: function () {
-                       for (var instance in this._dropdownMenus) {
-                               if (this._dropdownMenus.hasOwnProperty(instance)) {
-                                       if (this._dropdownMenus[instance].isOpen()) {
-                                               return this._dropdownMenus[instance];
-                                       }
-                               }
-                       }
-                       
-                       return null;
-               },
-               
-               /**
-                * Returns the dropdown with given identifier or `undefined` if no such dropdown exists.
-                *
-                * @param        string                identifier
-                * @return        {WCF.Dropdown.Interactive.Instance?}
-                */
-               getDropdown: function (identifier) {
-                       return this._dropdownMenus[identifier];
-               }
-       };
-       
-       /**
-        * Represents and manages a single interactive dropdown instance.
-        *
-        * @param        jQuery                dropdownContainer
-        * @param        jQuery                triggerElement
-        * @param        string                identifier
-        * @param        object                options
-        * @deprecated 5.5 Implement `WoltLabSuite/Core/Ui/User/Menu/Data/Provider` instead.
-        */
-       WCF.Dropdown.Interactive.Instance = Class.extend({
-               /**
-                * dropdown container
-                * @var        jQuery
-                */
-               _container: null,
-               
-               /**
-                * inner item list
-                * @var        jQuery
-                */
-               _itemList: null,
-               
-               /**
-                * header link list
-                * @var        jQuery
-                */
-               _linkList: null,
-               
-               /**
-                * option list
-                * @var        object
-                */
-               _options: {},
-               
-               /**
-                * arrow pointer
-                * @var        jQuery
-                */
-               _pointer: null,
-               
-               /**
-                * trigger element
-                * @var        jQuery
-                */
-               _triggerElement: null,
-               
-               /**
-                * Represents and manages a single interactive dropdown instance.
-                *
-                * @param        jQuery                dropdownContainer
-                * @param        jQuery                triggerElement
-                * @param        string                identifier
-                * @param        object                options
-                */
-               init: function (dropdownContainer, triggerElement, identifier, options) {
-                       this._options = options || {};
-                       this._triggerElement = triggerElement;
-                       
-                       var $itemContainer = null;
-                       if (options.staticDropdown === true) {
-                               this._container = this._triggerElement.find('.interactiveDropdownStatic:eq(0)').data('source', identifier).click(function (event) {
-                                       event.stopPropagation();
-                               });
-                       }
-                       else {
-                               this._container = $('<div class="interactiveDropdown" data-source="' + identifier + '" />').click(function (event) {
-                                       event.stopPropagation();
-                               });
-                               
-                               var $header = $('<div class="interactiveDropdownHeader" />').appendTo(this._container);
-                               $('<span class="interactiveDropdownTitle">' + options.title + '</span>').appendTo($header);
-                               this._linkList = $('<ul class="interactiveDropdownLinks inlineList"></ul>').appendTo($header);
-                               
-                               $itemContainer = $('<div class="interactiveDropdownItemsContainer" />').appendTo(this._container);
-                               this._itemList = $('<ul class="interactiveDropdownItems" />').appendTo($itemContainer);
-                               
-                               $('<a href="' + options.showAllLink + '" class="interactiveDropdownShowAll">' + WCF.Language.get('wcf.user.panel.showAll') + '</a>').appendTo(this._container);
-                       }
-                       
-                       this._pointer = $('<span class="elementPointer"><span /></span>').appendTo(this._container);
-                       
-                       require(['Ui/Screen'], (function (UiScreen) {
-                               if (UiScreen.is('screen-lg')) {
-                                       if ($itemContainer !== null) {
-                                               // use jQuery scrollbar on desktop, mobile views have a similar display built-in
-                                               $itemContainer.perfectScrollbar({
-                                                       suppressScrollX: true
-                                               });
-                                       }
-                               }
-                       }).bind(this));
-                       
-                       this._container.appendTo(dropdownContainer);
-               },
-               
-               /**
-                * Returns the dropdown container.
-                *
-                * @return        jQuery
-                */
-               getContainer: function () {
-                       return this._container;
-               },
-               
-               /**
-                * Returns the inner item list.
-                *
-                * @return        jQuery
-                */
-               getItemList: function () {
-                       return this._itemList;
-               },
-               
-               /**
-                * Returns the header link list.
-                *
-                * @return        jQuery
-                */
-               getLinkList: function () {
-                       return this._linkList;
-               },
-               
-               /**
-                * Opens the dropdown.
-                */
-               open: function () {
-                       WCF.Dropdown._closeAll();
-                       
-                       this._triggerElement.addClass('open');
-                       this._container.addClass('open');
-                       
-                       WCF.System.Event.fireEvent('com.woltlab.wcf.Search', 'close');
-                       
-                       this.render();
-               },
-               
-               /**
-                * Closes the dropdown
-                */
-               close: function () {
-                       this._triggerElement.removeClass('open');
-                       this._container.removeClass('open');
-                       
-                       WCF.System.Event.fireEvent('WCF.Dropdown.Interactive.Instance', 'close', {
-                               instance: this
-                       });
-               },
-               
-               /**
-                * Returns true if dropdown instance is visible.
-                *
-                * @returns     {boolean}
-                */
-               isOpen: function () {
-                       return this._triggerElement.hasClass('open');
-               },
-               
-               /**
-                * Toggles the dropdown state, returns true if dropdown is open afterwards, else false.
-                *
-                * @return        boolean
-                */
-               toggle: function () {
-                       if (this._container.hasClass('open')) {
-                               this.close();
-                               
-                               return false;
-                       }
-                       else {
-                               require(["WoltLabSuite/Core/Ui/CloseOverlay"], (CloseOverlay) => {
-                                       CloseOverlay.execute();
-
-                                       this.open();
-                               });
-                               
-                               return true;
-                       }
-               },
-               
-               /**
-                * Resets the inner item list and closes the dropdown.
-                */
-               resetItems: function () {
-                       this._itemList.empty();
-                       
-                       this.close();
-               },
-               
-               /**
-                * Renders the dropdown.
-                */
-               render: function () {
-                       require(['Ui/Alignment', 'Ui/Screen'], (function (UiAlignment, UiScreen) {
-                               if (UiScreen.is('screen-lg')) {
-                                       UiAlignment.set(this._container[0], this._triggerElement[0], {
-                                               horizontal: 'right',
-                                               pointer: true
-                                       });
-                               }
-                               else {
-                                       this._container.css({
-                                               bottom: '',
-                                               left: '',
-                                               right: '',
-                                               top: elById('pageHeaderPanel').clientHeight + 'px'
-                                       });
-                               }
-                       }).bind(this));
-               },
-               
-               /**
-                * Rebuilds the desktop scrollbar.
-                */
-               rebuildScrollbar: function () {
-                       require(['Ui/Screen'], function (UiScreen) {
-                               if (UiScreen.is('screen-lg')) {
-                                       var $itemContainer = this._itemList.parent();
-                                       
-                                       // do NOT use 'update', seems to be broken
-                                       $itemContainer.perfectScrollbar('destroy');
-                                       $itemContainer.perfectScrollbar({
-                                               suppressScrollX: true
-                                       });
-                               }
-                       }.bind(this));
-               }
-       });
-       
        /**
         * Clipboard API
         * 
index a806d082a0434fb55dd1133e37bf03ce9016c668..8d62242f06b7aadd97b712d6fd08fe9054e19d67 100644 (file)
@@ -98,36 +98,6 @@ class ModerationQueueAction extends AbstractDatabaseObjectAction
         ModerationQueueManager::getInstance()->resetModerationCount();
     }
 
-    /**
-     * Validates parameters to fetch a list of outstanding queues.
-     *
-     * @deprecated 5.5
-     */
-    public function validateGetOutstandingQueues()
-    {
-        WCF::getSession()->checkPermissions(['mod.general.canUseModeration']);
-    }
-
-    /**
-     * Returns a list of outstanding queues.
-     *
-     * @return  string[]
-     * @deprecated 5.5 This method provided the data for the legacy user panel implementation.
-     */
-    public function getOutstandingQueues()
-    {
-        ['queues' => $queues, 'totalCount' => $totalCount] = $this->getModerationQueues();
-
-        WCF::getTPL()->assign([
-            'queues' => $queues,
-        ]);
-
-        return [
-            'template' => WCF::getTPL()->fetch('moderationQueueList'),
-            'totalCount' => $totalCount,
-        ];
-    }
-
     /**
      * @since 5.5
      */
index aa2b19fb892b65485cbf152124a5f2d3080e0bb1..ae9bd8b9178d9e2598f1565d87e505d703fb32ba 100644 (file)
@@ -182,35 +182,6 @@ class UserNotificationAction extends AbstractDatabaseObjectAction
         return $notifications;
     }
 
-    /**
-     * Validates the 'getOutstandingNotifications' action.
-     *
-     * @deprecated 5.5
-     */
-    public function validateGetOutstandingNotifications()
-    {
-        // does nothing
-    }
-
-    /**
-     * Loads user notifications.
-     *
-     * @return  mixed[]
-     * @deprecated 5.5 This method provided the data for the legacy user panel implementation.
-     */
-    public function getOutstandingNotifications()
-    {
-        $notifications = UserNotificationHandler::getInstance()->getMixedNotifications();
-        WCF::getTPL()->assign([
-            'notifications' => $notifications,
-        ]);
-
-        return [
-            'template' => WCF::getTPL()->fetch('notificationListUserPanel'),
-            'totalCount' => $notifications['notificationCount'],
-        ];
-    }
-
     /**
      * @since 5.5
      */
diff --git a/wcfsetup/install/files/style/ui/dropdownInteractive.scss b/wcfsetup/install/files/style/ui/dropdownInteractive.scss
deleted file mode 100644 (file)
index 79dae3d..0000000
+++ /dev/null
@@ -1,305 +0,0 @@
-.dropdownMenuContainer > .interactiveDropdown.open {
-       visibility: visible;
-
-       @include screen-md-down {
-               top: var(--offset-top, 101px) !important;
-       }
-}
-
-/* styling for interactive dropdowns (currently only used in the user panel) */
-.interactiveDropdown {
-       background-color: $wcfContentBackground;
-       color: $wcfContentText;
-       pointer-events: all;
-       position: absolute;
-       visibility: hidden;
-       z-index: 450;
-
-       /* prevent dropdown from flickering during calculation */
-       left: -200%;
-
-       > .elementPointer {
-               display: none;
-       }
-
-       @include screen-sm-md {
-               display: flex;
-               flex-direction: column;
-               position: fixed;
-               width: 400px;
-
-               // override JS positioning
-               bottom: 0 !important;
-               left: auto !important;
-               top: 0 !important;
-               right: 0 !important;
-
-               > .interactiveDropdownHeader,
-               > .interactiveDropdownShowAll {
-                       flex: 0 0 auto;
-               }
-
-               > .interactiveDropdownItemsContainer {
-                       flex: 1 1 auto;
-                       max-height: none;
-                       overflow: auto;
-
-                       -webkit-overflow-scrolling: touch;
-               }
-       }
-
-       @include screen-lg {
-               border-radius: 2px;
-               box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
-               position: fixed;
-               top: 50px !important;
-       }
-}
-
-/* drop down header */
-.interactiveDropdownHeader {
-       align-items: center;
-       background-color: $wcfSidebarBackground;
-       color: $wcfSidebarHeadlineText;
-       display: flex;
-       padding: 10px;
-
-       a {
-               color: $wcfSidebarHeadlineLink;
-
-               &:hover {
-                       color: $wcfSidebarHeadlineLinkActive;
-
-                       text-decoration: underline;
-               }
-       }
-
-       .interactiveDropdownTitle {
-               flex: 1 1 auto;
-
-               @include wcfFontHeadline;
-       }
-
-       .interactiveDropdownLinks {
-               flex: 0 0 auto;
-               margin-left: 5px;
-       }
-
-       @include screen-sm-down {
-               padding: 10px;
-       }
-}
-
-/* container for dropdown items */
-.interactiveDropdownItemsContainer {
-       border: 1px solid $wcfContentBorderInner;
-       border-width: 1px 0;
-
-       &.ps-container {
-               > .interactiveDropdownItems {
-                       position: relative;
-                       z-index: 100;
-               }
-
-               > .ps-scrollbar-y-rail {
-                       z-index: 200;
-               }
-       }
-}
-
-/* dropdown item list */
-.interactiveDropdownItems {
-       > li {
-               padding: 10px;
-               position: relative;
-
-               &:not(:last-child) {
-                       border-bottom: 1px solid $wcfContentBorderInner;
-               }
-
-               &:hover {
-                       background-color: $wcfTabularBoxBackgroundActive;
-               }
-
-               a {
-                       color: inherit;
-
-                       &:hover {
-                               color: inherit;
-                       }
-               }
-
-               h3 a {
-                       font-weight: 600;
-               }
-
-               .box48 {
-                       align-items: center;
-                       overflow: hidden;
-               }
-
-               small {
-                       align-items: center;
-                       color: $wcfContentDimmedText;
-                       display: flex;
-                       margin-top: 3px;
-
-                       .separatorLeft {
-                               margin-left: 0.25em;
-                       }
-               }
-
-               @include screen-sm-down {
-                       padding: 10px;
-               }
-       }
-
-       .loading,
-       .noItems {
-               align-items: center;
-               display: flex;
-               justify-content: center;
-               padding: 20px 10px;
-
-               > .fa-spinner {
-                       margin-right: 5px;
-               }
-
-               @include wcfFontHeadline;
-       }
-}
-
-/* outstanding / unread item */
-.interactiveDropdownItemOutstanding {
-       display: flex;
-
-       > .box48 {
-               flex: 1 1 auto;
-       }
-
-       small::after {
-               background-color: rgb(49, 138, 220);
-               border-radius: 50%;
-               content: "";
-               height: 8px;
-               margin-left: 5px;
-               width: 8px;
-       }
-}
-
-/* mark as read button for an item */
-.interactiveDropdownItemMarkAsRead {
-       align-self: center;
-       flex: 0 0 auto;
-       margin-left: 5px;
-
-       a {
-               pointer-events: all;
-       }
-}
-
-/* Adds a link spanning the entire item while being placed behind all other links appearing
-   within the regular text using a lower z-index. Allows for regular links to be accessible,
-   but causes the item to act as a link. */
-.interactiveDropdownItemShadow {
-       > .box48 {
-               position: relative;
-       }
-
-       > .box48,
-       > .interactiveDropdownItemMarkAsRead {
-               pointer-events: none;
-               z-index: 20;
-       }
-
-       > .interactiveDropdownItemShadowLink {
-               bottom: 0;
-               left: 0;
-               position: absolute;
-               right: 0;
-               top: 0;
-               z-index: 10;
-       }
-}
-
-/* show all button shown in dropdown menu bottom */
-.interactiveDropdownShowAll {
-       background-color: $wcfSidebarBackground;
-       color: $wcfSidebarHeadlineText;
-       display: block;
-       padding: 10px;
-       text-align: center;
-
-       &:hover {
-               color: $wcfSidebarHeadlineText;
-               text-decoration: underline;
-       }
-}
-
-@include screen-md-up {
-       .interactiveDropdown {
-               min-width: 350px;
-       }
-
-       .interactiveDropdownItemsContainer {
-               max-height: 400px;
-               overflow: hidden;
-               position: relative;
-       }
-
-       .interactiveDropdownItems:not(.interactiveDropdownItemsUserMenu) > li {
-               max-width: 400px;
-       }
-}
-
-@include screen-sm-down {
-       .interactiveDropdown {
-               bottom: 0;
-               display: flex;
-               flex-direction: column;
-               left: 0;
-               position: fixed;
-               right: 0;
-       }
-
-       .interactiveDropdownHeader {
-               flex: 0 0 auto;
-       }
-
-       .interactiveDropdownItemsContainer {
-               flex: 1 1 auto;
-               overflow: auto;
-
-               -webkit-overflow-scrolling: touch;
-
-               /* increase the clickable area of the mark as read icon */
-               .interactiveDropdownItemOutstanding {
-                       padding-right: 41px;
-               }
-
-               .interactiveDropdownItemMarkAsRead {
-                       bottom: 0;
-                       position: absolute;
-                       right: 0;
-                       top: 0;
-                       width: 36px; /* 16px icon + 2x 10px padding */
-
-                       > a {
-                               display: block;
-                               height: 100%;
-                               text-align: center;
-
-                               > .icon {
-                                       position: relative;
-                                       top: 50%;
-
-                                       transform: translateY(-50%);
-                               }
-                       }
-               }
-       }
-
-       .interactiveDropdownShowAll {
-               flex: 0 0 auto;
-       }
-}
index 8441afd257acf6bc08f19598d58208e83a3aa7e0..6b723d4be4ceae19f354e8d414cfb3df110a5528 100644 (file)
        }
 
        // adjust color values to account for a significant darker sidebar background
-       .interactiveDropdownHeader .icon {
-               color: inherit;
-       }
        .sidebar,
        .messageSidebar {
                dl:not(.plain) > dt,