File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -2106,13 +2106,27 @@ $(document).ready(function () {
2106
2106
} ) ;
2107
2107
2108
2108
$ ( '.issue-action' ) . click ( function ( ) {
2109
- var action = this . dataset . action
2110
- var elementId = this . dataset . elementId
2111
- var issueIDs = $ ( '.issue-checkbox' ) . children ( 'input:checked' ) . map ( function ( ) {
2109
+ let action = this . dataset . action ;
2110
+ let elementId = this . dataset . elementId ;
2111
+ let issueIDs = $ ( '.issue-checkbox' ) . children ( 'input:checked' ) . map ( function ( ) {
2112
2112
return this . dataset . issueId ;
2113
2113
} ) . get ( ) . join ( ) ;
2114
- var url = this . dataset . url
2115
- updateIssuesMeta ( url , action , issueIDs , elementId ) . then ( reload ) ;
2114
+ let url = this . dataset . url ;
2115
+ updateIssuesMeta ( url , action , issueIDs , elementId ) . then ( function ( ) {
2116
+ if ( action === "close" || action === "open" ) {
2117
+ //uncheck all checkboxes
2118
+ $ ( '.issue-checkbox input[type="checkbox"]' ) . each ( function ( _ , e ) { e . checked = false ; } ) ;
2119
+ }
2120
+ setTimeout ( reload , 5 ) ;
2121
+ } ) ;
2122
+ } ) ;
2123
+
2124
+ // trigger ckecked event, if checkboxes are checked on load
2125
+ $ ( '.issue-checkbox input[type="checkbox"]:checked' ) . first ( ) . each ( function ( _ , e ) {
2126
+ e . checked = false ;
2127
+ setTimeout ( function ( ) {
2128
+ $ ( e ) . click ( ) ;
2129
+ } , 5 ) ;
2116
2130
} ) ;
2117
2131
2118
2132
buttonsClickOnEnter ( ) ;
You can’t perform that action at this time.
0 commit comments