From fa7a7c2631714c10f2f989f093676a2157b6983e Mon Sep 17 00:00:00 2001 From: Denys Rul <drul@ebay.com> Date: Mon, 26 Jan 2015 12:52:09 +0200 Subject: [PATCH] MAGETWO-32484: Stabilization of changes and bug fixing - Remove inline js code injections --- .../view/adminhtml/templates/page/js/require_js.phtml | 9 ++------- .../Magento/Theme/view/frontend/layout/default.xml | 2 -- .../Theme/view/frontend/templates/js/require_js.phtml | 11 ----------- 3 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 app/code/Magento/Theme/view/frontend/templates/js/require_js.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml index a218b027ec4..2e694b772c3 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml @@ -5,11 +5,6 @@ */ ?> <script> - var BLANK_URL = '<?php echo $this->getViewFileUrl('blank.html') ?>'; - var BLANK_IMG = '<?php echo $this->getViewFileUrl('spacer.gif') ?>'; - var BASE_URL = '<?php echo $this->getUrl('*') ?>'; - var FORM_KEY = '<?php echo $this->getFormKey() ?>'; - var require = { - "baseUrl": "<?php echo $this->getViewFileUrl('/') ?>" - }; + var BASE_URL = '<?php echo $this->getUrl('*') ?>', + FORM_KEY = '<?php echo $this->getFormKey() ?>'; </script> diff --git a/app/code/Magento/Theme/view/frontend/layout/default.xml b/app/code/Magento/Theme/view/frontend/layout/default.xml index b0f2b06196e..c6769c7cfe7 100644 --- a/app/code/Magento/Theme/view/frontend/layout/default.xml +++ b/app/code/Magento/Theme/view/frontend/layout/default.xml @@ -8,8 +8,6 @@ <page layout="3columns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> <update handle="default_head_blocks"/> <body> - <!-- Temporary solution --> - <block name="require.js" class="Magento\Framework\View\Element\Template" template="Magento_Theme::js/require_js.phtml" /> <referenceContainer name="after.body.start"> <block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config"/> <block class="Magento\Translation\Block\Js" name="translate" template="Magento_Translation::translate.phtml"/> diff --git a/app/code/Magento/Theme/view/frontend/templates/js/require_js.phtml b/app/code/Magento/Theme/view/frontend/templates/js/require_js.phtml deleted file mode 100644 index 97d08881285..00000000000 --- a/app/code/Magento/Theme/view/frontend/templates/js/require_js.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -?> -<script> - var require = { - "baseUrl": "<?php echo $this->getViewFileUrl('/') ?>" - }; -</script> -- GitLab