Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install z3c.listjs

How to install z3c.listjs

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install z3c.listjs
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0b1 Available View build log
Windows (64-bit)
1.0b1 Available View build log
Mac OS X (10.5+)
1.0b1 Available View build log
Linux (32-bit)
1.0b1 Available View build log
Linux (64-bit)
1.0b1 Available View build log
 
License
ZPL 2.1
Imports
Lastest release
version 1.0b1 on Jan 5th, 2011

z3c.listjs

z3c.listjs contains a widget called ListJsWidget that is a drop-in replacement for the zope.app.form.browser.ListSequenceWidget. It allows users to add and remove list items without the need for server interaction, using Javascript.

Note: This package only works with zope.formlib (zope.app.form) and is not compatible with z3c.form.

You can use ListJsWidget for any schema.List field using the normal zope.formlib custom widget pattern:

System Message: WARNING/2 (<string>, line 15)

Literal block expected; none found.

from z3c.listjs import ListJsWidget

...

form_fields['foo'].custom_widget = ListJsWidget

With the right ZCML override it should also be possible to automatically use this widget in all cases ListSequenceWidget would normally be used. Documentation contributions are welcome!

Should you wish to override the CSS for the buttons, the CSS classes are up_button and down_button. If you are using hurry.resource for your overriding CSS, your resource should depend on z3c.listjs.listjs_css so that ordering is correct to make the override happen.

CHANGES

1.0b1 (2009-06-04)
  • Javascript in <script> blocks and onclick handlers are also

System Message: WARNING/2 (<string>, line 38)

Bullet list ends without a blank line; unexpected unindent.

renumbered so that references to the element id in question are updated. This won't be reliable in the (assumed to uncommon) case where a widget id is referenced within the HTML that is not the field of the widget being rendered.

  • If TinyMCE is installed, care is taken to disconnect TinyMCE editors

System Message: WARNING/2 (<string>, line 44)

Bullet list ends without a blank line; unexpected unindent.

before moving. Reconnection of the moved editors is assumed to take place in the included HTML for the new element, using something like:

System Message: WARNING/2 (<string>, line 48)

Literal block expected; none found.

tinyMCE.execCommand('mceAddControl', false, 'id_of_element');

  • A few small bugfixes:
  • prefix is passed along to update_numbers
  • attr is a local as it should be.
  • getElementsByClassName actually filters by class name.
1.0a4 (2008-02-04)
  • Really fixed up/down arrow for added items.
1.0a3 (2009-02-03)
  • Fix bug where up/down arrows didn't appear for newly added items.
1.0a2 (2009-01-23)
  • Allow moving individual list items up and down in the list.
1.0a1 (2009-01-08)
  • Initial public release.

Download

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.