X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;fp=web%2FObj%2Fbrisk.phh;h=a90358917503bb91ea515dffb3368aaf89988d55;hb=5a0aa4a98df035d451b1e7b427ef16cc3580b932;hp=6395d706a2bdfd1564639aff31cc9db0b82c2613;hpb=b3228a76777d1eab9e2ed69e1e3b880e050209d5;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 6395d70..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')