equal
deleted
inserted
replaced
40 var magic = $('header').Height() + $('pagebar_main').Height(); |
40 var magic = $('header').Height() + $('pagebar_main').Height(); |
41 var height = getHeight(); |
41 var height = getHeight(); |
42 var exheight = height - magic; |
42 var exheight = height - magic; |
43 expander.style.height = exheight + 'px'; |
43 expander.style.height = exheight + 'px'; |
44 expander.style.top = magic + 'px'; |
44 expander.style.top = magic + 'px'; |
|
45 expander_set_pos(); |
45 } |
46 } |
46 |
47 |
47 function expander_onload() |
48 function expander_onload() |
48 { |
49 { |
49 var expander = document.getElementById('sidebar-hide'); |
50 var expander = document.getElementById('sidebar-hide'); |
57 { |
58 { |
58 admin_expand_real(expander, content, holder); |
59 admin_expand_real(expander, content, holder); |
59 } |
60 } |
60 } |
61 } |
61 |
62 |
|
63 function expander_set_pos() |
|
64 { |
|
65 var winheight = getHeight(); |
|
66 var magic = $('header').Height() + $('pagebar_main').Height(); |
|
67 var top = getScrollOffset(); |
|
68 if ( typeof(top) != 'number' ) |
|
69 { |
|
70 return null; |
|
71 } |
|
72 magic = magic - top; |
|
73 if ( magic < 0 ) |
|
74 magic = 0; |
|
75 var bartop = magic + top; |
|
76 var barheight = winheight - magic; |
|
77 var expander = document.getElementById('sidebar-hide'); |
|
78 expander.style.top = bartop + 'px'; |
|
79 expander.style.height = barheight + 'px'; |
|
80 } |
|
81 |
62 addOnloadHook(expander_set_height); |
82 addOnloadHook(expander_set_height); |
63 addOnloadHook(expander_onload); |
83 addOnloadHook(expander_onload); |
64 window.onresize = expander_set_height; |
84 window.onresize = expander_set_height; |
65 |
85 window.onscroll = expander_set_pos; |