diff options
Diffstat (limited to 'phpBB/styles')
| -rw-r--r-- | phpBB/styles/subsilver2/template/ucp_prefs_personal.html | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html index cd5fc9a13f..3499f5ef9a 100644 --- a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html +++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html @@ -4,16 +4,23 @@ // <![CDATA[ /** * Set display of page element - * s[-1,0,1] = hide,toggle display,show + * + * @param string id The ID of the element to change + * @param int action Set to 0 if element display should be toggled, -1 for + * hiding the element, and 1 for showing it. + * @param string type Display type that should be used, e.g. inline, block or + * other CSS "display" types */ - function dE(n,s) - { - var e = document.getElementById(n); - if (!s) - { - s = (e.style.display == '') ? -1 : 1; + function dE(id, action, type) { + if (!type) { + type = 'block'; } - e.style.display = (s == 1) ? 'block' : 'none'; + + var display = jQuery('#' + id).css('display'); + if (!action) { + action = (display === '' || display === type) ? -1 : 1; + } + jQuery('#' + id).css('display', ((action === 1) ? type : 'none')); } var default_dateformat = '{A_DEFAULT_DATEFORMAT}'; |
