web/data/cubicweb.preferences.js
author Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
Wed, 18 Feb 2009 19:19:57 +0100
branchtls-sprint
changeset 823 cb8ccbef8fa5
parent 604 e85042d18b48
child 1419 7ff24154351d
child 1612 0be8605c411a
permissions -rw-r--r--
main template refactoring there are 2 main templates : - one for non templatable views (xml, binaries, etc.) - one for the other views The right one is chosen according to its selectors

/* toggle visibility of an element by its id
 * & set current visibility status in a cookie
 * XXX whenever used outside of preferences, don't forget to
 *     move me in a more appropriate place
 */
function toggle_and_remember_visibility(elemId, cookiename) {
    jqNode(elemId).toggleClass('hidden');
    async_remote_exec('set_cookie', cookiename,
                      jQuery('#' + elemId).attr('class'));
}