Skip to main content

Jquery javascript library for TurboGears

Project description

Feature
===============

jquery is a jquery javascript library wrapper and ajax helper for happy
TurboGears web designers.

It contains 3 extra ajax widgets based on jquery.

* addCallback / link_to_remote(target ,update, href, callback)

* addPeriodBack / periodically_call_remote(update, href, interval)

* addFormback / form_remote_tag(target, update, href)

Which are inspired from Ruby on Rails/pquery and give them the twisted syntax.


Available widgets
====================

* Jquery (basic jquery libray wrapper for Turbogears)

* addCallback/link_to_remote

* addPeriodBack/periodically_call_remote

* addFormback/form_remote_tag

* jqzebratable (alternative line color)

* jqtabs (head tabber)

.. note::
Update notice form 1.1.2 jquery widget: you need return dict(link = link_to_remote) instead of
return dict(link = link_to_remote()) in the following versions


Install
==============
Use setuptools to install::

$easy_install jquery


Usage
==============

jquery
~~~~~~~~~

include in config/app.cfg::

tg.include_widgets = ['jquery.jquery']

jquery ajax
~~~~~~~~~~~~~

import in controllers.py::

from jquery import addCallback
from jquery import addPeriodback
from jquery import addFormback
....
return dict(addCallback = addCallback,
addPeriodback = addPeriodback)


in template::

[div id="timelink"][a href = "#"]get time[/a][/div]
[div id="timediv"][/div]
${addCallback(target="timelink" ,update="timediv", href="/time")}

or::

[div id="timediv"][/div]
${addPeriodback(update="timediv", href="/time", interval="3000")}

or

[form class="timelink" action="ajax" method="get" ]
Field : [input type="text" name="field" /][br /]
[input type="submit" /]
[/form]
[div id="timediv"][/div]
${addFormback(target="timelink", update="timediv", href="ajax")}

The addCallback/addPeriodback(link_to_remote/periodically_call_remote) could be placed anywhere in your template.
Check http://docs.turbogears.org/1.0/RemoteLink for detail.


jqzebratable/jqtabs
~~~~~~~~~~~~~~~~~~~~~~

This extension also contains 2 extra fancy widgets:

* zebra table

* tabs

which are based on jqwebext, a jQuery simple MVC and plugins
Components framework respected by Racklin.

Take jqzebratable for example

1. include proper extension in config/app.cfg::

tg.include_widgets = ['jquery.jqtabs']

The proper javascripts will be included in all your templates

2. open the template to edit. check
http://code.google.com/p/jqwebext/wiki/ZebraTableExtension for detail

Reference
============

- jquery 1.1.2 http://jquery.com
- jqwebext 0.2.1 http://jqwebext.googlecode.com/
- pquery http://www.ngcoders.com/pquery/

History
=============
1.1.2w2:

* new twisted style ajax call
* new addFormback/form_remote_tag call
* passing ajax function no need extra '()' at all.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jquery-1.1.2w2.zip (10.2 kB view details)

Uploaded Source

Built Distributions

jquery-1.1.2w2-py2.5.egg (88.4 kB view details)

Uploaded Source

jquery-1.1.2w2-py2.4.egg (88.5 kB view details)

Uploaded Source

File details

Details for the file jquery-1.1.2w2.zip.

File metadata

  • Download URL: jquery-1.1.2w2.zip
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jquery-1.1.2w2.zip
Algorithm Hash digest
SHA256 40ea16cf4bec0516354db2658e60f396bab465e612250b0cac200c85fe654ea5
MD5 af710e65d6e0b8255df2cb9910d55463
BLAKE2b-256 53baf0ada5233ffa66ac4aa7832e80bc6c8f201bb9d35be391cd58d8236c2abc

See more details on using hashes here.

File details

Details for the file jquery-1.1.2w2-py2.5.egg.

File metadata

  • Download URL: jquery-1.1.2w2-py2.5.egg
  • Upload date:
  • Size: 88.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jquery-1.1.2w2-py2.5.egg
Algorithm Hash digest
SHA256 4e38029c3ad400f7eb7eecd127c9e43d489001d3296b78ecb0ab1d2c8e6d7876
MD5 14ae39d90babcc498a8dfad6bcafa4e2
BLAKE2b-256 8bbe2ef41715970fbd790531c73154977a9716d917ad85a8bd6ec8ffa2736c6f

See more details on using hashes here.

File details

Details for the file jquery-1.1.2w2-py2.4.egg.

File metadata

  • Download URL: jquery-1.1.2w2-py2.4.egg
  • Upload date:
  • Size: 88.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jquery-1.1.2w2-py2.4.egg
Algorithm Hash digest
SHA256 d52dfeb864d02c039c6b5ca03a610a69e7f8b1ccdb38ce8d7ceaa87b6da04833
MD5 f1d3fd9bb2a27a4a6f01e88129e8219a
BLAKE2b-256 397b4e17464ae4abec40262254982bc9d730f890534132943369c37d61c149a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page