From 7df7566a8fe344cf45fca248fe81dc8d48dac259 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Fri, 12 Apr 2019 23:30:22 +0200 Subject: [PATCH] Remove files that have been accidentally added See 1a4fbd62d38de27e3f97b14f283e70adc274a1c5 --- tmp_WCF.InlineEditor.js | 342 ------------------ .../lib/system/dialog/TestDialog.class.php | 167 --------- 2 files changed, 509 deletions(-) delete mode 100644 tmp_WCF.InlineEditor.js delete mode 100644 wcfsetup/install/files/lib/system/dialog/TestDialog.class.php diff --git a/tmp_WCF.InlineEditor.js b/tmp_WCF.InlineEditor.js deleted file mode 100644 index 1bf0b8e6af..0000000000 --- a/tmp_WCF.InlineEditor.js +++ /dev/null @@ -1,342 +0,0 @@ -/** - * Default implementation for inline editors. - * - * @param string elementSelector - */ -WCF.InlineEditor = Class.extend({ - /** - * list of registered callbacks - * @var array - */ - _callbacks: [], - - /** - * list of dropdown selections - * @var object - */ - _dropdowns: {}, - - /** - * list of container elements - * @var object - */ - _elements: {}, - - /** - * notification object - * @var WCF.System.Notification - */ - _notification: null, - - /** - * list of known options - * @var array - */ - _options: [], - - /** - * action proxy - * @var WCF.Action.Proxy - */ - _proxy: null, - - /** - * list of trigger elements by element id - * @var object - */ - _triggerElements: {}, - - /** - * list of data to update upon success - * @var array - */ - _updateData: [], - - /** - * Initializes a new inline editor. - */ - init: function (elementSelector) { - var $elements = $(elementSelector); - if (!$elements.length) { - return; - } - - this._setOptions(); - var $quickOption = ''; - for (var $i = 0, $length = this._options.length; $i < $length; $i++) { - if (this._options[$i].isQuickOption) { - $quickOption = this._options[$i].optionName; - break; - } - } - - var self = this; - $elements.each(function (index, element) { - var $element = $(element); - var $elementID = $element.wcfIdentify(); - - // find trigger element - var $trigger = self._getTriggerElement($element); - if ($trigger === null || $trigger.length !== 1) { - return; - } - - $trigger.on(WCF_CLICK_EVENT, $.proxy(self._show, self)).data('elementID', $elementID); - if ($quickOption) { - // simulate click on target action - $trigger.disableSelection().data('optionName', $quickOption).dblclick($.proxy(self._click, self)); - } - - // store reference - self._elements[$elementID] = $element; - }); - - this._proxy = new WCF.Action.Proxy({ - success: $.proxy(this._success, this) - }); - - WCF.CloseOverlayHandler.addCallback('WCF.InlineEditor', $.proxy(this._closeAll, this)); - - this._notification = new WCF.System.Notification(WCF.Language.get('wcf.global.success'), 'success'); - }, - - /** - * Closes all inline editors. - */ - _closeAll: function () { - for (var $elementID in this._elements) { - this._hide($elementID); - } - }, - - /** - * Sets options for this inline editor. - */ - _setOptions: function () { - this._options = []; - }, - - /** - * Register an option callback for validation and execution. - * - * @param object callback - */ - registerCallback: function (callback) { - if ($.isFunction(callback)) { - this._callbacks.push(callback); - } - }, - - /** - * Returns the triggering element. - * - * @param jQuery element - * @return jQuery - */ - _getTriggerElement: function (element) { - return null; - }, - - /** - * Shows a dropdown menu if options are available. - * - * @param object event - */ - _show: function (event) { - event.preventDefault(); - var $elementID = $(event.currentTarget).data('elementID'); - - // build dropdown - var $trigger = null; - if (!this._dropdowns[$elementID]) { - this._triggerElements[$elementID] = $trigger = this._getTriggerElement(this._elements[$elementID]).addClass('dropdownToggle'); - var parent = $trigger[0].parentNode; - if (parent && parent.nodeName === 'LI' && parent.childElementCount === 1) { - // do not add a wrapper element if the trigger is the only child - parent.classList.add('dropdown'); - } - else { - $trigger.wrap(''); - } - - this._dropdowns[$elementID] = $('