| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<!-- |
| 4 |
Copyright 2010 The Closure Library Authors. All Rights Reserved. |
| 5 |
|
| 6 |
Use of this source code is governed by the Apache License, Version 2.0. |
| 7 |
See the COPYING file for details. |
| 8 |
--> |
| 9 |
<head> |
| 10 |
<title>Closure Demos</title> |
| 11 |
<script src="../base.js"></script> |
| 12 |
<script> |
| 13 |
goog.require('goog.ui.tree.TreeControl'); |
| 14 |
goog.require('goog.dom'); |
| 15 |
goog.require('goog.html.SafeHtml'); |
| 16 |
</script> |
| 17 |
<script> |
| 18 |
var treeData = [ |
| 19 |
{name: 'Advanced Tooltip', url: 'advancedtooltip.html'}, |
| 20 |
{name: 'Autocomplete', childNodes: [ |
| 21 |
{name: 'Basic', url: 'autocomplete-basic.html'}, |
| 22 |
{name: 'Remote', url: 'autocompleteremote.html'}, |
| 23 |
{name: 'Rich Remote', url: 'autocompleterichremote.html'} |
| 24 |
]}, |
| 25 |
{name: 'Bidi Input', url: 'bidiinput.html'}, |
| 26 |
{name: 'Bubble', url: 'bubble.html'}, |
| 27 |
{name: 'Char Counter', url: 'charcounter.html'}, |
| 28 |
{name: 'Color Pickers and Palettes', childNodes: [ |
| 29 |
{name: 'Color Contrast', url: 'color-contrast.html'}, |
| 30 |
{name: 'HSV Palette', url: 'hsvpalette.html'}, |
| 31 |
{name: 'HSVA Palette', url: 'hsvapalette.html'}, |
| 32 |
{name: 'Simple Color Grid', url: 'colorpicker.html'}, |
| 33 |
{name: 'Popup Color Picker', url: 'popupcolorpicker.html'}, |
| 34 |
{name: 'Palette Examples', url: 'palette.html'} |
| 35 |
]}, |
| 36 |
{name: 'Common UI Controls', childNodes: [ |
| 37 |
{name: 'Buttons', childNodes: [ |
| 38 |
{name: 'CSS 3', url: 'css3button.html'}, |
| 39 |
{name: 'Imageless', url: 'imagelessbutton.html'}, |
| 40 |
{name: 'Simple', url: 'button.html'} |
| 41 |
]}, |
| 42 |
{name: 'Checkbox', url: 'checkbox.html'}, |
| 43 |
{name: 'Combobox', url: 'combobox.html'}, |
| 44 |
{name: 'Container', url: 'container.html'}, |
| 45 |
{name: 'Control', url: 'control.html'}, |
| 46 |
{name: 'Dimension Picker', childNodes: [ |
| 47 |
{name: 'LTR', url: 'dimensionpicker.html'}, |
| 48 |
{name: 'RTL', url: 'dimensionpicker_rtl.html'} |
| 49 |
]}, |
| 50 |
{name: 'Menu', childNodes: [ |
| 51 |
{name: 'Menu Bar', url: 'menubar.html'}, |
| 52 |
{name: 'Filtered Menu', url: 'filteredmenu.html'}, |
| 53 |
{name: 'Popup Menu', url: 'popupmenu.html'}, |
| 54 |
{name: 'Simple Menu', url: 'menu.html'}, |
| 55 |
{name: 'Submenus', url: 'submenus.html'}, |
| 56 |
{name: 'Submenus Flyweight', url: 'submenus2.html'} |
| 57 |
]}, |
| 58 |
{name: 'Menu Buttons', childNodes: [ |
| 59 |
{name: 'Color', url: 'colormenubutton.html'}, |
| 60 |
{name: 'CSS 3', url: 'css3menubutton.html'}, |
| 61 |
{name: 'Imageless', url: 'imagelessmenubutton.html'}, |
| 62 |
{name: 'Selection', url: 'selectionmenubutton.html'}, |
| 63 |
{name: 'Simple', url: 'menubutton.html'} |
| 64 |
]}, |
| 65 |
{name: 'Select', url: 'select.html'}, |
| 66 |
{name: 'Tab Bar and Tabs', url: 'tabbar.html'}, |
| 67 |
{name: 'Tab Pane', url: 'tabpane.html'}, |
| 68 |
{name: 'Toolbar', url: 'toolbar.html'} |
| 69 |
]}, |
| 70 |
{name: 'Date Pickers', childNodes: [ |
| 71 |
{name: 'Date Picker', url: 'datepicker.html'}, |
| 72 |
{name: 'Input Date Picker', url: 'inputdatepicker.html'}, |
| 73 |
{name: 'Popup Date Picker', url: 'popupdatepicker.html'} |
| 74 |
]}, |
| 75 |
{name: 'Debug', url: 'debug.html'}, |
| 76 |
{name: 'Dependency Graph', url: 'depsgraph.html'}, |
| 77 |
{name: 'Dialog', url: 'dialog.html'}, |
| 78 |
{name: 'Dom Selection', url: 'dom_selection.html'}, |
| 79 |
{name: 'Drag', url: 'drag.html'}, |
| 80 |
{name: 'Drag & Drop', childNodes: [ |
| 81 |
{name: 'Drag & Drop', url: 'dragdrop.html'}, |
| 82 |
{name: 'Drag & Drop Detector', url: 'dragdropdetector.html'}, |
| 83 |
{name: 'Drag List Group', url: 'draglistgroup.html'}, |
| 84 |
{name: 'Dragger', url: 'dragger.html'}, |
| 85 |
{name: 'File Drop Handler', url: 'filedrophandler.html'} |
| 86 |
]}, |
| 87 |
{name: 'Editor', childNodes: [ |
| 88 |
{name: 'Field - Basic', url: 'editor/field_basic.html'}, |
| 89 |
{name: 'Full Editor', url: 'editor/editor.html'}, |
| 90 |
{name: 'Hello World Plugin', url: 'editor/helloworld.html'}, |
| 91 |
{name: 'Seamless Field', url: 'editor/seamlessfield.html'} |
| 92 |
]}, |
| 93 |
{name: 'Effects', childNodes: [ |
| 94 |
{name: 'Animation', url: 'effects.html'}, |
| 95 |
{name: 'Animation Queue', url: 'animationqueue.html'}, |
| 96 |
{name: 'CSS Sprite Animation', url: 'cssspriteanimation.html'}, |
| 97 |
{name: 'CSS3 targeted transition', url: 'fx/css3/transition.html'} |
| 98 |
]}, |
| 99 |
{name: 'Emoji Picker', url: 'popupemojipicker.html'}, |
| 100 |
{name: 'Events', childNodes: [ |
| 101 |
{name: 'Event Propagation', url: 'event-propagation.html'}, |
| 102 |
{name: 'Event Target', url: 'eventtarget.html'}, |
| 103 |
{name: 'Events', url: 'events.html'}, |
| 104 |
{name: 'Focus Handler', url: 'focushandler.html'}, |
| 105 |
{name: 'Input Handler', url: 'inputhandler.html'}, |
| 106 |
{name: 'Key Handler', url: 'keyhandler.html'}, |
| 107 |
{name: 'Keyboard Shortcuts', url: 'keyboardshortcuts.html'}, |
| 108 |
{name: 'Mouse Wheel Handler', url: 'mousewheelhandler.html'}, |
| 109 |
{name: 'Online Handler', url: 'onlinehandler.html'}, |
| 110 |
{name: 'Paste Handler', url: 'pastehandler.html'}, |
| 111 |
{name: 'Stop Event Propagation', url: 'stopevent.html'} |
| 112 |
]}, |
| 113 |
{name: 'Gauge', url: 'gauge.html'}, |
| 114 |
{name: 'Graphics', childNodes: [ |
| 115 |
{name: 'Basic Elements', url: 'graphics/basicelements.html'}, |
| 116 |
{name: 'Events', url: 'graphics/events.html'}, |
| 117 |
{name: 'Modify Elements', url: 'graphics/modifyelements.html'}, |
| 118 |
{name: 'Tiger', url: 'graphics/tiger.html'} |
| 119 |
]}, |
| 120 |
{name: 'History', childNodes: [ |
| 121 |
{name: 'Demo 1', url: 'history1.html'}, |
| 122 |
{name: 'Demo 2', url: 'history2.html'}, |
| 123 |
{name: 'HTML 5', url: 'html5history.html'}, |
| 124 |
{name: 'Iframe Based', url: 'history3.html'} |
| 125 |
]}, |
| 126 |
{name: 'Hover Card', url: 'hovercard.html'}, |
| 127 |
{name: 'Inline Block', childNodes: [ |
| 128 |
{name: 'Quirks mode', url: 'inline_block_quirks.html'}, |
| 129 |
{name: 'Standards mode', url: 'inline_block_standards.html'} |
| 130 |
]}, |
| 131 |
{name: 'JSON Pretty Printer', url: 'jsonprettyprinter.html'}, |
| 132 |
{name: 'Label Input', url: 'labelinput.html'}, |
| 133 |
{name: 'Pixel Density Monitor', url: 'pixeldensitymonitor.html'}, |
| 134 |
{name: 'Plain Text Spell Checker', url: 'plaintextspellchecker.html'}, |
| 135 |
{name: 'Popup', url: 'popup.html'}, |
| 136 |
{name: 'Progress Bar', url: 'progressbar.html'}, |
| 137 |
{name: 'Prompt', url: 'prompt.html'}, |
| 138 |
{name: 'QuadTree', url: 'quadtree.html'}, |
| 139 |
{name: 'Ratings', url: 'ratings.html'}, |
| 140 |
{name: 'Rich Text Spell Checker', url: 'richtextspellchecker.html'}, |
| 141 |
{name: 'Rounded Panel', url: 'roundedpanel.html'}, |
| 142 |
{name: 'Sample Component', url: 'samplecomponent.html'}, |
| 143 |
{name: 'Scroll Floater', url: 'scrollfloater.html'}, |
| 144 |
{name: 'Server Chart', url: 'serverchart.html'}, |
| 145 |
{name: 'Sliders', childNodes: [ |
| 146 |
{name: 'Slider', url: 'slider.html'}, |
| 147 |
{name: 'Two Thumb Slider', url: 'twothumbslider.html'} |
| 148 |
]}, |
| 149 |
{name: 'Split Behavior', url: 'splitbehavior.html'}, |
| 150 |
{name: 'Split Pane', url: 'splitpane.html'}, |
| 151 |
{name: 'Table Sorting', url: 'tablesorter.html'}, |
| 152 |
{name: 'Textarea', url: 'textarea.html'}, |
| 153 |
{name: 'Timer', url: 'timers.html'}, |
| 154 |
{name: 'Tooltips', childNodes: [ |
| 155 |
{name: 'Simple Tooltip', url: 'tooltip.html'}, |
| 156 |
{name: 'Advanced Tooltip', url: 'advancedtooltip.html'} |
| 157 |
]}, |
| 158 |
{name: 'Tracer', url: 'tracer.html'}, |
| 159 |
{name: 'Trees', childNodes: [ |
| 160 |
{name: 'Drilldown Row', url: 'drilldownrow.html'}, |
| 161 |
{name: 'Tree', url: 'tree/demo.html'} |
| 162 |
]}, |
| 163 |
{name: 'TweakUi', url: 'tweakui.html'}, |
| 164 |
{name: 'User Agent', url: 'useragent.html'}, |
| 165 |
{name: 'Viewport Size Monitor', url: 'viewportsizemonitor.html'}, |
| 166 |
{name: 'XPC', url: 'xpc/'}, |
| 167 |
{name: 'Zippy', url: 'zippy.html'} |
| 168 |
]; |
| 169 |
|
| 170 |
function initTree() { |
| 171 |
goog.ui.tree.TreeControl.defaultConfig.cleardotPath = |
| 172 |
'../images/tree/cleardot.gif'; |
| 173 |
var tree = new goog.ui.tree.TreeControl('All Demos'); |
| 174 |
tree.setIsUserCollapsible(false); |
| 175 |
buildNode(tree, treeData); |
| 176 |
tree.render(goog.dom.getElement('demo-list')); |
| 177 |
} |
| 178 |
|
| 179 |
function buildNode(parent, nodeArray) { |
| 180 |
for (var i = 0, node; node = nodeArray[i]; i++) { |
| 181 |
if (node.name) { |
| 182 |
var childNode = parent.getTree().createNode(); |
| 183 |
parent.add(childNode); |
| 184 |
if (node.url) { |
| 185 |
childNode.setSafeHtml(goog.html.SafeHtml.create('a', { |
| 186 |
'href': node.url, |
| 187 |
'title': node.name, |
| 188 |
'target': 'demo' |
| 189 |
}, node.name)); |
| 190 |
// Need to prevent BaseNode.onClick_ from calling preventDefault. |
| 191 |
childNode.onClick_ = goog.nullFunction; |
| 192 |
} else if (node.childNodes) { |
| 193 |
childNode.setText(node.name); |
| 194 |
buildNode(childNode, node.childNodes); |
| 195 |
} |
| 196 |
} |
| 197 |
} |
| 198 |
} |
| 199 |
|
| 200 |
//function showDemo(node) { |
| 201 |
// window.top.frames['demo'].location = node.getClientData(); |
| 202 |
//} |
| 203 |
</script> |
| 204 |
<link rel="stylesheet" href="../css/tree.css"> |
| 205 |
<style> |
| 206 |
body { |
| 207 |
font: normal 10pt Tahoma, Arial, sans-serif; |
| 208 |
color: #333; |
| 209 |
background-color: #eee; |
| 210 |
} |
| 211 |
|
| 212 |
h2 a { |
| 213 |
font: bold 18pt Tahoma, Arial, sans-serif; |
| 214 |
color: #333; |
| 215 |
text-decoration: underline; |
| 216 |
} |
| 217 |
|
| 218 |
h2 a:hover { |
| 219 |
color: #00f; |
| 220 |
text-decoration: underline; |
| 221 |
} |
| 222 |
|
| 223 |
.goog-tree-children { |
| 224 |
background-repeat: repeat-y; |
| 225 |
background-image: url("../images/tree/I.png") !important; |
| 226 |
background-position-y: 1px !important; /* IE only */ |
| 227 |
font: icon; |
| 228 |
} |
| 229 |
|
| 230 |
.goog-tree-icon { |
| 231 |
background-image:url("../images/tree/tree.png"); |
| 232 |
} |
| 233 |
|
| 234 |
.goog-tree-item-label { |
| 235 |
font: bold 10pt Tahoma, Arial, sans-serif; |
| 236 |
color: #333; |
| 237 |
text-decoration: none; |
| 238 |
} |
| 239 |
|
| 240 |
.goog-tree-item-label a { |
| 241 |
font: normal 10pt Tahoma, Arial, sans-serif; |
| 242 |
color: #333; |
| 243 |
text-decoration: none; |
| 244 |
} |
| 245 |
|
| 246 |
.goog-tree-item-label a:hover { |
| 247 |
color: #00f; |
| 248 |
text-decoration: underline; |
| 249 |
} |
| 250 |
</style> |
| 251 |
</head> |
| 252 |
<body> |
| 253 |
<h2><a href="index_splash.html" title="Home" target="demo">Index</a></h2> |
| 254 |
<div id="demo-list"></div> |
| 255 |
<script>initTree();</script> |
| 256 |
</body> |
| 257 |
</html> |