Subversion Repository Public Repository

Nextrek

@ 1048
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
$(document).ready(function() {

	function loadJSON() {
		$.ajax({
			url: "./ajax/treeLoader.php",
			data: {
				filename: "jobsact"
			},
			dataType: "JSON",
			type: "GET",
			success: function(data) {
				loadTree(data);
			},
			error: function() {
				alert("Errore nel caricamento dell'albero");
			}
		});
	}

	loadJSON();

	$('#trova-form').submit(function(e) {
		e.preventDefault();
		var query = $('#search').val().trim();
		if (query != '') {
			$.ajax({
				url: "./ajax/treeSearch.php",
				data: {
					filename: "jobsact",
					search: query
				},
				dataType: "JSON",
				type: "GET",
				success: function(data) {
					$("#treeContainer").empty();
					loadTree(data, 'search');
				},
				error: function() {
					alert("Errore nel caricamento dell'albero");
				}
			});
		}
	});

	$('#reset-trova').click(function() {
		$("#treeContainer").empty();
		loadJSON();
	});

	$('.trova-button').click(function() {
		$('#searchbar').toggle();
	});
});

Commits for Nextrek/legal-map/js/main.js

Diff revisions: vs.
Revision Author Commited Message
1048 Diff Diff GGentile picture GGentile Wed 23 Dec, 2015 11:59:14 +0000

Ricerca nell’indice xml

737 FSallustio picture FSallustio Tue 15 Sep, 2015 15:23:06 +0000