From d3cbe17e57fb2111af02ca7e11d9c60dce3c6de7 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 29 May 2016 19:48:49 +0200 Subject: [PATCH] Some cleanup --- wcfsetup/install/files/js/WCF.Message.js | 476 +----------------- .../js/WoltLab/WCF/Ui/Message/InlineEditor.js | 33 +- 2 files changed, 5 insertions(+), 504 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 900fd94df7..aea6dce9f1 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -764,9 +764,7 @@ WCF.Message.InlineEditor = Class.extend({ */ init: function(containerID, supportExtendedForm, quoteManager) { require(['WoltLab/WCF/Ui/Message/InlineEditor'], (function(UiMessageInlineEditor) { - UiMessageInlineEditor.init({ - extendedForm: (supportExtendedForm === true), - + new UiMessageInlineEditor({ className: this._getClassName(), containerId: containerID, editorPrefix: this._messageEditorIDPrefix, @@ -2516,477 +2514,11 @@ WCF.Message.Share.Page = Class.extend({ }); /** - * Handles user mention suggestions in Redactor instances. - * - * Important: Objects of this class have to be created before Redactor - * is initialized! + * @deprecated 2.2 */ WCF.Message.UserMention = Class.extend({ - /** - * current caret position - * @var DOMRange - */ - _caretPosition: null, - - /** - * name of the class used to get the user suggestions - * @var string - */ - _className: 'wcf\\data\\user\\UserAction', - - /** - * dropdown object - * @var jQuery - */ - _dropdown: null, - - /** - * dropdown menu object - * @var jQuery - */ - _dropdownMenu: null, - - /** - * suggestion item index, -1 if none is selected - * @var integer - */ - _itemIndex: -1, - - /** - * line height - * @var integer - */ - _lineHeight: null, - - /** - * current beginning of the mentioning - * @var string - */ - _mentionStart: '', - - /** - * redactor instance object - * @var $.Redactor - */ - _redactor: null, - - /** - * delay timer to only send requests after user paused typing - * @var WCF.PeriodicalExecuter - */ - _timer: null, - - /** - * Initalizes user suggestions for Redactor with the given textarea id. - * - * @param string wysiwygSelector - */ - init: function(wysiwygSelector) { - if ($.browser.mobile && $.browser.mozilla) { - // the desktop Firefox work-arounds do not work on Firefox for Android, in fact they crash it - return; - } - - this._textarea = $('#' + wysiwygSelector); - this._redactor = this._textarea.redactor('core.getObject'); - - this._dropdown = this._textarea.redactor('core.getEditor'); - this._dropdownMenu = $('