File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
djangocms_versioning/static/djangocms_versioning/js Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -7,19 +7,14 @@ function bindHandlers(submitButton){
77
88window . addEventListener ( 'load' , function ( ) {
99 document . querySelector ( 'select[name=action]' ) . addEventListener ( 'change' , function ( ) {
10- // Always set handlersBound to false when the select option changed
11- let handlersBound = false ;
1210 let selectVal = this . options [ this . selectedIndex ] . getAttribute ( "value" ) ;
1311 const actionsForm = document . getElementById ( 'changelist-form' )
1412 const submitButton = actionsForm . querySelector ( '[type="submit"]' )
1513
1614 if ( selectVal == "compare_versions" ) {
1715 // Setting the target to blank to ensure the compare view is opened in a new tab
1816 actionsForm . setAttribute ( 'target' , '_blank' ) ;
19- if ( handlersBound === false ) {
20- bindHandlers ( submitButton ) ;
21- handlersBound = true
22- }
17+ bindHandlers ( submitButton ) ;
2318 } else {
2419 // If the user deselect the compare version action, the "target=_blank" is removed
2520 actionsForm . removeAttribute ( 'target' ) ;
You can’t perform that action at this time.
0 commit comments