tgMochiKitMochiKit packaged as TurboGears widgets. | |
Download |
tgMochiKit Ranking & Summary
Advertisement
- License:
- MIT/X Consortium Lic...
- Price:
- FREE
- Publisher Name:
- Diez B. Roggisch
- Publisher web site:
- http://docs.turbogears.org/
tgMochiKit Tags
tgMochiKit Description
MochiKit packaged as TurboGears widgets. tgMochiKit is a packaging of the MochiKit JavaScript library as a TurboGears widget. MochiKit is authored by Bob Ippolito.Usage:There are two main ways to use tgMochiKit with TurboGears:1. as a standalone widget2. as a resource for another widgetUsing tgMochiKit as a Stand-alone WidgetThis is usually done by letting TurboGears include the tgMochiKit widget on every page, so that other JavaScript code on the page can utilize the functions of the MochiKit library. You do this by setting the following in your application's main configuration:tg.include_widgets = Please note that the mochikit widget object lives in the turbogears module, since when TurboGears initializes the widgets package, it selects the right MochiKit version depending on the application's configuration. See the Configuration Reference below for more information.Using tgMochiKit as a Resource for Another WidgetIf a JavaScript-enabled widget relies on the MochiKit library it should declare the tgMochiKit widget as a resource by adding it to its javascript class attribute.Here is a small sample widget that uses the MochiKit Logging module:from turbogears import widgets, mochikitclass LoggingPanelLink(widget.Widget): template = """< a href="#" onclick="MochiKit.Logging.logger.debuggingBookmarklet();" >open logging pane< /a >""" javascript = Requirements: · Python
tgMochiKit Related Software