From: Alexander Ebert Date: Tue, 18 Aug 2015 15:48:52 +0000 (+0200) Subject: Added replacements for WCF.Like, WCF.User.List and $.ui.wcfPages X-Git-Tag: 3.0.0_Beta_1~2030^2~292 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ec86f434252c605a9b8259f2d6e0e555e58024b1;p=GitHub%2FWoltLab%2FWCF.git Added replacements for WCF.Like, WCF.User.List and $.ui.wcfPages --- diff --git a/wcfsetup/install/files/js/WCF.Like.js b/wcfsetup/install/files/js/WCF.Like.js index 1df53cac6d..0588c7907b 100644 --- a/wcfsetup/install/files/js/WCF.Like.js +++ b/wcfsetup/install/files/js/WCF.Like.js @@ -6,6 +6,8 @@ * @author Alexander Ebert * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License + * + * @deprecated 2.2 - please use `WoltLab/WCF/Ui/Like/Handler` instead */ WCF.Like = Class.extend({ /** diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 9faba717a3..7873dc92d6 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -5724,145 +5724,17 @@ WCF.System.Fullscreen = { /** * Provides the 'jump to page' overlay. + * + * @deprecated 2.2 - use `WoltLab/WCF/Ui/Page/JumpTo` instead */ WCF.System.PageNavigation = { - /** - * submit button - * @var jQuery - */ - _button: null, - - /** - * page No description - * @var jQuery - */ - _description: null, - - /** - * dialog overlay - * @var jQuery - */ - _dialog: null, - - /** - * active element id - * @var string - */ - _elementID: '', - - /** - * list of tracked navigation bars - * @var object - */ - _elements: { }, - - /** - * page No input - * @var jQuery - */ - _pageNo: null, - - /** - * Initializes the 'jump to page' overlay for given selector. - * - * @param string selector - * @param object callback - */ init: function(selector, callback) { - var $elements = $(selector); - if (!$elements.length) { - return; - } - - callback = callback || null; - if (callback !== null && !$.isFunction(callback)) { - console.debug("[WCF.System.PageNavigation] Callback for selector '" + selector + "' is invalid, aborting."); - return; - } - - this._initElements($elements, callback); - }, - - /** - * Initializes the 'jump to page' overlay for given elements. - * - * @param jQuery elements - * @param object callback - */ - _initElements: function(elements, callback) { - var self = this; - elements.each(function(index, element) { - var $element = $(element); - var $elementID = $element.wcfIdentify(); - - if (self._elements[$elementID] === undefined) { - self._elements[$elementID] = $element; - $element.find('li.jumpTo').data('elementID', $elementID).click($.proxy(self._click, self)); + require(['WoltLab/WCF/Ui/Page/JumpTo'], function(UiPageJumpTo) { + var elements = elBySelAll(selector); + for (var i = 0, length = elements.length; i < length; i++) { + UiPageJumpTo.init(elements[i], callback); } - }).data('callback', callback); - }, - - /** - * Shows the 'jump to page' overlay. - * - * @param object event - */ - _click: function(event) { - this._elementID = $(event.currentTarget).data('elementID'); - - if (this._dialog === null) { - this._dialog = $('