Project

General

Profile

« Previous | Next » 

Revision 3433

remove unused js (from animation for show/hide)

View differences:

lib/style/skins/sanparks/spatial/pma.html
32 32

  
33 33

  
34 34
<script language="JavaScript">
35
function show_map() {
36
	Element.show('mapControlHide')
37
	Element.hide('mapControlShow')
38 35

  
39
	// reset the map position in the iframe
40
	$("mapContainer").setAttribute("style", "right:-212px;");
41

  
42
	// expand the iframe
43
	var frm = top.getMapFrame();
44
	frm.setAttribute("style", "width:295px;right:0;");
45

  
46
	var element = $('mapContainer')
47
	new Effect.Move(element, { x: -212, y: 0, duration: 0.2})
48

  
49
	//setTimeout('$("mapContainer").setAttribute("style", "position:absolute;left:0;")', 300);
50

  
51
	//alert('moved');
52
	//do_move_anim(-260);
53
}
54

  
55
/*
56
 * Don't animate.  Just shrink the outer frame and make left:0.
57
 */
58
function hide_map() {
59
	Element.show('mapControlShow')
60
	Element.hide('mapControlHide')
61
	var element = $('mapContainer')
62
	//new Effect.Move(element, { x: 260, y: 0, duration: 0.1})
63
	$("mapContainer").setAttribute("style", "left:0px;");
64

  
65

  
66

  
67
	//alert('moved');
68
	//setTimeout('getElementsByClassName(top.document, "iframe", "iframeMap")[0].setAttribute("style", "width:35px;right:0;")', 200);
69

  
70
	// shrink the iframe
71
	var frm = top.getMapFrame();
72
	frm.setAttribute("style", "width:35px;right:-3px;");
73

  
74

  
75
	//alert('closed');
76
	//alert('now');
77
	//setTimeout('$("mapContainer").setAttribute("style", "left:0;")', 400);
78
	//$("mapContainer").setAttribute("style", "right:-212px;");
79
	//alert($("mapContainer").getAttribute("style"));
80
	//alert('adjusted');
81

  
82
	//do_move_anim(260);
83
}
84

  
85

  
86
//
87
// animate the drawer
88
//
89
function do_move_anim(xdelta) {
90

  
91
	var element = $('mapContainer')
92
	var old_right = Element.getStyle(element, 'right')
93
	//alert("right:" + old_right);
94
	old_right = old_right.substring(0,old_right.indexOf("px"));
95
	var new_right = old_right + xdelta;
96
	new_right = new_right + "px";
97
	new_right = "0px";
98
	var new_left;
99

  
100
	if (xdelta > 0) {
101
		// hide
102
		new_left = "0px";
103
		new_right = "0px";
104
	} else {
105
		// show
106
		new_left = "0px";
107
		new_right = "0px";
108
	}
109

  
110
	var newStyle = {
111
		left: new_left,
112
		right: new_right};
113
	Element.setStyle(element, newStyle);
114
		
115

  
116
	//alert(xdelta + ": " + Element.getStyle(element, 'left') + "=l R=" + Element.getStyle(element, 'right'));
117
/*
118
*/
119
	//new Effect.Move(element, { x: xdelta, y: 0, duration: 0.3})
120

  
121
	/*
122
	new Effect.Move(element, { x: xdelta, y: 0, duration: 0.3, 
123
		afterFinishInternal: function(effect) { with(Element) {
124
			undoPositioned(effect.element); setStyle(effect.element, newStyle);	}}})
125
	new Effect.Move(element, { x: xdelta, y: 0, duration: 0.3, 
126
		afterFinishInternal: function(effect) { with(Element) {
127
			setStyle(effect.element, newStyle);	}}})
128
			*/
129

  
130
	//Element.setStyle(element, newStyle);
131

  
132

  
133

  
134
	//alert(Element.getStyle(element, 'left') + "=l R=" + Element.getStyle(element, 'right'));
135
}
136

  
137 36
function getElementsByClassName(oElm, strTagName, strClassName){
138 37
    var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
139 38
    var arrReturnElements = new Array();
......
149 48
    return (arrReturnElements)
150 49
}
151 50

  
152

  
153

  
154 51
</script>
155 52
</head>
156 53
<!--

Also available in: Unified diff