File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
app/code/Magento/Ui/view/base/web Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,15 @@ define([
229
229
return this ;
230
230
} ,
231
231
232
+ /**
233
+ * Selects or deselects all records on the current page.
234
+ *
235
+ * @returns {Multiselect } Chainable.
236
+ */
237
+ togglePage : function ( ) {
238
+ return this . isPageSelected ( ) ? this . deselectPage ( ) : this . selectPage ( ) ;
239
+ } ,
240
+
232
241
/**
233
242
* Clears the array of not selected records.
234
243
*
Original file line number Diff line number Diff line change @@ -175,11 +175,14 @@ define([
175
175
* invoked if action is confirmed.
176
176
*/
177
177
_confirm : function ( action , callback ) {
178
- var confirmData = action . confirm ;
178
+ var confirmData = action . confirm ,
179
+ data = this . getSelections ( ) ,
180
+ total = data . total ? data . total : 0 ,
181
+ confirmMessage = confirmData . message + ' (' + total + ' record' + ( total > 1 ? 's' : '' ) + ')' ;
179
182
180
183
confirm ( {
181
184
title : confirmData . title ,
182
- content : confirmData . message ,
185
+ content : confirmMessage ,
183
186
actions : {
184
187
confirm : callback
185
188
}
Original file line number Diff line number Diff line change 11
11
data-bind ="
12
12
checked: allSelected(),
13
13
attr: {id: ++ko.uid},
14
- event: { change: toggleSelectAll },
14
+ event: { change: togglePage },
15
15
css: { '_indeterminate': indetermine },
16
16
enable: totalRecords ">
17
17
< label attr ="for: ko.uid "/>
You can’t perform that action at this time.
0 commit comments