@@ -15,24 +15,23 @@ define('UpdatePatronAccessBatchAction', [ 'jquery', 'AbstractBatchAction'], func
15
15
UpdatePatronAccessBatchAction . prototype . execute = function ( ) {
16
16
let targets = this . getTargets ( ) ;
17
17
18
- let perms_editor_data = perms_editor . $children [ 0 ] . $children [ 0 ] . $data ;
19
- perms_editor_data . permissionType = 'Patron' ;
20
- perms_editor_data . alertHandler = this . context . view . $alertHandler ;
21
- perms_editor_data . actionHandler = this . context . actionHandler ;
18
+ perms_editor_store . commit ( 'setPermissionType' , 'Patron' ) ;
19
+ perms_editor_store . commit ( 'setAlertHandler' , this . context . view . $alertHandler ) ;
20
+ perms_editor_store . commit ( 'setActionHandler' , this . context . actionHandler ) ;
22
21
if ( targets . length == 1 ) {
23
- perms_editor_data . resultObject = targets [ 0 ] ;
24
- perms_editor_data . resultObjects = null ;
25
- perms_editor_data . metadata = targets [ 0 ] . metadata ;
22
+ perms_editor_store . commit ( 'setResultObject' , targets [ 0 ] ) ;
23
+ perms_editor_store . commit ( 'setResultObjects' , null ) ;
24
+ perms_editor_store . commit ( 'setMetadata' , targets [ 0 ] . metadata ) ;
26
25
} else {
27
- perms_editor_data . resultObject = null ;
28
- perms_editor_data . resultObjects = targets ;
29
- perms_editor_data . metadata = {
26
+ perms_editor_store . commit ( 'setResultObject' , null ) ;
27
+ perms_editor_store . commit ( 'setResultObjects' , targets ) ;
28
+ perms_editor_store . commit ( 'setMetadata' , {
30
29
title : targets . length + " objects" ,
31
30
id : null ,
32
31
type : null
33
- } ;
32
+ } ) ;
34
33
}
35
- perms_editor_data . showModal = true ;
34
+ perms_editor_store . commit ( 'setShowModal' , true ) ;
36
35
37
36
AbstractBatchAction . prototype . execute . call ( this ) ;
38
37
}
0 commit comments