/[drupal]/contributions/modules/activeedit/README.txt
ViewVC logotype

Contents of /contributions/modules/activeedit/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu Apr 3 21:38:19 2008 UTC (19 months, 3 weeks ago) by nedjo
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +5 -34 lines
File MIME type: text/plain
Major refactoring of activeedit. Remove almost everything but leave enough to begin afresh with, based on popups. Only a single active edit is implemented: footer. No theme-specific support, no node or comment support. Todo: pass updated data back for rendering in the original element (e.g., footer).
1 Drupal activeedit.module README.txt
2 ==============================================================================
3
4 Provides Ajax-based editing.
5
6 Active edit is being rewritten for 6.x with many fewer features. It is
7 incomplete and currently only useful for demo or testing purposes.
8
9 Technical details: Implemented through hook_activeedit_elements(), which returns
10 an array of elements to attach behaviors to. Elements are identified by their
11 jQuery selectors, which can be specified by theme (see files in the /themes
12 directory).
13
14 Requirements
15 ------------------------------------------------------------------------------
16 This module is written for Drupal 5.0+ and requires the popups and formfilter
17 modules to be enabled.
18
19 Implementation details
20 ------------------------------------------------------------------------------
21 The approach is different from most in place editing implementations. Activeedit
22 uses a helper module, Formfilter, to fetch altered versions of the original
23 forms. That is, when we want to change a setting (e.g., the site name), we fetch
24 the appropriate settings form via--but alter it so it has only the field we
25 need. Then we submit that form via AJAX to its normal path.
26
27 The key advantage is that we can don't need to reinvent. Permissions/access
28 issues are already handled. We can use the original forms so we don't need to
29 replicate them.
30
31 Developer Usage
32 -----------------------------------------------------------------------------
33
34 New activeedit behaviours can be easily attached to page elements through
35 implementations of three activeedit hooks: hook_activeedit_elements() (for
36 page elements to make editable); hook_activeedit_links() (for links to bring
37 up forms for adding items); and hook_activeedit_autocompletes() (for
38 autocomplete elements to enable new item adding for.
39
40 See the include files in the 'modules' directory of the activeedit module
41 for sample implementations.
42
43 Theme support for in place editing
44 ----------------------------------
45
46 Activeedit is theme-dependent in that the Javascript needs to be able to
47 identify which elements to attach to.
48
49 Elements are identified by jQuery selectors, see
50
51 http://www.jquery.com/DOM/Traversing/Selectors
52
53 Each element is given a default selector, but individual themes may or may not
54 have the same HTML structure as the default.
55
56 To add support for a theme, you need to write a themename.inc file and put it
57 in the module's theme directory (where themename is the name of the theme).
58 See existing theme include files for examples.
59
60 The items in a theme .inc file represent those elements that have a different
61 selector in the theme than the default.
62
63 The helper module activeedit_theme_assist is available for generating a stub
64 theme include file. This module is not included in the stable release of
65 jstools but is in CVS in the activeedit directory. Install the module and
66 visit admin/settings/activeedit_theme_assist to get a stub include file
67 plus some basic instructions.
68
69

  ViewVC Help
Powered by ViewVC 1.1.2