From ad822e46b1049a7375f544da1f8d45e2d9b44052 Mon Sep 17 00:00:00 2001 From: Mykhailo Miroshnikov Date: Mon, 23 Feb 2015 11:40:41 +0200 Subject: [PATCH 01/16] MAGETWO-34074: Bundle scripts to eliminate (2 scripts) - Eliminate 2 inline scripts in Bundle frontend area --- .../catalog/product/view/summary.phtml | 31 +++++++++---------- .../product/view/type/bundle/options.phtml | 22 ++++++------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml index e1d0399f1c6ae..9bbecc36155b5 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml @@ -52,21 +52,20 @@ - diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml index bf0993ce8ca8a..1bdafb3149343 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml @@ -15,19 +15,15 @@ $helper = $this->helper('Magento\Catalog\Helper\Output'); decorateArray($block->getOptions()); ?> isSaleable()):?> -
From 4e40a08ff752d2eebe78d4810f6015d4b994f169 Mon Sep 17 00:00:00 2001 From: Mykhailo Miroshnikov Date: Mon, 23 Feb 2015 12:07:54 +0200 Subject: [PATCH 02/16] MAGETWO-34079: Multishipping scripts to eliminate (2 scripts) - Eliminate inline script from app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml --- .../templates/checkout/address/select.phtml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml index c2a224258c246..8d711654da66d 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml @@ -39,13 +39,13 @@ - From 25f9a93dc6984155a7b20ead994761a5042edc5b Mon Sep 17 00:00:00 2001 From: Mykhailo Miroshnikov Date: Mon, 23 Feb 2015 12:16:41 +0200 Subject: [PATCH 03/16] MAGETWO-34082: Wishlist scripts to eliminate (1 script) - Eliminate inline scripts from Wishlist module --- .../templates/item/configure/addto.phtml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml index de9be58af1bcc..556f8b8fd4de3 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml @@ -22,15 +22,10 @@ - + \ No newline at end of file From 41db4e7e16b5fddd73838a2fffe49a4b8e30cfdc Mon Sep 17 00:00:00 2001 From: Mykhailo Miroshnikov Date: Mon, 23 Feb 2015 14:28:33 +0200 Subject: [PATCH 04/16] MAGETWO-34344: Fix Underscore templates - Make underscore interpolation escape it's value --- .../adminhtml/templates/media/uploader.phtml | 4 +- .../system/config/form/field/array.phtml | 6 +- .../adminhtml/templates/system/search.phtml | 8 +-- .../Product/Edit/Tab/Bundle/Option.php | 12 ++-- .../Edit/Tab/Bundle/Option/Selection.php | 12 ++-- .../product/edit/bundle/option.phtml | 52 ++++++++-------- .../edit/bundle/option/selection.phtml | 56 ++++++++--------- .../Bundle/view/base/web/js/price-bundle.js | 4 +- .../catalog/product/view/summary.phtml | 4 +- .../Product/Edit/Tab/Options/Option.php | 8 +-- .../Edit/Tab/Options/Type/AbstractType.php | 4 +- .../Product/Edit/Tab/Options/Type/Select.php | 8 +-- .../Product/Helper/Form/BaseImage.php | 6 +- .../catalog/product/attribute/options.phtml | 10 +-- .../catalog/product/edit/attribute_set.phtml | 2 +- .../catalog/product/edit/options/option.phtml | 42 ++++++------- .../product/edit/options/type/date.phtml | 16 ++--- .../product/edit/options/type/file.phtml | 20 +++--- .../product/edit/options/type/select.phtml | 30 ++++----- .../product/edit/options/type/text.phtml | 18 +++--- .../catalog/product/edit/price/group.phtml | 10 +-- .../catalog/product/edit/price/tier.phtml | 12 ++-- .../catalog/product/helper/gallery.phtml | 22 +++---- .../product/edit/attribute/search.phtml | 4 +- .../templates/product/view/base-image.phtml | 18 +++--- .../view/frontend/web/js/region-updater.js | 4 +- .../templates/browser/content/uploader.phtml | 4 +- .../Block/Product/View/Type/Configurable.php | 2 +- .../edit/super/attribute-js-template.phtml | 62 +++++++++---------- .../catalog/product/edit/super/matrix.phtml | 2 +- .../view/frontend/web/js/configurable.js | 4 +- .../adminhtml/templates/tab/addresses.phtml | 40 ++++++------ .../templates/editor/tools/code/js.phtml | 8 +-- .../editor/tools/files/content/uploader.phtml | 8 +-- .../view/adminhtml/web/js/dialog.js | 2 +- .../frontend/templates/translate_inline.phtml | 14 ++--- .../templates/product/edit/downloadable.phtml | 12 ++-- .../product/edit/downloadable/links.phtml | 62 +++++++++---------- .../product/edit/downloadable/samples.phtml | 28 ++++----- .../Block/Adminhtml/Types/Edit/Attributes.php | 8 +-- .../templates/types/edit/attributes.phtml | 4 +- .../templates/product/grouped/list.phtml | 18 +++--- .../Search/view/frontend/web/form-mini.js | 6 +- .../view/frontend/templates/send.phtml | 14 ++--- .../adminhtml/templates/order/tracking.phtml | 6 +- .../templates/browser/content/uploader.phtml | 4 +- .../templates/tabs/fieldset/js.phtml | 16 ++--- .../templates/translate_inline.phtml | 24 +++---- .../frontend/templates/translate_inline.phtml | 24 +++---- .../adminhtml/templates/renderer/tax.phtml | 18 +++--- .../Widget/Instance/Edit/Tab/Main/Layout.php | 10 +-- .../Widget/Instance/Edit/Tab/Settings.php | 2 +- .../templates/instance/edit/layout.phtml | 58 ++++++++--------- .../view/frontend/templates/view.phtml | 8 +-- lib/web/mage/adminhtml/grid.js | 2 +- lib/web/mage/backend/notification.js | 2 +- lib/web/mage/backend/suggest.js | 12 ++-- lib/web/mage/backend/tree-suggest.js | 12 ++-- lib/web/mage/dataPost.js | 4 +- lib/web/mage/loader.js | 4 +- lib/web/mage/loader_old.js | 4 +- 61 files changed, 450 insertions(+), 450 deletions(-) diff --git a/app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml b/app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml index 877bdba399883..501591a40b015 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml @@ -15,8 +15,8 @@
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml index 507376e16a355..0a08780d497be 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml @@ -33,30 +33,30 @@ diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php index d1fdd2f29628e..876c2a945a89c 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php @@ -209,11 +209,11 @@ public function getTypeSelectHtml() 'Magento\Framework\View\Element\Html\Select' )->setData( [ - 'id' => $this->getFieldId() . '_<%= data.id %>_type', + 'id' => $this->getFieldId() . '_<%- data.id %>_type', 'class' => 'select select-product-option-type required-option-select', ] )->setName( - $this->getFieldName() . '[<%= data.id %>][type]' + $this->getFieldName() . '[<%- data.id %>][type]' )->setOptions( $this->_optionType->toOptionArray() ); @@ -229,9 +229,9 @@ public function getRequireSelectHtml() $select = $this->getLayout()->createBlock( 'Magento\Framework\View\Element\Html\Select' )->setData( - ['id' => $this->getFieldId() . '_<%= data.id %>_is_require', 'class' => 'select'] + ['id' => $this->getFieldId() . '_<%- data.id %>_is_require', 'class' => 'select'] )->setName( - $this->getFieldName() . '[<%= data.id %>][is_require]' + $this->getFieldName() . '[<%- data.id %>][is_require]' )->setOptions( $this->_configYesNo->toOptionArray() ); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php index 95a350a34581c..b4c8d96bbdc11 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php @@ -50,7 +50,7 @@ protected function _prepareLayout() $this->getNameInLayout() )->setData( [ - 'id' => 'product_option_<%= data.option_id %>_price_type', + 'id' => 'product_option_<%- data.option_id %>_price_type', 'class' => 'select product-option-price-type', ] ) @@ -59,7 +59,7 @@ protected function _prepareLayout() $this->getChildBlock( 'option_price_type' )->setName( - 'product[options][<%= data.option_id %>][price_type]' + 'product[options][<%- data.option_id %>][price_type]' )->setOptions( $this->_optionPrice->toOptionArray() ); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php index f8c00955c8537..c91c09dcb9f15 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php @@ -42,7 +42,7 @@ protected function _prepareLayout() [ 'label' => __('Add New Row'), 'class' => 'add add-select-row', - 'id' => 'product_option_<%= data.option_id %>_add_select_row' + 'id' => 'product_option_<%- data.option_id %>_add_select_row' ] ); @@ -52,7 +52,7 @@ protected function _prepareLayout() [ 'label' => __('Delete Row'), 'class' => 'delete delete-select-row icon-btn', - 'id' => 'product_option_<%= data.id %>_select_<%= data.select_id %>_delete' + 'id' => 'product_option_<%- data.id %>_select_<%- data.select_id %>_delete' ] ); @@ -87,9 +87,9 @@ public function getPriceTypeSelectHtml($extraParams = '') 'option_price_type' )->setData( 'id', - 'product_option_<%= data.id %>_select_<%= data.select_id %>_price_type' + 'product_option_<%- data.id %>_select_<%- data.select_id %>_price_type' )->setName( - 'product[options][<%= data.id %>][values][<%= data.select_id %>][price_type]' + 'product[options][<%- data.id %>][values][<%- data.select_id %>][price_type]' )->setExtraParams($extraParams); return parent::getPriceTypeSelectHtml(); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php index 2f29286f495b0..adb18e85a834a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php @@ -110,9 +110,9 @@ public function getElementHtml() <%= data.label %> + src="<%- data.url %>" + data-position="<%- data.position %>" + alt="<%- data.label %>" />