author | sylvain.thenault@logilab.fr |
Wed, 29 Apr 2009 10:46:08 +0200 | |
branch | tls-sprint |
changeset 1534 | 7edc063e8a91 |
parent 1419 | 7ff24154351d |
child 1641 | 2c80b09d8d86 |
permissions | -rw-r--r-- |
604
e85042d18b48
[preferences] preferences sections will now remember their collapsed/open status
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff
changeset
|
1 |
/* toggle visibility of an element by its id |
e85042d18b48
[preferences] preferences sections will now remember their collapsed/open status
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff
changeset
|
2 |
* & set current visibility status in a cookie |
e85042d18b48
[preferences] preferences sections will now remember their collapsed/open status
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff
changeset
|
3 |
* XXX whenever used outside of preferences, don't forget to |
e85042d18b48
[preferences] preferences sections will now remember their collapsed/open status
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff
changeset
|
4 |
* move me in a more appropriate place |
e85042d18b48
[preferences] preferences sections will now remember their collapsed/open status
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff
changeset
|
5 |
*/ |
e85042d18b48
[preferences] preferences sections will now remember their collapsed/open status
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff
changeset
|
6 |
function toggle_and_remember_visibility(elemId, cookiename) { |
e85042d18b48
[preferences] preferences sections will now remember their collapsed/open status
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff
changeset
|
7 |
jqNode(elemId).toggleClass('hidden'); |
1419 | 8 |
asyncRemoteExec('set_cookie', cookiename, |
604
e85042d18b48
[preferences] preferences sections will now remember their collapsed/open status
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff
changeset
|
9 |
jQuery('#' + elemId).attr('class')); |
e85042d18b48
[preferences] preferences sections will now remember their collapsed/open status
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff
changeset
|
10 |
} |