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
.. 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.
Reference
============
- jquery 1.2.1 http://jquery.com
- pquery http://www.ngcoders.com/pquery/
History
=============
1.2.1:
* update to jquery 1.2.1
* remove jqueryext support
1.1.2w2:
* new twisted style ajax call
* new addFormback/form_remote_tag call
* passing ajax function no need extra '()' at all.
===============
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
.. 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.
Reference
============
- jquery 1.2.1 http://jquery.com
- pquery http://www.ngcoders.com/pquery/
History
=============
1.2.1:
* update to jquery 1.2.1
* remove jqueryext support
1.1.2w2:
* new twisted style ajax call
* new addFormback/form_remote_tag call
* passing ajax function no need extra '()' at all.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jquery1.2.1a.zip
(33.9 kB
view details)
Built Distribution
jquery-1.2.1a-py2.5.egg
(99.9 kB
view details)
File details
Details for the file jquery1.2.1a.zip
.
File metadata
- Download URL: jquery1.2.1a.zip
- Upload date:
- Size: 33.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9afefef38aff59834c7d7e7cf3c9181d74cbe43b7b680ee10d8929f9bb6a08ef |
|
MD5 | d05e2550a4ff6a596df5a94b48093e53 |
|
BLAKE2b-256 | 1d063e78a1e92f76f788745b3a00cad2dbdda031785c2c8f1f8c76d9bbe10e8b |
File details
Details for the file jquery-1.2.1a-py2.5.egg
.
File metadata
- Download URL: jquery-1.2.1a-py2.5.egg
- Upload date:
- Size: 99.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7ca67d740d7dbc3e573777b42c4453e4fc2892d5ec0e0fc18414b17c0b0c466 |
|
MD5 | 19b88cef0caf1fb7e41e33ec0eabce1f |
|
BLAKE2b-256 | 4075f2525a856335b132fc2c144d0140e4d7061d6d9252619fd878fcc0bbff1d |