@@ -28,36 +28,13 @@ define([
28
28
} ,
29
29
30
30
/**
31
- * @param {Integer } id
31
+ * @param {Number } id
32
32
* @returns {* }
33
33
*/
34
34
getLabel : function ( id ) {
35
35
return this . selected . indexOf ( id ) !== - 1 ? $t ( 'On' ) : $t ( 'Off' ) ;
36
36
} ,
37
37
38
- /**
39
- * Initializes components' static properties.
40
- *
41
- * @returns {Column } Chainable.
42
- */
43
- initProperties : function ( ) {
44
- this . actions = [ {
45
- value : 'selectAll' ,
46
- label : $t ( 'Select All' )
47
- } , {
48
- value : 'deselectAll' ,
49
- label : $t ( 'Deselect All' )
50
- } , {
51
- value : 'selectPage' ,
52
- label : $t ( 'Select All on This Page' )
53
- } , {
54
- value : 'deselectPage' ,
55
- label : $t ( 'Deselect All on This Page' )
56
- } ] ;
57
-
58
- return this . _super ( ) ;
59
- } ,
60
-
61
38
/**
62
39
* Sets the ids for preselected elements
63
40
* @returns void
@@ -67,11 +44,10 @@ define([
67
44
key ,
68
45
i ;
69
46
70
- registry . set ( 'position_cache_valid' , true ) ;
71
-
72
- if ( this . selected ( ) . length === this . selectedData . length && positionCacheValid ) {
47
+ if ( this . selectedData . length === 0 || positionCacheValid ) {
73
48
return ;
74
49
}
50
+ registry . set ( 'position_cache_valid' , true ) ;
75
51
// Check selected data
76
52
for ( key in this . selectedData ) {
77
53
if ( this . selectedData . hasOwnProperty ( key ) && this . selected ( ) . indexOf ( key ) === - 1 ) {
@@ -87,7 +63,7 @@ define([
87
63
88
64
/**
89
65
* Show/hide action in the massaction menu
90
- * @param {Integer } actionId
66
+ * @param {Number } actionId
91
67
* @returns {Boolean }
92
68
*/
93
69
isActionRelevant : function ( actionId ) {
@@ -110,7 +86,7 @@ define([
110
86
* Updates values of the 'allSelected'
111
87
* and 'indetermine' properties.
112
88
*
113
- * @returns {Multiselect } Chainable.
89
+ * @returns {Object } Chainable.
114
90
*/
115
91
updateState : function ( ) {
116
92
var totalRecords = this . totalRecords ( ) ,
0 commit comments