forked from Pylons/deform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES.txt
508 lines (357 loc) · 17.3 KB
/
CHANGES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
Changes
=======
0.9.4 (2012-02-14)
------------------
- No longer Python 2.5 compatible. Python 2.6+ is required.
- Python 3.2 compatible.
- Translate title attribute for remove button in sequence fields.
- Do not output empty error messages for sequence items. After translation
these would insert the PO file metadata.
- Update to lingua for translations, add french translation
- fix multiple i18n issues.
- Fix a bug where displaying error could lead on an error when you have
imbricated Mapping objects
- Fix ssue #54: form.pt does not show validation errors from the top node of
the schema. See https://github.com/Pylons/deform/issues/54 for more
information.
- Previously, all CheckedInputWidget and CheckedPasswordWidget fields had
hardcoded input[name] attributes of 'value' and 'confirm'. When
deserializing a form, this caused colander.null to be passed to the widget
deserialization function since neither submitted value matched the name of
the field. This change simply replaces 'value' with the name of the field
and 'confirm' with the name of the field with '-confirm' appended.
- In select widget, add css_class to <select> rather than only <option>.
- Allow RichText fields to load their editor only after clicking on them
- There is no longer a ``deform_ajaxify`` global javascript function.
Instead forms are AJAXified directly by the javascript callback for the
form.
0.9.3 (2011-08-10)
------------------
- Update Dutch translations.
- Translate title and description of items for sequence fields.
- Add a new API method to field objects: ``translate``. This method will use
the translator passed to the underlying renderer to translate message ids
into text.
0.9.2 (2011-07-22)
------------------
- Chameleon 2 compatibility.
- Use default widgets for a schema's baseclass if known instead of always
falling back to a text widget.
- Deform now includes a ``beautify.css`` (contributed by Ergo^) in its static
directory, which can be used to make form element styling prettier.
- Moved ``deformdemo`` into its own package and Github repository
(https://github.com/Pylons/deformdemo).
0.9.1 (2011-06-23)
------------------
- Add Dutch translation.
- Add the ``deform.widget.DateTimeWidget`` widget, which uses the jQueryUI
Timepicker add-on.
``DateTimeWidget`` uses the ISO8601 combined date and time format
internally, as expected by ``colander.DateTime``, but converts to
the more friendly separate date and time format for display in the
widget.
This widget is now the default for colander.DateTime schema types.
- Upgrade to jquery-ui 1.8.11, as required by the timepicker.
- Compile all ``.po`` files to ``.mo`` in ``deform/locale`` and remove Texan
locale (funny, but breaks ``python setup.py compile_catalog`` with an
UnknownLocale error.)
- Fix references to repoze.bfg and update obsoletes URLs in the demo application
- Remove unused ``jquery.autocomplete.min.js`` file from static directory.
- SelectWidget now has a ``size`` attribute to support single select widgets
that are not dropdowns.
- The value fed to the ``deform.form.Button`` class as ``name`` would
generate an invalid HTML id if it contained spaces. Now it converts spaces
to underscores if they exist in the name. See
https://github.com/Pylons/deform/pull/14 .
- Deformdemo application now has a Time field demonstration.
- Deform Chameleon templates now contain i18n:translate tags.
- German translation updated.
- Fixed invalid HTML generated for "select" widget.
- When using an ajax form without a redirect, a submit overwrites the form.
In the case of a form validation failure on first submit, no event handlers
were registered to submit the form via ajax on the second submit. This is
now fixed. See https://github.com/Pylons/deform/pull/1 .
0.9 (2011-03-01)
----------------
- Moved to GitHub (https://github.com/Pylons/deform).
- Added tox.ini for testing purposes.
- Fix select dropdown behavior on Firefox by fixing CSS (closes
http://bugs.repoze.org/issue152).
- Removed ``wufoo.css``, minimized ``form.css``. Changed templates around to
deal with CSS changes.
- Sequence widgets now accept a min_len and a max_len argument, which
influences its display of close and add buttons.
- Convert demo application from repoze.bfg to Pyramid.
- Depend on Chameleon<1.999 (deform doesn't yet work with Chameleon 2).
0.8.1 (2010-12-17)
------------------
Features
~~~~~~~~
- Allow ``deform.form.Button`` class to be passed a ``disabled`` flag (false
by default). If a Button is disabled, its HTML ``disabled`` setting will
be set true.
0.8 (2010-12-02)
----------------
Features
~~~~~~~~
- Added Polish locale data: thanks to Marcin Lulek.
Bug Fixes
~~~~~~~~~
- Fix dynamic sequence item adding on Chrome and Firefox 4. Previously if
there was a validation error rendering a set of sequence items, the "add
more" link would be rendered outside the form, which would cause it to not
work. Wrapping the sequence item <li> element in a <ul> fixed this.
0.7 (2010-10-10)
----------------
Features
~~~~~~~~
- Added Danish locale.
- Added Spanish locale: thanks to David Cerna for the translations!
- ``DatePartsWidget`` now renders error "Required" if all blank or
"Incomplete" if partially blank for consistency with the other widgets.
- Different styling involving <li> and <ul> for checkbox choice,
checked input, radio choice, checked password, and dateparts widgets
(via Ergo^). See http://bugs.repoze.org/issue165.
Dependencies
~~~~~~~~~~~~
- Deform now depends on ``colander`` version 0.8 or better (the demo
wants to use schema bindings).
- Deform now depends on ``Chameleon`` (uppercase) rather than
``chameleon`` to allow for non-PyPI servers.
Demo
~~~~
- New addition to the demonstration application: schema binding.
0.6 (2010-09-03)
----------------
Features
~~~~~~~~
- Sequence widgets are no longer ``structural`` by default; they now
print the label of the sequence above the sequence adder.
- Radio buttons in a radio button choice widget are now spaced closer
together and the button is on the left hand side.
- The sequence remove button is no longer an image.
- The sequence widget now puts the sequence adding link *after* any
existing items in the sequence (previously the link was always
beneath the sequence title).
- It is now possible to associate a widget with a schema node within
the schema directly. For example::
import colander
import deform.widget
class MySchema(Schema):
description = colander.SchemaNode(
colander.String(),
widget=deform.widget.RichTextWidget()
)
For more information, see "Changing the Default Widget Associated
With a Field" in the documentation.
- The constructor of ``deform.Field`` objects (and thus
``deform.Form`` objects) now accept arbitrary keyword arguments,
each of which is attached to the field or form object being
constructed, as well as being attached to its descendant fields
recursively.
- The form object's template now respects the ``css_class`` argument /
attribute of the form node.
- CheckboxChoice and RadioChoice widgets now use <ul> and <li> to
display individual choice elements (thanks to Ergo^), and both
widgets put the label after the element instead of before as
previously.
- The ``deform.widget.AutocompleteInputWidget`` widget now uses
`JQuery UI's autocomplete sublibrary
<http://docs.jquery.com/UI/Autocomplete>` instead of the
``jquery.autocomplete`` library to perform its job in order to
reduce the number of libraries needed by Deform. Some options have
been changed as a result, and the set of resources returned by
``form.get_widget_resources`` has changed.
This change also implies that when a widget which uses a remote URL
as a ``values`` input, the remote URL must return a JSON structure
instead of a ``\n``-delimited list of values.
Requirements
~~~~~~~~~~~~
- This Deform version requires ``colander`` version 0.7.3 or better.
Bug Fixes
~~~~~~~~~
- ``RichTextWidget``, ``AutocompleteInputWidget``, ``TextInputWidget``
with input masks, and ``CheckedInputWidget`` with input masks could
not be used properly within sequences. Now they can be. See also
``Internal`` and ``Backwards Incompatibilities`` within this
release's notes. This necessitated new required ``deform.load()``
and ``deform.addCallback()`` JavaScript APIs.
- Radio choice widgets included within a submapping no longer put
their selections on separate lines.
- Rich text widgets are now 500 pixels wide by default instead of 640.
- RadioChoiceWidgets did not work when they were used within
sequences. Making them work required some changes to the its
template and it added a dependency on ``peppercorn`` >= 0.3.
- To make radio choice widgets work within sequences, the
deform.addSequenceItem JavaScript method needed to be changed. It
will now change the value of ``name`` attributes which contain a
marker that looks like an field oid (e.g. ``deformField1``), and,
like the code which changes ids in the same manner, appends a random
component (e.g. ``deformField1-HL6sgP``). This is to support radio
button groupings.
- The mapping and sequence item templates now correctly display errors
with ``msg`` values that are lists. Previously, a repr of a Python
list was displayed when a widget had an error with a ``msg`` value
that was a list; now multiple <p> nodes are inserted into the
rendering, each <p> node containing an individual error message.
(Note that this change requires colander 0.7.3).
Backwards Incompatibilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The JavaScript function ``deform.load()`` now *must* be called by
the HTML page (usually in a script tag near the end of the page, ala
``<script..>deform.load()</script>``) which renders a Deform form in
order for widgets which use JavaScript to do proper event and
behavior binding. If this function is not called, built-in widgets
which use JavaScript will no longer function properly.
- The JavaScript function ``deformFocusFirstInput`` was removed. This
is now implied by ``deform.load()``.
- The ``closebutton_url`` argument to the SequenceWidget no longer
does anything. Style the widget template via CSS to add an image.
Internal
~~~~~~~~
- Provided better instructions for running the demo app and running
the tests for the demo app in ``deformdemo/README.txt``.
- Try to prevent false test failures by injecting sleep statements in
things that use ``browser.key_press``.
- Moved ``deformdemo/tests/test_demo.py`` to ``deformdemo/test.py`` as
well as moving ``deformdemo/tests/selenium.py`` to
``deformdemo/selenium.py``. Removed the ``deformdemo/tests``
subdirectory.
- The date input widget now uses JQueryUI's ``datepicker``
functionality rather than relying on JQuery Tools' ``date`` input.
The latter was broken for sequences, and the former works fine.
- The various deform* JavaScript functions in ``deform.js`` have now
been moved into a top-level namespace. For example, where it was
necessary to call ``deformFocusFirstInput()`` before, it is now
necessary to call ``deform.focusFirstInput()``.
- Make the TinyMCE rich text widget use ``mode: 'exact'`` instead of
``mode: 'textareas'``.
- ``richtext``, ``autocomplete_input``, ``textinput``,
``checked_input``, and ``dateinput``, and ``form`` templates now use
the new ``deform.addCallback`` indirection instead of each
registering their own JQuery callback or performing their own
initialization logic, so that each may be used properly within
sequences.
- Change sequence adding logic to be slightly simpler.
- The sample app form page now calls ``deform.load()`` rather than
``deformFocusFirstInput()``.
- Added new demo app views for showing a sequence of autocompletes, a
sequence of dateinputs, a sequence of richtext fields, a sequence of
radio choice widgets and a sequence of text inputs with masks and
tests for same.
Documentation
~~~~~~~~~~~~~
- Added a note about ``get_widget_resources`` to the "Basics"
chapter.
- Added a note about ``deform.load()`` JavaScript requiredness to the
"Basics" chapter.
- Add new top-level sections named ``Widget Templates`` and ``Widget
JavaScript`` to the "Widgets" chapter.
0.5 (2010-08-25)
----------------
Features
~~~~~~~~
- Added features which make it possible to inquire about which
resources (JavaScript and CSS resources) are required by all the
widgets that make up a form rendering. Also make it possible for a
newly created widget to specify its requirements. See "Widget
Requirements and Resources" in the widgets chapter of the
documentation.
- Add the ``get_widget_requirements`` method to ``deform.Field``
objects.
- Add the ``get_widget_resources`` method to ``deform.Field``
objects.
- Allow ``deform.Field`` (and ``deform.Form``) objects to accept a
"resource registry" as a constructor argument.
- Add the ``deform.Field.set_widgets`` method, which allows a
(potentially nested) set of widgets to be applied to children fields
of the field upon which it is called.
- Add the ``deform.widget.TextInputCSV`` widget. This widget is
exactly like the ``deform.widget.TextAreaCSV`` widget except it
accepts a single line of input only.
- The default widget for ``colander.Tuple`` schema types is now
``deform.widget.TextInputCSV``.
- The ``deform.widget.FileUploadWidget`` now returns an instance of
``deform.widget.filedict`` instead of a plain dictionary to make it
possible (using isinstance) to tell the difference between file
upload data and a plain data dictionary for highly generalized
persistence code.
0.4 (2010-08-22)
----------------
Bug Fixes
~~~~~~~~~
- When the hidden widget is used to deserialize a field, return
``colander.null`` rather than the empty string so that it may be
used to represent non-text fields such as ``colander.Integer``.
This is isomorphic to the change done previously to
``deform.TextInputWidget`` to support nontextual empty fields.
- Fix typo about overriding templates using set_zpt_renderer in
templating chapter.
- Fix link to imperative schema within in Colander docs within "Basics".
- Remove duplicate ``deform.widget.DateInputWidget`` class definition.
Features
~~~~~~~~
- Add a ``deform.widget.RichTextWidget`` widget, which adds the
TinyMCE WYSIWIG javascript editor to a text area.
- Add a ``deform.widget.AutocompleteInputWidget`` widget, which adds
a text input that can be supplied a URL or iterable of choices to
ease the search and selection of a finite set of choices.
- The ``deform.widget.Widget`` class now accepts an extra keyword
argument in its constructor: ``css_class``.
- All widgets now inherit a ``css_class`` attribute from the base
``deform.widget.Widget`` class. If `css_class`` contains a value,
the "primary" element in the rendered widget will get a CSS
``class`` attribute equal to the value ("primary" is defined by the
widget template's implementor).
- The ``deform.Field`` class now as an ``__iter__`` method which
iterates over the children fields of the field upon which it is
called (``for item in field`` == ``for item in field.children``).
0.3 (2010-06-09)
----------------
Bug Fixes
~~~~~~~~~
- Change default form action to the empty string (rather than ``.``).
Thanks to Kiran.
Features
~~~~~~~~
- Add ``deform.widget.DateInputWidget`` widget, which is a date picker
widget. This has now become the default widget for the
``colander.Date`` schema type, preferred to the date parts widget.
- Add text input mask capability to ``deform.widget.TextInputWidget``.
- Add text input mask capability to
``deform.widget.CheckedInputWidget``.
Backwards Incompatibilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Custom widgets must now check for ``colander.null`` rather than
``None`` as the null sentinel value.
- Dependency on a new (0.7) version of Colander, which has been
changed to make using proper defaults possible; if you've used the
``default`` argument to a ``colander.SchemaNode``, or if you've
defined a custom Colander type, you'll want to read `the updated
Colander documentation <http://docs.repoze.org/colander>`_
(particularly the changelist). Short story: use the ``missing``
argument instead.
- If you've created a custom widget, you will need to tweak it
slightly to handle the value ``colander.null`` as input to both
``serialize`` and ``deserialize``. See the Deform docs at
`http://docs.repoze.org/deform <http://docs.repoze.org/deform>`_ for
more information.
0.2 (2010-05-13)
----------------
- Every form has a formid now, defaulting to ``deform``. The formid
is used to compute the id of the form tag as well as the button ids
in the form. Previously, if a formid was not passed to the Form
constructor, no id would be given to the rendered form and the
form's buttons would not be prefixed with any formid.
- The ``deform.Form`` class now accepts two extra keyword arguments in
its constructor: ``use_ajax`` and ``ajax_options``.
If ``use_ajax`` is ``True``, the page is not reloaded when a submit
button is pressed. Instead, the form is posted, and the result
replaces the DOM node on the page.
``ajax_options`` is a string which allows you to pass extra options
to the underlying AJAX form machinery when ``use_ajax`` is True.
- Added a couple Ajax examples to the demo app.
- Add a rudimentary Ajax chapter to the docs.
0.1 (2010-05-09)
----------------
- Initial release.