Modules
- 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.portlets
TW2 'portlets' widgets via jquery-ui. Kind of like the google homepage.Get the source from http://github.com/toscawidgets/tw2.jqplugins.portlets
Column
- options
- (dict) A dict of options to pass to the widget
- events
- (dict) (BETA) javascript callbacks for events
- width
- None
Portlet
- options
- (dict) A dict of options to pass to the widget
- events
- (dict) (BETA) javascript callbacks for events
ColumnLayout
Two widgets in a portlet
Some content in a label widget
Some other content in a label
Some other content in a label
One widget in a portlet
Some content in a label widget
Another portlet with only one widget
Some content in a label widget
A portlet with a whole form in it.. whoah.
- options
- (dict) A dict of options to pass to the widget
- events
- (dict) (BETA) javascript callbacks for events
- width
- None
- cookies
- Boolean. Use cookies to restore/save order?
class DemoLayout(ColumnLayout):
width = '590px'
class col1(Column):
width = '290px'
class portlet(Portlet):
title = "Two widgets in a portlet"
one_widget = twf.Label(text='Some content in a label widget')
another_widget = twf.Label(text='Some other content in a label')
class whatever(Portlet):
title = "One widget in a portlet"
widgetry = twf.Label(text='Some content in a label widget')
class col2(Column):
width = '300px'
class portlet(Portlet):
title = "Another portlet with only one widget"
widgetry = twf.Label(text='Some content in a label widget')
class bigger_portlet(Portlet):
title = "A portlet with a whole form in it.. whoah."
class Form(twf.TableForm):
title = twf.TextField(validator=twc.Required)
director = twf.TextField()
genre = twf.CheckBoxList(
options=['Action', 'Comedy', 'Romance', 'Sci-fi'])
class cast(twf.GridLayout):
extra_reps = 5
character = twf.TextField()
<%namespace name="tw" module="tw2.core.mako_util"/>
<div ${tw.attrs(w.attrs)} style="width: ${w.attrs['width']};">
% for entry in w.children:
${entry.display() | n }
% endfor
</div>