From 0939f6280d143f4e10701c9b4f4a46a48d330f3e Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Fri, 5 Sep 2014 13:08:29 -0500 Subject: [PATCH] oops: Enable drag+drop and copy+paste in Redactor --- js/redactor-osticket.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js index 6dcf19a38..0cf266156 100644 --- a/js/redactor-osticket.js +++ b/js/redactor-osticket.js @@ -95,20 +95,10 @@ RedactorPlugins.draft = { $('input[name=draft_id]', this.$box.closest('form')) .val(data.draft_id); this.draft_id = data.draft_id; - - var self = this; - getConfig().then(function(c) { - if (c.allow_attachments) { - self.opts.clipboardUploadUrl = - self.opts.imageUpload = - 'ajax.php/draft/'+data.draft_id+'/attach'; - self.opts.imageUploadErrorCallback = self.displayError; - // XXX: This happens in ::buildBindKeyboard() from - // ::buildAfter(). However, the imageUpload option is not - // known when the Redactor is init()'d - self.$editor.on('drop.redactor', $.proxy(self.buildEventDrop, self)); - } - }); + this.opts.clipboardUploadUrl = + this.opts.imageUpload = + 'ajax.php/draft/'+data.draft_id+'/attach'; + this.opts.imageUploadErrorCallback = this.displayError; this.opts.original_autosave = this.opts.autosave; this.opts.autosave = 'ajax.php/draft/'+data.draft_id; }, -- GitLab