From b38f98c027aef9973f1834fa9afea8b93f0d29b1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 26 Oct 2014 19:35:47 +0100 Subject: [PATCH] Fixed inserting attachments --- .../install/files/js/3rdParty/redactor/plugins/wbbcode.js | 6 +++--- wcfsetup/install/files/js/WCF.Attachment.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 8694994bd1..c52fbdcc37 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -912,19 +912,19 @@ RedactorPlugins.wbbcode = function() { */ insertAttachment: function(attachmentID) { attachmentID = parseInt(attachmentID); - var $attachmentUrl = this.getOption('woltlab.attachmentUrl'); + var $attachmentUrl = this.wutil.getOption('woltlab.attachmentUrl'); var $bbcode = '[attach=' + attachmentID + '][/attach]'; var $imageAttachmentIDs = this.wbbcode._getImageAttachmentIDs(); if ($attachmentUrl && WCF.inArray(attachmentID, $imageAttachmentIDs)) { - this.insertDynamic( + this.wutil.insertDynamic( '', $bbcode ); } else { - this.insertDynamic($bbcode); + this.wutil.insertDynamic($bbcode); } }, diff --git a/wcfsetup/install/files/js/WCF.Attachment.js b/wcfsetup/install/files/js/WCF.Attachment.js index 236c5b4617..13ac4a6048 100644 --- a/wcfsetup/install/files/js/WCF.Attachment.js +++ b/wcfsetup/install/files/js/WCF.Attachment.js @@ -358,7 +358,7 @@ WCF.Attachment.Upload = WCF.Upload.extend({ var $attachmentID = (event === null) ? attachmentID : $(event.currentTarget).data('objectID'); if ($.browser.redactor) { - $('#' + this._wysiwygContainerID).redactor('insertAttachment', $attachmentID); + $('#' + this._wysiwygContainerID).redactor('wbbcode.insertAttachment', $attachmentID); } }, -- 2.20.1