1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/9499] Unify definition of dE() and other javascript functions

dE() was defined differently in the ACP and in prosilver.  Other javascript
in editor.js files has also been unified (taking the prosilver implementation
as cannonical)

PHPBB3-9499
This commit is contained in:
Josh Woody
2010-07-26 13:25:13 -05:00
parent fc25fe694a
commit 4880305436
3 changed files with 22 additions and 11 deletions

View File

@@ -98,16 +98,21 @@ function viewableArea(e, itself)
/**
* Set display of page element
* s[-1,0,1] = hide,toggle display,show
* type = string: inline, block, inline-block or other CSS "display" type
*/
function dE(n, s)
function dE(n, s, type)
{
var e = document.getElementById(n);
if (!type)
{
type = 'block';
}
var e = document.getElementById(n);
if (!s)
{
s = (e.style.display == '' || e.style.display == 'block') ? -1 : 1;
s = (e.style.display == '' || e.style.display == type) ? -1 : 1;
}
e.style.display = (s == 1) ? 'block' : 'none';
e.style.display = (s == 1) ? type : 'none';
}
/**