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 - themes 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 - themes plugin</h1>
|
21
|
<h2>Description</h2>
|
22
|
<div id="description">
|
23
|
<p>The <code>themes</code> plugin controls the looks of jstree - without this plugin you will get a functional tree, but it will look just like an ordinary UL list.</p>
|
24
|
</div>
|
25
|
|
26
|
<h2 id="configuration">Configuration</h2>
|
27
|
<div class="panel configuration">
|
28
|
<h3>theme</h3>
|
29
|
<p class="meta">A string. Default is <code>"default"</code>.</p>
|
30
|
<p>The name of the theme to use to style the tree.</p>
|
31
|
|
32
|
<h3>url</h3>
|
33
|
<p class="meta">A string (or <code>false</code> if not used). Default is <code>false</code>.</p>
|
34
|
<p>The location of the theme's CSS file, if set to <code>false</code> jstree will look for the file in <code><em>< theme folder ></em>/themes/<em>< theme name ></em>/style.css</code>. You can set the theme folder using <code>$.jstree._themes = "PATH/TO/FOLDER/";</code>, otherwise it is autodetected as <code><em><jquery.tree.js location></em>/themes/</code>.</p>
|
35
|
|
36
|
<h3>dots</h3>
|
37
|
<p class="meta">A Boolean. Default is <code>true</code>.</p>
|
38
|
<p>Whether to show the connecting dots or not.</p>
|
39
|
|
40
|
<h3>icons</h3>
|
41
|
<p class="meta">A Boolean. Default is <code>true</code>.</p>
|
42
|
<p>Whether to show the node icons or not.</p>
|
43
|
|
44
|
</div>
|
45
|
|
46
|
<h2 id="demos">Demos</h2>
|
47
|
<div class="panel">
|
48
|
|
49
|
<h3>Using the themes plugin</h3>
|
50
|
<input type="button" class="button" value="toggle_dots" id="toggle_dots" style="float:left;" />
|
51
|
<input type="button" class="button" value="toggle_icons" id="toggle_icons" style="float:left;" />
|
52
|
<input type="button" class="button" value="set_theme1" id="set_theme1" style="float:left;" />
|
53
|
<input type="button" class="button" value="set_theme2" id="set_theme2" style="" />
|
54
|
<div id="demo1" class="demo">
|
55
|
<ul>
|
56
|
<li id="phtml_1">
|
57
|
<a href="#">Root node 1</a>
|
58
|
<ul>
|
59
|
<li id="phtml_2">
|
60
|
<a href="#">Child node 1</a>
|
61
|
</li>
|
62
|
<li id="phtml_3">
|
63
|
<a href="#">Child node 2</a>
|
64
|
</li>
|
65
|
</ul>
|
66
|
</li>
|
67
|
<li id="phtml_4">
|
68
|
<a href="#">Root node 2</a>
|
69
|
</li>
|
70
|
</ul>
|
71
|
</div>
|
72
|
<script type="text/javascript" class="source">
|
73
|
$(function () {
|
74
|
$("#toggle_dots, #toggle_icons").click(function () {
|
75
|
$("#demo1").jstree(this.value);
|
76
|
});
|
77
|
$("#set_theme1").click(function () {
|
78
|
$("#demo1").jstree("set_theme","apple");
|
79
|
});
|
80
|
$("#set_theme2").click(function () {
|
81
|
$("#demo1").jstree("set_theme","default");
|
82
|
});
|
83
|
$("#demo1").jstree({
|
84
|
"themes" : {
|
85
|
"theme" : "default",
|
86
|
"dots" : false,
|
87
|
"icons" : false
|
88
|
},
|
89
|
"plugins" : [ "themes", "html_data" ]
|
90
|
});
|
91
|
});
|
92
|
</script>
|
93
|
|
94
|
</div>
|
95
|
|
96
|
<h2 id="api">API</h2>
|
97
|
<div class="panel api">
|
98
|
|
99
|
<h3 id="set_theme">.set_theme ( name , url )</h3>
|
100
|
<p>Set the tree's theme. Triggers an event.</p>
|
101
|
<ul class="arguments">
|
102
|
<li>
|
103
|
<code class="tp">string</code> <strong>name</strong>
|
104
|
<p>The name of the theme to use to style the tree.</p>
|
105
|
</li>
|
106
|
<li>
|
107
|
<code class="tp">string</code> <strong>url</strong>
|
108
|
<p>The location of the theme's CSS file, if omitted jstree will look for the file in:<br /><code><em>< theme folder ></em>/themes/<em>< name ></em>/style.css</code>.<br />You can set the theme folder using:<br /><code>$.jstree._themes = "PATH/TO/FOLDER/";</code>, otherwise it is autodetected as <code><em><jquery.tree.js location></em>/themes/</code>.</p>
|
109
|
</li>
|
110
|
</ul>
|
111
|
<h3 id="get_theme">.get_theme ( )</h3>
|
112
|
<p>Returns the name of the currently active theme.</p>
|
113
|
|
114
|
<div style="height:1px; visibility:hidden;"><span id="hide_dots"> </span><span id="toggle_dots"> </span></div>
|
115
|
<h3 id="show_dots">.show_dots ( ), .hide_dots ( ), .toggle_dots ( )</h3>
|
116
|
<p>Show, hide or toggle the visibility of the dots connecting the tree's nodes.</p>
|
117
|
|
118
|
<div style="height:1px; visibility:hidden;"><span id="hide_icons"> </span><span id="toggle_icons"> </span></div>
|
119
|
<h3 id="show_icons">.show_icons ( ), .hide_icons ( ), .toggle_icons ( )</h3>
|
120
|
<p>Show, hide or toggle the visibility of the icons next to the title of each the tree node.</p>
|
121
|
|
122
|
</div>
|
123
|
|
124
|
</div>
|
125
|
</body>
|
126
|
</html>
|