/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk
11.4.3 by mattman-03
Codestandard fixed
1
var mb = 0;
2
var panelwidth = 450;
4.9.7 by elof.bigestans at gmail
Cleaned up showcode.js -- Fixed indentation, spacing
3
var mx, my;
4
5
function resize() {
11.4.3 by mattman-03
Codestandard fixed
6
	document.getElementById( "bottom" ).style.height = ( document.body.clientHeight - 44 ) + "px";
7
	document.getElementById( "panel" ).style.height = ( document.body.clientHeight - 44 ) + "px";
4.9.7 by elof.bigestans at gmail
Cleaned up showcode.js -- Fixed indentation, spacing
8
}			
9
11.4.3 by mattman-03
Codestandard fixed
10
function resizePanel(ev) {
11
	var panel =	document.getElementById('panel');
4.9.7 by elof.bigestans at gmail
Cleaned up showcode.js -- Fixed indentation, spacing
12
	// Firefox
11.4.3 by mattman-03
Codestandard fixed
13
	if(ev.layerX || ev.layerX == 0) {
14
		mx = ev.layerX - panel.offsetLeft;
15
		my = ev.layerY - panel.offsetTop;
16
	//Opera
17
	} else if(ev.offsetX || ev.offsetX == 0) {
18
		mx = ev.offsetX - panel.offsetLeft;
19
		my = ev.offsetY - panel.offsetTop;
4.9.7 by elof.bigestans at gmail
Cleaned up showcode.js -- Fixed indentation, spacing
20
	}			
11.4.3 by mattman-03
Codestandard fixed
21
	if(( mx > (panelwidth - 4)) && ( mx < ( panelwidth + 4) )) {
22
		panel.style.cursor = "col-resize";					
4.9.7 by elof.bigestans at gmail
Cleaned up showcode.js -- Fixed indentation, spacing
23
	} else {
11.4.3 by mattman-03
Codestandard fixed
24
		panel.style.cursor = "default";
4.9.7 by elof.bigestans at gmail
Cleaned up showcode.js -- Fixed indentation, spacing
25
	}
11.4.3 by mattman-03
Codestandard fixed
26
	if( mb ) {
27
		panel.style.width = mx + 4;
28
		panelwidth = mx + 4;
29
		panel.style.cursor = "col-resize";
4.9.7 by elof.bigestans at gmail
Cleaned up showcode.js -- Fixed indentation, spacing
30
		return false;
31
	} else {
32
		return true;
33
	}
34
}
35
11.4.3 by mattman-03
Codestandard fixed
36
function mdPanel(ev) {
37
	if(( mx > ( panelwidth-4 )) && ( mx < ( panelwidth + 4 ))) {
38
		mb = 1;
4.9.7 by elof.bigestans at gmail
Cleaned up showcode.js -- Fixed indentation, spacing
39
	}
40
}
41
11.4.3 by mattman-03
Codestandard fixed
42
function muPanel(ev) {
43
	mb = 0;
44
}