tw2.tipster

TipsterWidget
  • options
    • (dict) A dict of options to pass to the widget
  • events
    • (dict) (BETA) javascript callbacks for events
  • tips
    • A list of tips.
  • stopTipsURL
    • URL to stop tips from showing up for this user.
class DemoTipsterWidget(widgets.TipsterWidget):
    tips = [
        "Here's a tip:  Wash your face!",
        "No really, wash your face!",
        "You know... if you specify a stopTipsURL you can stop tips.",
        "blah",
    ]
    stopTipsURL = 'this-url-doesnot-exist____you-are-responsible-for-backend'
<%namespace name="tw" module="tw2.core.mako_util"/>
<div class="ui-widget">
<div ${tw.attrs(attrs=w.attrs)} class="ui-state-highlight ui-corner-all"></div>
<script type="text/javascript">
setupTipster('${w.selector}', ${w._tips}, '${w.stopTipsURL}');
</script>
</div>