Modules
- tw2.bootstrap
- tw2.bootstrap.forms
- tw2.captcha
- tw2.core
- tw2.d3
- tw2.dynforms
- tw2.dyntext
- tw2.etc
- tw2.excanvas
- tw2.forms
- tw2.jit
- tw2.jqplugins.chosen
- tw2.jqplugins.cookies
- tw2.jqplugins.dynatree
- tw2.jqplugins.fg
- tw2.jqplugins.flot
- tw2.jqplugins.fullcalendar
- tw2.jqplugins.jqgrid
- tw2.jqplugins.jqplot
- tw2.jqplugins.portlets
- tw2.jqplugins.select2
- tw2.jqplugins.ui
- tw2.jquery
- tw2.lesscss
- tw2.polymaps
- tw2.protovis.conventional
- tw2.protovis.core
- tw2.protovis.custom
- tw2.protovis.hierarchies
- tw2.qrcode
- tw2.rrd
- tw2.slideymenu
- tw2.sqla
- tw2.tinymce
- tw2.tipster
- tw2.util.html5shim
- tw2.wysihtml5
tw2.jqplugins.dynatree
TW2 widget wrapper the jquery ui dynatreeGet the source from http://github.com/toscawidgets/tw2.jqplugins.dynatree
DynaTreeWidget
- options
- Configuration options to pass to dynatree
- events
- (dict) (BETA) javascript callbacks for events
class DemoDynaTree(DynaTreeWidget):
options = {
'onActivate': twc.JSSymbol(
src="""function(node) {
alert("You activated " + node.data.title);
}"""),
'children': [
{'title': "Item 1"},
{'title': "Folder 2",
'isFolder': True,
'key': "folder2",
'children': [
{'title': "Sub-item 2.1"},
{'title': "Sub-item 2.2"}
]
},
{'title': "Item 3"}
]
}
<%namespace name="tw" module="tw2.core.mako_util"/>
<div>
<div ${tw.attrs(attrs=w.attrs)}></div>
<script type="text/javascript">
$(document).ready(function(){
$("#${w.selector}").dynatree(${w._options});
});
</script>
</div>