From 0e29c13974fc4ffcbbb8c7d31c7f961d3f45b4ee Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 14 Sep 2014 19:49:01 +0200 Subject: [PATCH] Cleanup and a few fixes --- .../js/3rdParty/redactor/plugins/wbbcode.js | 21 +------------------ .../3rdParty/redactor/plugins/wmonkeypatch.js | 12 ++++++----- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 58c2de3163..42b006b2ae 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -1031,7 +1031,7 @@ RedactorPlugins.wbbcode = { $('#redactorQuoteAuthor').val(quote.data('author')); // do not use prop() here, an empty cite attribute would yield the page URL instead - $('#redactorQuoteLink').val(quote.attr('cite')); + $('#redactorQuoteLink').val(WCF.String.unescapeHTML(quote.attr('cite'))); } $('#redactorEditQuote').click($.proxy(function() { @@ -1084,25 +1084,6 @@ RedactorPlugins.wbbcode = { $bbcode += '[/quote]'; if (this.inWysiwygMode()) { - /*var $html = '
' - + '
' - + '
' - + '

' - + this._buildQuoteHeader(author, link) - + '

' - + '' - + '
' - + '
' - + '
'; - - this.insertHtml($html); - - var $quote = $('#redactorInsertedQuote'); - var $container = $('
' + (html ? html : this.opts.invisibleSpace) + '
').insertAfter($quote.find('> div > header')); - $quote.removeAttr('id'); - - this.selectionStart($container[0]);*/ - $bbcode = this.convertToHtml($bbcode); this.insertHtml($bbcode); diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js index f72b91d6df..5e09578834 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js @@ -382,11 +382,13 @@ RedactorPlugins.wmonkeypatch = { } // fix position - var $dimensions = this.$modal.getDimensions('outer'); - this.$modal.css({ - marginLeft: -1 * Math.round($dimensions.width / 2) + 'px', - marginTop: -1 * Math.round($dimensions.height / 2) + 'px' - }); + if (!this.isMobile()) { + var $dimensions = this.$modal.getDimensions('outer'); + this.$modal.css({ + marginLeft: -1 * Math.round($dimensions.width / 2) + 'px', + marginTop: -1 * Math.round($dimensions.height / 2) + 'px' + }); + } }, dropdownShowCallback: function(data) { -- 2.20.1