Hi, here my proposal "CCK JavaScript Package". would be happy about some answers ;)
Synopsis
This project consists of two main parts. The first deals with the development of
a JavaScript API for CCK and the second is about some useful
implementations.
- Developing a CCK JavaScript API, this allows developers to add custom
JavaScript code to CCK Fields. - Implementing useful tools to provide form handling with high usability.
Detailed project description
CCK provides a great set of fields and widgets. For JavaScript developers it's
difficult to work with them, as things change as soon as a field's widget
changes. Furthermore currently it's difficult to determine the DOM-objects
which represent the field.
The task of this project is to create the necessary API, so that JavaScript
developers can easily work on top of CCK fields. On top of this API some
implementations of JavaScript additions to CCK will be programmed.
The API will allow developers
- to easily add custom JavaScript to a CCK-field
- to identify the DOM-objects of other CCK fields, e.g. identify the
surrounding div tag - to access and modify the data (values, options) of fields through
JavaScript independent from the used widget
Currently planned feature implementations are
- field-validation through AJAX for immediate response
- optionally display field descriptions with layers on hover
- active form enabling: activate fields in dependence on values of other
fields - active data fetching: provides a widget independent way to modify the
possible options of selects, autocomplete fields - active data setting: allows to set values in dependency to other fields
(selects, checkboxes,…)
All of this implementations will be configurable through the CCK admin
interface. The API and implemented features will work as close to the Drupal formAPI
as possible, so that the reuse of the tools without using the CCK is possible.
In the project start phase it will be evaluated which functions will be how close to
the formAPI. For example the validating process should be developed as
independent as possible. (A layer would be created to map the CCK fields to the
formAPI)
| Attachment | Size |
|---|---|
| cck (1).pdf | 71.77 KB |
Comments
This sounds like an
This sounds like an interesting idea and it seems like you know what you're talking about.
Even though our proposals have clearly distinct goals, my multiple value handler (http://groups.drupal.org/node/3211) will use some javascript for its interface, so if possible I'll make sure that my module will be compliant with yours.
Would also suggest the
Would also suggest the ability to fill one CCK field in real-time from the contents of another (kinda like an interactive, over-ridable computed field.)
Example #1)
Imaging typing in the body content and seeing a "Quick 50 word Summary" field pre-populate below and stop at 50 words. Then once the user edits this content the interaction stops.
Example #2)
Imagine the path field pre-populates via javascript from the title, so you can either skip over and submit, or tweak just a bit before creating the node.
I've always wished the Path field worked this way rather than waiting for a submission to see the node URL alias.
I ofter create a "Namespace" or "Short name" field for folks to use that then populates a computed field that accepts that if present of falls back on the title, that then controls the path alias... quite a mess just to create a nice seamless interaction for the user.