forked from christianyates/jQuery-ColumnView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.html
More file actions
615 lines (598 loc) · 44 KB
/
demo.html
File metadata and controls
615 lines (598 loc) · 44 KB
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
<?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.4.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.columnview.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css" media="screen">
.containerobj .widget
{
background-color:white;
}
.containerobj .active .widget
{
color: white;
background-color:#3671cf;
}
.containerobj .inpath .widget
{
background-color:#d0d0d0;
}
</style>
<body>
<h1 id="no_options">No options</h1>
<pre>
$("#demo2").columnview();
</pre>
<ul class="menu" id="demo1">
<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>
<h1 id="multi-select_enabled">Multi-select enabled</h1>
<p>Multi-selection via the Shift or meta (Command/Apple on Mac, Control on Windows/Linux) is available with all jQuery versions, though true shift-clicking to select a range is only available with 1.4.x due to changes in the <strong>.index()</strong> method.</p>
<pre>
$("#demo2").columnview({
multi:true
});
</pre>
<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>
<h1 id="fixed-width_columns">Fixed-width columns</h1>
<p>By default on Firefox and Webkit browsers, columns will automatically size horizontally to contain their contents. You may choose to use fixed-width columns instead. On IE, Webkit and Opera, the text will automatically be truncated with ellipsis. Note that columns are always fixed-width on IE due to its handling of automatic widths for absolutely positioned elements. I'm still looking for a reliable cross-platform way to truncate text that performs well. You may notice that text runs under the triangle widgets also. This is easy enough to fix with CSS, though I leave that to you, since it won't work consistently if you're using images as backgrounds in the widget.</p>
<pre>
$("#demo3").columnview({
multi:true,
fixedwidth: '150px'
});
</pre>
CSS:
<pre>
.containerobj .widget
{
background-color:white;
}
.containerobj .active .widget
{
color: white;
background-color:#3671cf;
}
.containerobj .inpath .widget
{
background-color:#d0d0d0;
}
</pre>
<ul class="menu" id="demo3">
<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>
<h1 id="adding_a_callback_to_the_'preview'_pane">Adding a callback to the 'Preview' pane</h1>
<p>In order to show something more interesting in the rightmost pane when a user drills all the way down to the lowest level in a hierarchy, we provide a callback to the 'preview' setting. The calling object is passed to the preview function.</p>
<p>Here were using a simple function to display the text in reverse, but you could use this callback to make AJAX calls to load external data, etc.</p>
<pre>
// Reverse the text of the item in the preview pane
$("#demo4").columnview({
preview: function(element) {
var reversed = $(element).text().split("").reverse().join("");
$(element).parents().find('.feature').text(reversed);
}
});
</pre>
<ul class="menu" id="demo4">
<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>
<h1 id="getting_selected_items">Getting selected items</h1>
<p>To find selected items, you should construct a selector that gathers all items that have the <strong>active</strong> within the columnview widget. you can then iterate over the results.</p>
<pre>
$('#demo5').columnview({multi:true});
$('#getactive').click(function(){
$.each('#demo5 a.active', function(element,i){
$(element).css({'background-color':'orange'});
// You could also add these to an array, etc.
});
});
</pre>
<ul class="menu" id="demo5">
<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>
<input type="button" name="getactive" value="Hightlight Selected Items" id="getactive"/>
<h1 id="onchange">Firing a callback on changing selected element</h1>
<p>You can trigger a callback function based on the currently selected item. At the moment, this only works when <code>multi</code> is set to <code>false</code>.</p>
<pre>
$('#demo6').columnview({
onchange: function(element) {
$("#thecurrent").text($(element).text());
}
});
</pre>
<ul class="menu" id="demo6">
<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>
Current Item: <div style="border:1px solid green" id="thecurrent"> </div>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$('#demo1').columnview();
$('#demo2').columnview({multi:true});
$('#demo3').columnview({multi:true,'fixedwidth':'150px'});
$("#demo4").columnview({
preview: function(element) {
var reversed = $(element).text().split("").reverse().join("");
$('#demo4').find('.feature').text(reversed);
}
});
$('#demo5').columnview({multi:true});
$('#getactive').click(function(){
$('#demo5 a.active').css({'background-color':'orange'});
});
$('#demo6').columnview({
onchange: function(element) {
$("#thecurrent").text($(element).text());
$('#demo6').animate({scrollLeft: 280}, 'slow');
}
});
});
</script>
</body>
</html>