mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
Fix darkmode get switched on in session when there's no preferences yet
This commit is contained in:
parent
1a1e3818c2
commit
98813ef055
@ -1331,13 +1331,13 @@ var fw_base = (function(){ "use strict"; return Class.extend(
|
||||
*/
|
||||
_setDarkMode: function(_state)
|
||||
{
|
||||
let state = _state == '0' ?'0':'1';
|
||||
let state = !_state || _state == '0' ?'0':'1';
|
||||
jQuery('html').attr('data-darkmode', state);
|
||||
jQuery('iframe').each((i, frame) =>{
|
||||
try {
|
||||
if (frame && frame.contentWindow && frame.contentWindow.jQuery)
|
||||
{
|
||||
frame.contentWindow.jQuery('html').attr('data-darkmode', _state == 0?'':'1');
|
||||
frame.contentWindow.jQuery('html').attr('data-darkmode', state == 0?'':'1');
|
||||
}
|
||||
}catch(e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user