From: Fabii547 Date: Thu, 23 Jun 2016 16:03:45 +0000 (+0200) Subject: Fix marking styles as tainted (#2049) X-Git-Tag: 3.0.0_Beta_1~1369 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13744d6e85c589fc142a364155178af2b3d960c7;p=GitHub%2FWoltLab%2FWCF.git Fix marking styles as tainted (#2049) --- diff --git a/wcfsetup/install/files/acp/templates/styleAdd.tpl b/wcfsetup/install/files/acp/templates/styleAdd.tpl index 7511c0b1c6..2525bf96a9 100644 --- a/wcfsetup/install/files/acp/templates/styleAdd.tpl +++ b/wcfsetup/install/files/acp/templates/styleAdd.tpl @@ -62,7 +62,9 @@ -

{lang}wcf.acp.style.protected{/lang}

+{if !$isTainted} +

{lang}wcf.acp.style.protected{/lang}

+{/if} {include file='formError'} @@ -934,7 +936,7 @@
- +
diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Style/Editor.js b/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Style/Editor.js index 7ae4924192..a78f4a2f10 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Style/Editor.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Style/Editor.js @@ -1,10 +1,10 @@ /** - * Provides the basic core functionality. + * Provides the style editor. * * @author Alexander Ebert - * @copyright 2001-2015 WoltLab GmbH + * @copyright 2001-2016 WoltLab GmbH * @license GNU Lesser General Public License - * @module WoltLab/WCF/Core + * @module WoltLab/WCF/Acp/Ui/Style/Editor */ define(['Ajax', 'Dictionary', 'Dom/Util', 'EventHandler'], function(Ajax, Dictionary, DomUtil, EventHandler) { "use strict"; @@ -21,7 +21,7 @@ define(['Ajax', 'Dictionary', 'Dom/Util', 'EventHandler'], function(Ajax, Dictio */ setup: function(options) { this._handleLayoutWidth(); - this._handleLess(options.isTainted); + this._handleScss(options.isTainted); if (!options.isTainted) { this._handleProtection(options.styleId); @@ -53,11 +53,11 @@ define(['Ajax', 'Dictionary', 'Dom/Util', 'EventHandler'], function(Ajax, Dictio }, /** - * Handles LESS input fields. + * Handles SCSS input fields. * * @param {boolean} isTainted false if style is in protected mode */ - _handleLess: function(isTainted) { + _handleScss: function(isTainted) { var individualScss = elById('individualScss'); var overrideScss = elById('overrideScss'); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ajax.js b/wcfsetup/install/files/js/WoltLab/WCF/Ajax.js index 1d32756690..3703f45e3e 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ajax.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ajax.js @@ -77,6 +77,9 @@ define(['AjaxRequest', 'Core', 'ObjectMap'], function(AjaxRequest, Core, ObjectM * @param {object} options request options */ apiOnce: function(options) { + // Fetch AjaxRequest, as it cannot be provided because of a circular dependency + if (AjaxRequest === undefined) AjaxRequest = require('AjaxRequest'); + options.pinData = false; options.callbackObject = null; if (!options.url) options.url = 'index.php/AJAXProxy/?t=' + SECURITY_TOKEN;