From: Alexander Ebert Date: Tue, 17 Mar 2015 15:07:12 +0000 (+0100) Subject: Upgraded to Redactor 10.0.9 X-Git-Tag: 2.1.2~36 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c932738ce3a3830da03426173cd006c6c1f3992b;p=GitHub%2FWoltLab%2FWCF.git Upgraded to Redactor 10.0.9 --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/redactor.js b/wcfsetup/install/files/js/3rdParty/redactor/redactor.js index ff7dd5e9a4..99e89a5b98 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/redactor.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/redactor.js @@ -1,6 +1,6 @@ /* - Redactor v10.0.8 - Updated: March 10, 2015 + Redactor v10.0.9 + Updated: March 16, 2015 http://imperavi.com/redactor/ @@ -94,7 +94,7 @@ // Functionality $.Redactor = Redactor; - $.Redactor.VERSION = '10.0.8'; + $.Redactor.VERSION = '10.0.9'; $.Redactor.modules = ['alignment', 'autosave', 'block', 'buffer', 'build', 'button', 'caret', 'clean', 'code', 'core', 'dropdown', 'file', 'focus', 'image', 'indent', 'inline', 'insert', 'keydown', 'keyup', @@ -135,6 +135,7 @@ autosaveName: false, autosaveInterval: 60, // seconds autosaveOnChange: false, + autosaveFields: false, linkTooltip: true, linkProtocol: 'http', @@ -323,7 +324,9 @@ underline: 'Underline', alignment: 'Alignment', filename: 'Name (optional)', - edit: 'Edit' + edit: 'Edit', + upload_label: 'Drop file here or ' + } } }; @@ -552,6 +555,7 @@ var data = {}; data['name'] = this.autosave.name; data[this.autosave.name] = this.autosave.source; + data = this.autosave.getHiddenFields(data); // ajax var jsxhr = $.ajax({ @@ -562,6 +566,23 @@ jsxhr.done(this.autosave.success); }, + getHiddenFields: function(data) + { + if (this.opts.autosaveFields === false || typeof this.opts.autosaveFields !== 'object') + { + return data; + } + + $.each(this.opts.autosaveFields, $.proxy(function(k, v) + { + if (v !== null && v.toString().indexOf('#') === 0) v = $(v).val(); + data[k] = v; + + }, this)); + + return data; + + }, success: function(data) { var json; @@ -596,7 +617,7 @@ if (typeof this.formatting[name].data != 'undefined') type = 'data'; else if (typeof this.formatting[name].attr != 'undefined') type = 'attr'; - else if (typeof this.formatting[name].class != 'undefined') type = 'class'; + else if (typeof this.formatting[name]['class'] != 'undefined') type = 'class'; if (typeof this.formatting[name].clear != 'undefined') { @@ -1448,7 +1469,7 @@ // dropdown if (btnObject.dropdown) { - var $dropdown = $('