File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
app/code/Magento/Ui/view/base/web/js/grid Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ define([
27
27
modules : {
28
28
selections : '${ $.selectProvider }'
29
29
} ,
30
- clickedOnce : false ,
30
+ actionClicked : false ,
31
31
} ,
32
32
33
33
/**
@@ -49,10 +49,6 @@ define([
49
49
* @returns {Massactions } Chainable.
50
50
*/
51
51
applyAction : function ( actionIndex ) {
52
- if ( this . clickedOnce ) {
53
- return this ;
54
- }
55
-
56
52
var data = this . getSelections ( ) ,
57
53
action ,
58
54
callback ;
@@ -66,13 +62,24 @@ define([
66
62
}
67
63
68
64
action = this . getAction ( actionIndex ) ;
65
+
66
+ if ( action . actionClicked && ! action . timeoutExpired ) {
67
+ return this ;
68
+ }
69
69
callback = this . _getCallback ( action , data ) ;
70
70
71
71
action . confirm ?
72
72
this . _confirm ( action , callback ) :
73
73
callback ( ) ;
74
-
75
- this . clickedOnce = true ;
74
+
75
+ this . actions ( ) . forEach ( function ( item ) {
76
+ item . actionClicked = ( item . type === actionIndex ) ;
77
+ } )
78
+
79
+ action . timeoutExpired = false ;
80
+ setTimeout ( function ( ) {
81
+ action . timeoutExpired = true ;
82
+ } , 3000 ) ;
76
83
77
84
return this ;
78
85
} ,
You can’t perform that action at this time.
0 commit comments