Be explicit about backgroundImage existance

This commit is contained in:
Johannes Zellner
2022-05-17 15:25:19 +02:00
parent 3922448a77
commit 319db4a9b1
4 changed files with 22 additions and 7 deletions

View File

@@ -247,6 +247,7 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
if (error) return console.error('Unable to change backgroundImage.', error);
document.getElementById('mainContentContainer').style.backgroundImage = 'url("' + Client.getBackgroundImageUrl() + '")';
document.getElementById('mainContentContainer').classList.add('has-background');
$('#backgroundImageChangeModal').modal('hide');
$scope.backgroundImageChange.reset();
@@ -258,6 +259,7 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
if (error) return console.error('Unable to change backgroundImage.', error);
document.getElementById('mainContentContainer').style.backgroundImage = '';
document.getElementById('mainContentContainer').classList.remove('has-background');
$('#backgroundImageChangeModal').modal('hide');
$scope.backgroundImageChange.reset();