/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* Functions */
$(document).ready(function(){
	drawRows();
});

/* Expands/hides category data */
function categoryExpand(e){
	e = document.getElementById(e);
	
	$(e).children().not('.categoryMoveUp').not('.categoryMoveDown').not(':first-child').toggle();
	if($(e).children().find('p').first().hasClass('expanded')){
		$(e).children().find('p').first().removeClass('expanded');
		$(e).css('height','25px');
		
	}
	else{
		$(e).children().find('p').first().addClass('expanded');
		$(e).removeAttr('style');
	}
	drawRows();
}

function drawRows(){
	var counter=1;
	$('.row').not(':hidden').each(function(){
		counter++;
		if(counter % 2){
			$(this).addClass('odd').removeClass('even');
		}
		else{
			$(this).addClass('even').removeClass('odd');
		}
	});
}

function categoryMoveUp(e)
{
	var targetMenu = $('li[data-name="'+e+'"]');
	e = document.getElementById(e);
	
	$(e).insertBefore($(e).prev());
	$(targetMenu).insertBefore((targetMenu).prev().not('li[class="menuHeader"]'));
	
	$(e).addClass('categoryPulse');
	$(targetMenu).addClass('categoryPulseMini');
	
	drawRows();
}


function categoryMoveDown(e)
{
	var targetMenu = $('li[data-name="'+e+'"]');
	e = document.getElementById(e);
	
	$(e).insertAfter($(e).next());
	$(targetMenu).insertAfter((targetMenu).next());
	
	$(e).addClass('categoryPulse');
	$(targetMenu).addClass('categoryPulseMini');
	
	drawRows();
}