Skip to content

Commit f4aec5f

Browse files
🔃 [EngCom] Public Pull Requests - 2.1-develop
Accepted Public Pull Requests: - #15104: [Backport] Change 'Update'-button visibility on change qty event (by @sergiy-v) - #15101: [Backport] FIX for issue#14855 - Adding an * to do a customer search (by @sergiy-v) - #15091: [Backport] Fix infinite checkout loader on a script error (by @rogyar)
2 parents 50f62cb + 0be4d95 commit f4aec5f

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

app/code/Magento/Checkout/view/frontend/web/js/sidebar.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ define([
8686
events['keyup ' + this.options.item.qty] = function (event) {
8787
self._showItemButton($(event.target));
8888
};
89+
90+
/**
91+
* @param {jQuery.Event} event
92+
*/
93+
events['change ' + this.options.item.qty] = function (event) {
94+
self._showItemButton($(event.target));
95+
};
96+
8997
events['click ' + this.options.item.button] = function (event) {
9098
event.stopPropagation();
9199
self._updateItemQty($(event.currentTarget));

lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/FulltextFilter.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ function ($column) use ($alias) {
6262
return $columns;
6363
}
6464

65+
/**
66+
* Escape against value
67+
* @param string $value
68+
* @return string
69+
*/
70+
private function escapeAgainstValue($value)
71+
{
72+
return preg_replace('/([+\-><\(\)~*\"@]+)/', ' ', $value);
73+
}
74+
6575
/**
6676
* Apply fulltext filters
6777
*
@@ -86,7 +96,7 @@ public function apply(Collection $collection, Filter $filter)
8696
$collection->getSelect()
8797
->where(
8898
'MATCH(' . implode(',', $columns) . ') AGAINST(?)',
89-
$filter->getValue()
99+
$this->escapeAgainstValue($filter->getValue())
90100
);
91101
}
92102
}

lib/web/mage/requirejs/resolver.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,28 @@ define([
2727
return !!_.findWhere(callbacks, callback);
2828
}
2929

30+
/**
31+
* Checks if provided module is rejected during load.
32+
*
33+
* @param {Object} module - Module to be checked.
34+
* @return {Boolean}
35+
*/
36+
function isRejected(module) {
37+
return registry[module.id] && registry[module.id].error;
38+
}
39+
3040
/**
3141
* Checks if provided module has unresolved dependencies.
3242
*
3343
* @param {Object} module - Module to be checked.
3444
* @returns {Boolean}
3545
*/
3646
function isPending(module) {
37-
return !!module.depCount;
47+
if (!module.depCount) {
48+
return false;
49+
}
50+
51+
return module.depCount > _.filter(module.depMaps, isRejected).length;
3852
}
3953

4054
/**

0 commit comments

Comments
 (0)