Skip to content

Commit df1a248

Browse files
committed
Merge remote-tracking branch 'troll/MAGETWO-35357' into MAGETWO-35175
2 parents 61c0eca + 2ec7e7d commit df1a248

File tree

9 files changed

+33
-17
lines changed

9 files changed

+33
-17
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@
1111
class Upload extends \Magento\Backend\App\Action
1212
{
1313
/**
14-
* @var \Magento\Framework\Controller\Result\JsonFactory
14+
* @var \Magento\Framework\Controller\Result\RawFactory
1515
*/
16-
protected $resultJsonFactory;
16+
protected $resultRawFactory;
1717

1818
/**
1919
* @param \Magento\Backend\App\Action\Context $context
20-
* @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
20+
* @param \Magento\Framework\Controller\Result\RawFactory $resultRawFactory
2121
*/
2222
public function __construct(
2323
\Magento\Backend\App\Action\Context $context,
24-
\Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
24+
\Magento\Framework\Controller\Result\RawFactory $resultRawFactory
2525
) {
2626
parent::__construct($context);
27-
$this->resultJsonFactory = $resultJsonFactory;
27+
$this->resultRawFactory = $resultRawFactory;
2828
}
2929

3030
/**
@@ -36,7 +36,7 @@ protected function _isAllowed()
3636
}
3737

3838
/**
39-
* @return \Magento\Framework\Controller\Result\Json
39+
* @return \Magento\Framework\Controller\Result\Raw
4040
*/
4141
public function execute()
4242
{
@@ -72,6 +72,10 @@ public function execute()
7272
$result = ['error' => $e->getMessage(), 'errorcode' => $e->getCode()];
7373
}
7474

75-
return $this->resultJsonFactory->create()->setData($result);
75+
/** @var \Magento\Framework\Controller\Result\Raw $response */
76+
$response = $this->resultRawFactory->create();
77+
$response->setHeader('Content-type', 'text/plain');
78+
$response->setContents(json_encode($result));
79+
return $response;
7680
}
7781
}

app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/checkboxes/tree.phtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
<?php $_divId = 'tree-div_' . time() ?>
1212
<div id="<?php echo $_divId ?>" class="tree"></div>
13-
13+
<!--[if IE]>
14+
<script id="ie-deferred-loader" defer="defer" src=""></script>
15+
<![endif]-->
1416
<script>
1517
require([
1618
'jquery',

app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
<div><?php echo __('This operation can take much time'); ?></div>
3636
</div>
3737
</div>
38-
38+
<!--[if IE]>
39+
<script id="ie-deferred-loader" defer="defer" src=""></script>
40+
<![endif]-->
3941
<script>
4042
var tree;
4143
require([

app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
<?php $_divId = 'tree' . $block->getId() ?>
1212
<div id="<?php echo $_divId ?>" class="tree"></div>
13-
13+
<!--[if IE]>
14+
<script id="ie-deferred-loader" defer="defer" src=""></script>
15+
<![endif]-->
1416
<script>
1517
require(['jquery', "prototype", "extjs/ext-tree-checkbox"], function(jQuery){
1618

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ require([
3838
<span class="title"><?php echo __('Unassigned Attributes') ?></span>
3939
</div>
4040
<div id="tree-div2" class="attribute-set-tree"></div>
41+
<!--[if IE]>
42+
<script id="ie-deferred-loader" defer="defer" src=""></script>
43+
<![endif]-->
4144
<script>
42-
require(["jquery", "extjs/ext-tree-checkbox", "prototype"], function(jQuery){
45+
define("tree-panel", ["jquery", "extjs/ext-tree-checkbox", "prototype"], function(jQuery){
4346

4447
//<![CDATA[
4548
var allowDragAndDrop = <?php echo($block->getIsReadOnly() ? 'false' : 'true'); ?>;
@@ -406,6 +409,7 @@ require(["jquery", "extjs/ext-tree-checkbox", "prototype"], function(jQuery){
406409
//]]>
407410

408411
});
412+
require(["tree-panel"]);
409413
</script>
410414
</div>
411415
</div>

app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
?>
1111
<script>
12-
require(['jquery'], function(){
12+
require(["tree-panel"], function(){
1313
ConfigurableNodeExists = function(currentNode) {
1414
for (var i in currentNode.childNodes ) {
1515
if (currentNode.childNodes[i].id) {

app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/tree.phtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
</div>
2929

3030
<div id="tree" style="width:100%; overflow:auto;"></div>
31-
31+
<!--[if IE]>
32+
<script id="ie-deferred-loader" defer="defer" src=""></script>
33+
<![endif]-->
3234
<script>
3335
require([
3436
'jquery',

app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
<div class="actions"><?php echo $block->getAddLayoutButtonHtml() ?></div>
1616
</div>
1717
</fieldset>
18+
<!--[if IE]>
19+
<script id="ie-deferred-loader" defer="defer" src=""></script>
20+
<![endif]-->
1821
<script>
1922
require([
2023
'jquery',

lib/internal/Magento/Framework/View/Layout/ScheduledStructure.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,7 @@ public function getListToMove()
9999
*/
100100
public function getListToRemove()
101101
{
102-
return array_keys(array_intersect_key(
103-
$this->_scheduledElements,
104-
array_merge($this->_scheduledRemoves, $this->_brokenParent)
105-
));
102+
return array_keys(array_intersect_key($this->_scheduledElements, $this->_scheduledRemoves));
106103
}
107104

108105
/**

0 commit comments

Comments
 (0)