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([
229229 return this ;
230230 } ,
231231
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+
232241 /**
233242 * Clears the array of not selected records.
234243 *
Original file line number Diff line number Diff line change @@ -175,11 +175,14 @@ define([
175175 * invoked if action is confirmed.
176176 */
177177 _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' : '' ) + ')' ;
179182
180183 confirm ( {
181184 title : confirmData . title ,
182- content : confirmData . message ,
185+ content : confirmMessage ,
183186 actions : {
184187 confirm : callback
185188 }
Original file line number Diff line number Diff line change 1111 data-bind ="
1212 checked: allSelected(),
1313 attr: {id: ++ko.uid},
14- event: { change: toggleSelectAll },
14+ event: { change: togglePage },
1515 css: { '_indeterminate': indetermine },
1616 enable: totalRecords ">
1717 < label attr ="for: ko.uid "/>
You can’t perform that action at this time.
0 commit comments