80
cb7dde69c301
Improved and enabled HTML optimization algorithm; enabled gzip compression; added but did not test at all the tag cloud class in includes/tagcloud.php, this is still very preliminary and not ready for any type of production use
Dan
diff
changeset
+ − 1
var TBL_SHOW = ( IE ) ? 'block' : 'table';
79
+ − 2
function admin_expand()
+ − 3
{
+ − 4
var expander = document.getElementById('sidebar-hide');
+ − 5
var content = document.getElementById('sidebar-show');
+ − 6
var holder = document.getElementById('td-sidebar');
80
cb7dde69c301
Improved and enabled HTML optimization algorithm; enabled gzip compression; added but did not test at all the tag cloud class in includes/tagcloud.php, this is still very preliminary and not ready for any type of production use
Dan
diff
changeset
+ − 7
if ( content.style.display == TBL_SHOW )
79
+ − 8
{
80
cb7dde69c301
Improved and enabled HTML optimization algorithm; enabled gzip compression; added but did not test at all the tag cloud class in includes/tagcloud.php, this is still very preliminary and not ready for any type of production use
Dan
diff
changeset
+ − 9
admin_collapse_real(expander, content, holder);
79
+ − 10
createCookie('theme_admin_sidebar', 'collapsed', 3650);
+ − 11
}
+ − 12
else
+ − 13
{
80
cb7dde69c301
Improved and enabled HTML optimization algorithm; enabled gzip compression; added but did not test at all the tag cloud class in includes/tagcloud.php, this is still very preliminary and not ready for any type of production use
Dan
diff
changeset
+ − 14
admin_expand_real(expander, content, holder);
79
+ − 15
createCookie('theme_admin_sidebar', 'expanded', 3650);
+ − 16
}
+ − 17
}
+ − 18
+ − 19
function admin_collapse_real(expander, content, holder)
+ − 20
{
+ − 21
expander.className = 'collapsed';
+ − 22
content.style.display = 'none';
+ − 23
holder.style.width = '0px';
+ − 24
holder.style.paddingRight = '12px';
+ − 25
holder.style.paddingLeft = '0px';
+ − 26
}
+ − 27
+ − 28
function admin_expand_real(expander, content, holder)
+ − 29
{
+ − 30
expander.className = 'expanded';
80
cb7dde69c301
Improved and enabled HTML optimization algorithm; enabled gzip compression; added but did not test at all the tag cloud class in includes/tagcloud.php, this is still very preliminary and not ready for any type of production use
Dan
diff
changeset
+ − 31
content.style.display = TBL_SHOW;
79
+ − 32
holder.style.width = '230px';
+ − 33
holder.style.paddingLeft = '12px';
+ − 34
holder.style.paddingRight = '0px';
+ − 35
}
+ − 36
+ − 37
function expander_set_height()
+ − 38
{
+ − 39
var expander = document.getElementById('sidebar-hide');
+ − 40
var magic = $('header').Height() + $('pagebar_main').Height();
+ − 41
var height = getHeight();
+ − 42
var exheight = height - magic;
+ − 43
expander.style.height = exheight + 'px';
+ − 44
expander.style.top = magic + 'px';
+ − 45
}
+ − 46
+ − 47
function expander_onload()
+ − 48
{
+ − 49
var expander = document.getElementById('sidebar-hide');
+ − 50
var content = document.getElementById('sidebar-show');
+ − 51
var holder = document.getElementById('td-sidebar');
+ − 52
if ( readCookie('theme_admin_sidebar') == 'collapsed' )
+ − 53
{
+ − 54
admin_collapse_real(expander, content, holder);
+ − 55
}
+ − 56
else if ( readCookie('theme_admin_sidebar') == 'expanded' )
+ − 57
{
+ − 58
admin_expand_real(expander, content, holder);
+ − 59
}
+ − 60
}
+ − 61
+ − 62
addOnloadHook(expander_set_height);
+ − 63
addOnloadHook(expander_onload);
+ − 64
window.onresize = expander_set_height;
+ − 65