1 | scheduler.expand = function(){
|
---|
2 | var t = scheduler._obj;
|
---|
3 | do {
|
---|
4 | t._position = t.style.position||"";
|
---|
5 | t.style.position = "static";
|
---|
6 | } while ((t = t.parentNode) && t.style );
|
---|
7 | t = scheduler._obj;
|
---|
8 | t.style.position="absolute";
|
---|
9 | t._width = t.style.width;
|
---|
10 | t._height = t.style.height;
|
---|
11 | t.style.width = t.style.height = "100%";
|
---|
12 | t.style.top = t.style.left = "0px";
|
---|
13 |
|
---|
14 | var top =document.body;
|
---|
15 | top.scrollTop = 0;
|
---|
16 |
|
---|
17 | top = top.parentNode;
|
---|
18 | if (top)
|
---|
19 | top.scrollTop = 0;
|
---|
20 | document.body._overflow=document.body.style.overflow||"";
|
---|
21 | document.body.style.overflow = "hidden";
|
---|
22 | scheduler._maximize()
|
---|
23 | }
|
---|
24 |
|
---|
25 | scheduler.collapse = function(){
|
---|
26 | var t = scheduler._obj;
|
---|
27 | do {
|
---|
28 | t.style.position = t._position;
|
---|
29 | } while ((t = t.parentNode) && t.style );
|
---|
30 | t = scheduler._obj;
|
---|
31 | t.style.width = t._width;
|
---|
32 | t.style.height = t._height;
|
---|
33 | document.body.style.overflow=document.body._overflow;
|
---|
34 | scheduler._maximize()
|
---|
35 | }
|
---|
36 |
|
---|
37 | scheduler.attachEvent("onTemplatesReady",function(){
|
---|
38 | var t = document.createElement("DIV");
|
---|
39 | t.className="dhx_expand_icon";
|
---|
40 | scheduler.toggleIcon = t;
|
---|
41 | scheduler._obj.appendChild(t);
|
---|
42 | t.onclick = function(){
|
---|
43 | if (!scheduler.expanded)
|
---|
44 | scheduler.expand();
|
---|
45 | else
|
---|
46 | scheduler.collapse();
|
---|
47 | }
|
---|
48 | });
|
---|
49 | scheduler._maximize = function(){
|
---|
50 | this.expanded = !this.expanded;
|
---|
51 | this.toggleIcon.style.backgroundPosition="0px "+(this._expand?"0":"18")+"px";
|
---|
52 | if (scheduler.callEvent("onSchedulerResize",[]))
|
---|
53 | scheduler.update_view();
|
---|
54 | }
|
---|