Project

General

Profile

1
<!DOCTYPE html
2
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml">
5
<head>
6
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
	<title>jsTree v.1.0 - unique documentation</title>
8
	<script type="text/javascript" src="../_lib/jquery.js"></script>
9
	<script type="text/javascript" src="../_lib/jquery.cookie.js"></script>
10
	<script type="text/javascript" src="../_lib/jquery.hotkeys.js"></script>
11
	<script type="text/javascript" src="../jquery.jstree.js"></script>
12

    
13
	<link type="text/css" rel="stylesheet" href="syntax/!style.css"/>
14
	<link type="text/css" rel="stylesheet" href="!style.css"/>
15
	<script type="text/javascript" src="syntax/!script.js"></script>
16
</head>
17
<body>
18
<div id="container">
19

    
20
<h1>jsTree v.1.0 - unique plugin</h1>
21
<h2>Description</h2>
22
<div id="description">
23
<p>The <code>unique</code> plugin prevents from nodes with same titles coexisting (create/move/rename) in the same parent.</p>
24
</div>
25

    
26
<h2 id="demos">Demos</h2>
27
<div class="panel">
28
<p>Try moving the child nodes together (drag'n'drop).</p>
29

    
30
<h3>Using the unique plugin</h3>
31
<div id="demo1" class="demo">
32
	<ul>
33
		<li id="phtml_1">
34
			<a href="#">Root node 1</a>
35
			<ul>
36
				<li id="phtml_2">
37
					<a href="#">Child node 1</a>
38
				</li>
39
			</ul>
40
		</li>
41
		<li id="phtml_4">
42
			<a href="#">Root node 2</a>
43
			<ul>
44
				<li id="phtml_3">
45
					<a href="#">Child node 1</a>
46
				</li>
47
			</ul>
48
		</li>
49
	</ul>
50
</div>
51
<script type="text/javascript" class="source">
52
$(function () {
53
	$("#demo1").jstree({ 
54
		"plugins" : [ "themes", "html_data", "dnd", "unique" ]
55
	});
56
});
57
</script>
58

    
59
</div>
60

    
61
<h2 id="api">API</h2>
62
<div class="panel api">
63

    
64
<h3 id="save_cookie">._check_unique ( names, siblings )</h3>
65
<p>Used internally - checks the names array against the sibling nodes for matches.</p>
66
</div>
67

    
68
</div>
69
</body>
70
</html>
(26-26/27)