X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;h=a90358917503bb91ea515dffb3368aaf89988d55;hb=97b2a573af9ba79216121ff90eaade1421994460;hp=7262ef4884fd17f93da93045d25b9bb9e2fd40b5;hpb=f7068bc71e92a6290b6efcd8c10771aab8bc3449;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 7262ef4..a903589 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -1417,18 +1417,12 @@ class Brisk $ret = sprintf('gst.st = %d; ', $user_step); if ($user->is_auth()) { - $ret .= sprintf('g_prefsn.load(\'%s\');', json_encode($user->prefsn_get())); - } - if(false) { - if ($user->flags & USER_FLAG_ISOLAUTH) { - $ret .= 'list_set(\'isolation\', false, \''.$mlang_brisk['tit_onisol'][$G_lang].'\' ); '; - } - else if ($user->flags & USER_FLAG_LISTAUTH) { - $ret .= 'list_set(\'auth\', false, \''.$mlang_brisk['tit_onauth'][$G_lang].'\' ); '; - } - else { - $ret .= 'list_set(\'all\', false, \'\' ); '; - } + $model = '{ "listen": { "__type": "radio" } }'; + $content = '{ "listen": {"val": "' . ($user->flags & USER_FLAG_ISOLAUTH ? "2" : + ($user->flags & USER_FLAG_LISTAUTH ? "1" : "0")) . + '" } }'; + $ret .= sprintf('g_prefsf.fields_descr_set(JSON.parse(\'%s\'));', $model); + $ret .= sprintf('g_prefsf.json2dom(JSON.parse(\'%s\'));', $content); } if ($user->subst == 'standup')