File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed
app/code/Magento/Checkout/view/frontend/web/js
internal/Magento/Framework/View/Element/UiComponent/DataProvider Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff 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 ) ) ;
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 /**
You can’t perform that action at this time.
0 commit comments