mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +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)
|
_setDarkMode: function(_state)
|
||||||
{
|
{
|
||||||
let state = _state == '0' ?'0':'1';
|
let state = !_state || _state == '0' ?'0':'1';
|
||||||
jQuery('html').attr('data-darkmode', state);
|
jQuery('html').attr('data-darkmode', state);
|
||||||
jQuery('iframe').each((i, frame) =>{
|
jQuery('iframe').each((i, frame) =>{
|
||||||
try {
|
try {
|
||||||
if (frame && frame.contentWindow && frame.contentWindow.jQuery)
|
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)
|
}catch(e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user