-
Notifications
You must be signed in to change notification settings - Fork 27
/
demo.html
executable file
·234 lines (207 loc) · 11.8 KB
/
demo.html
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>untitled</title>
<script src="http://code.jquery.com/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.columnview.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div style="display:none" id="demo-list">
<ul class="menu" id="demo2">
<li class="expanded"><a href="#">Create content</a><br />
<ul class="menu">
<li class="leaf"><a href="#">Map</a></li>
<li class="leaf"><a href="#">Page</a></li>
<li class="leaf"><a href="#">Story</a></li>
</ul>
</li>
<li class="leaf"><a href="#">Database queries</a></li>
<li class="leaf"><a href="#">Filebrowser</a></li>
<li class="leaf"><a href="#">Recent posts</a></li>
<li class="leaf"><a href="#">My account</a></li>
<li class="expanded"><a href="#">Administer</a><br />
<ul class="menu">
<li class="expanded"><a href="#" title="Manage your site's content.">Content management</a><br />
<ul class="menu">
<li class="leaf"><a href="#" title="Create vocabularies and terms to categorize your content.">Categories</a></li>
<li class="leaf"><a href="#" title="List and edit site comments and the comment moderation queue.">Comments</a></li>
<li class="leaf"><a href="#" title="View, edit, and delete your site's content.">Content</a></li>
<li class="leaf"><a href="#" title="Manage posts by content type, including default status, front page promotion, etc.">Content types</a></li>
<li class="leaf"><a href="#" title="Control posting behavior, such as teaser length, requiring previews before posting, and the number of posts on the front page.">Post settings</a></li>
<li class="leaf"><a href="#" title="Configure the number of items per feed and whether feeds should be titles/teasers/full-text.">RSS publishing</a></li>
<li class="leaf"><a href="#" title="View all signup-enabled posts, and open or close signups on them.">Signup administration</a></li>
</ul>
</li>
<li class="expanded"><a href="#" title="Control how your site looks and feels.">Site building</a><br />
<ul class="menu">
<li class="leaf"><a href="#" title="Configure what block content appears in your site's sidebars and other regions.">Blocks</a></li>
<li class="leaf"><a href="#" title="Control your site's navigation menu, primary links and secondary links. as well as rename and reorganize menu items.">Menus</a></li>
<li class="leaf"><a href="#" title="Configure page titles and intro text for menu tree pages.">Menu trees</a></li>
<li class="leaf"><a href="#" title="Enable or disable add-on modules for your site.">Modules</a></li>
<li class="leaf"><a href="#" title="Change which theme your site uses or allows users to set.">Themes</a></li>
<li class="leaf"><a href="#" title="Change your site's URL paths by aliasing them.">URL aliases</a></li>
<li class="leaf"><a href="#" title="Views are customized lists of content on your system; they are highly configurable and give you control over how lists of content are presented.">Views</a></li>
</ul>
</li>
<li class="expanded"><a href="#" title="Adjust basic site configuration options.">Site configuration</a><br />
<ul class="menu">
<li class="leaf"><a href="#" title="Settings for how your administrative pages should look.">Administration theme</a></li>
<li class="leaf"><a href="#" title="Enable or disable clean URLs for your site.">Clean URLs</a></li>
<li class="leaf"><a href="#" title="Settings for how Drupal displays date and time, as well as the system's default timezone.">Date and time</a></li>
<li class="leaf"><a href="#">Devel</a></li>
<li class="leaf"><a href="#" title="Control how Drupal deals with errors including 403/404 errors as well as PHP error reporting.">Error reporting</a></li>
<li class="leaf"><a href="#" title="Set filebrowser root folder and display properties.">Filebrowser</a></li>
<li class="leaf"><a href="#" title="Tell Drupal where to store uploaded files and how they are accessed.">File system</a></li>
<li class="leaf"><a href="#" title="Choose which image toolkit to use if you have installed optional toolkits.">Image toolkit</a></li>
<li class="leaf"><a href="#" title="Configure how content input by users is filtered, including allowed HTML tags, PHP code tags. Also allows enabling of module-provided filters.">Input formats</a></li>
<li class="leaf"><a href="#" title="Configure settings for jQuery UI module.">jQuery UI</a></li>
<li class="leaf"><a href="#" title="Allows the user to configure the lightbox2 settings">Lightbox2</a></li>
<li class="leaf"><a href="#">Mars Space Flight Facility Image Tool</a></li>
<li class="leaf"><a href="#" title="Enable or disable page caching for anonymous users, and enable or disable CSS preprocessor.">Performance</a></li>
<li class="leaf"><a href="#" title="Configuration options for MSFF Planetary Data Viewer">Planet Viewer</a></li>
<li class="leaf"><a href="#" title="Configure settings for signups.">Signup</a></li>
<li class="leaf"><a href="#" title="Select the menu to display.">SimpleMenu</a></li>
<li class="leaf"><a href="#" title="Change basic site information, such as the site name, slogan, e-mail address, mission, front page and more.">Site information</a></li>
<li class="leaf"><a href="#" title="Take the site off-line for maintenance or bring it back online.">Site maintenance</a></li>
</ul>
</li>
<li class="expanded"><a href="#" title="Manage your site's users, groups and access to site features.">User management</a><br />
<ul class="menu">
<li class="leaf"><a href="#" title="Determine access to features by selecting permissions for roles.">Access control</a></li>
<li class="leaf"><a href="#" title="List and create rules to disallow usernames, e-mail addresses, and IP addresses.">Access rules</a></li>
<li class="leaf"><a href="#" title="List, edit, or add user roles.">Roles</a></li>
<li class="leaf"><a href="#" title="List, add, and edit users.">Users</a></li>
<li class="leaf"><a href="#" title="Configure default behavior of users, including registration requirements, e-mails, and user pictures.">User settings</a></li>
</ul>
</li>
<li class="expanded"><a href="#" title="View system logs and other status information.">Logs</a><br />
<ul class="menu">
<li class="leaf"><a href="#" title="View events that have recently been logged.">Recent log entries</a></li>
<li class="leaf"><a href="#" title="View 'access denied' errors (403s).">Top 'access denied' errors</a></li>
<li class="leaf"><a href="#" title="View 'page not found' errors (404s).">Top 'page not found' errors</a></li>
<li class="leaf"><a href="#" title="Get a status report about your site's operation and any detected problems.">Status report</a></li>
</ul>
</li>
<li class="leaf"><a href="#">Help</a></li>
</ul>
</li>
<li class="leaf"><a href="#">Log out</a></li>
</ul>
</div>
<div id="example1">
<h2>Example 1</h2>
</div>
<script type="text/javascript">
$("div#demo-list > ul:first").clone(true).attr("id", "list1").appendTo("div#example1");
$("ul#list1").columnview();
</script>
<div id="example2">
<h2>noCss, noCanvas</h2>
</div>
<script type="text/javascript">
$("div#demo-list > ul:first").clone(true).attr("id", "list2").appendTo("div#example2");
$("ul#list2")
.columnview(
{
addCSS: false,
useCanvas: false
});
</script>
<div id="example3">
<h2>Populated content</h2>
<ul id="list3">
</ul>
</div>
<script type="text/javascript">
$("ul#list3")
.columnview(
{
getSubtree: function (elt, isRoot) {
res = $('<li><a name="foobar">foobar</a></li>'
+ '<li><a name="bla">bla</a></li>'
+ '<li hasChildren="true"><a name="children">children</a></li>');
return res;
}
});
</script>
<div id="example4">
<h2>Multiple selection</h2>
</div>
<script type="text/javascript">
$("div#demo-list > ul:first").clone(true).attr("id", "list4").appendTo("div#example4");
$("ul#list4").columnview({ multi: true });
</script>
<div id="example5">
<h2>Select callback</h2>
</div>
<script type="text/javascript">
$("div#demo-list > ul:first").clone(true).attr("id", "list5").appendTo("div#example5");
$("ul#list5")
.columnview()
.bind("columnview_select", function (ev, node) { console.log(node); console.log("is leaf node: " + !node.hasClass("hasChildMenu")); });
</script>
<div id="example6">
<h2>Multiple select callback</h2>
</div>
<script type="text/javascript">
$("div#demo-list > ul:first").clone(true).attr("id", "list6").appendTo("div#example6");
$("ul#list6")
.columnview({ multi: true })
.bind("columnview_select", function (ev, nodes) { console.log(nodes); });
</script>
<div id="example7">
<h2>Fixed-width columns</h2>
</div>
<script type="text/javascript">
$("div#demo-list > ul:first").clone(true).attr("id", "list7").appendTo("div#example7");
$("ul#list7").columnview({ multi: true, fixedwidth: '150px' });
</script>
<div id="example8">
<h2>Deferred populated content</h2>
<button id="list8-load">load again</button>
<ul id="list8">
</ul>
</div>
<script type="text/javascript">
$("ul#list8").columnview({getSubtree: function (elt, isRoot) {
return $.get("test.html");
}});
</script>
<div id="example9">
<h2>Preview pane</h2>
</div>
<script type="text/javascript">
$("div#demo-list > ul:first").clone(true).attr("id", "list9").appendTo("div#example9");
$("ul#list9").columnview(
{ preview:
function (elt) {
var reversed = $(elt).text().split("").reverse().join("");
$(elt).parents().find(".feature").text(reversed);
}
});
</script>
<div id="example10">
<h2>Double click callback</h2>
</div>
<script type="text/javascript">
$("div#demo-list > ul:first").clone(true).attr("id", "list10").appendTo("div#example10");
$("ul#list10").columnview().bind('columnview_dblclick', function (ev, elt) { alert($(elt).text()); });
</script>
<div id="example11">
<h2>Programmatically moving forward</h2>
<a id="navigateTo" href="#">Go to Create content</a><br/>
</div>
<script type="text/javascript">
$("div#demo-list > ul:first").clone(true).attr("id", "list11").appendTo("div#example11");
$("ul#list11").columnview();
$("a#navigateTo").bind("click",
function () {
var elt = $("ul#list11").columnview("container").find("a:eq(0)");
elt.trigger("click");
return false;
});
</script>
</body>
</html>