• WidgetReport

  last modified March 20, 2007 by cheryl

How far we got, code, next steps etc...

Summary

The goal was to create a Zope 3 widget for editing lists based on this specification, item 1.5. We managed to get a draft list widget in place that subclasses from SimpleInputWidget. Items can be dynamically added and removed from the list and the new state of the list is saved when the edit form's "Apply" button is pushed.

Here is a screenshot of the current state of the widget:



Work Completed

  • Custom widget view (python class that subclasses from SimpleInputWidget) and page template
  • Simple custom content type to test the widget
  • Modified sequence.js (from wc.sequencewidget by Philipp) -- many changes were needed to use nested divs instead of select and option elements

Remaining Work

  • Use 'delete' icon instead of "Remove" button
  • Add a way for the widget to work in non-JavaScript browsers (reload page when items are submitted instead of editing current page's DOM)
  • Ensure cross-browser compatibility, particularly focusing on the JavaScript used
  • Make tests (http://wiki.zope.org/zope3/schema.html has some useful hints with TestRequest)
  • Internationalization
  • Do source code tidying (making it consistent with Zope3 conventions), variable renaming etc... (e.g. replace 'select' variable with something more suitable)
  • Produce a Zope 3 Widget How-To Document for Plone.org
  • Possibly refactor widget to use kss

Source Code

The code is not yet ready to be added to svn. It will be stored on this page for now (see attachments below). It will be improved and checked in to Zope svn.


Contact Information

Stephen Kenworthy (Hong Kong)
developers at globalhand dot org
i-r-c: steveyken

Cheryl Jerozal
gmail: cjerozal
irc: starglows