Browse Source

Background selector fixed

sisyphus
JezerM 4 years ago
parent
commit
8d2200df18
  1. 5
      themes/default/js/greeter.js

5
themes/default/js/greeter.js vendored

@ -305,8 +305,9 @@ class BackgroundManager {
} }
random_bg = Math.floor( Math.random() * _config.background_images.length ); random_bg = Math.floor( Math.random() * _config.background_images.length );
let image = _config.background_images[random_bg];
return _config.background_images[ random_bg ]; return image;
} }
@ -355,7 +356,7 @@ class BackgroundManager {
*/ */
background_selected_handler( event ) { background_selected_handler( event ) {
let $target = $( event.target ), let $target = $( event.target ),
image = $target.attr( 'data-img' ); image = event.target.parentElement.dataset.img
$( '.bg.active' ).removeClass( 'active' ); $( '.bg.active' ).removeClass( 'active' );
$target.addClass( 'active' ); $target.addClass( 'active' );

Loading…
Cancel
Save