Package: collective.datagridcolumns
An additional set ofcolumn typesforDatagridFieldPlone product.ContentsNew columnsTextAreaColumnSelectColumnReferenceColumnDateColumnMultiSelectColumnDependenciesjQuery version (for Plone 3)jQueryUIAuthorsCreditsChangelog0.7.0 (2015-05-22)0.6.2 (2014-02-19)0.6.1 (2014-02-06)0.6.0 (2014-01-13)0.5.1 (2013-12-12)0.5.0 (2013-09-10)0.4.0 (2013-08-20)0.3.2 (2012-10-17)0.3.1 (2012-06-27)0.3.0 (2012-06-27)0.2.0 (2012-01-30)0.1.1 (2012-01-12)0.1.0 (2011-12-01)New columnsTextAreaColumnLike the baseColumntype, just display atextareaHTML element.Additional parameters:rowsDefault: 3. Number of rows of the textarea.colsDefault: 0. Number of columns of the textarea. If not provided the
htmlcolsattribute is omitted and an inline style “width: 100%”
wil be used instead.Example:...
DataGridField('foo',
          columns=("type", "description"),
          widget = DataGridWidget(
                    columns={
                         'type' : Column(_(u"Type")),
                         'description' : TextAreaColumn(_(u"Description"),
                                                        rows=10,
                                                        cols=20),
                    },
         ),
),
...SelectColumnLike the defaultSelectColumnfrom DataGridField product, but explicitly support thevocabulary_factoryway to provide vocabularies.Additional parameters:vocabulary_factoryProvide the name of a registered vocabulary using a Zope Component Utility. See the
Archetypes Develop Manual for more.vocabularyAs default SelectColumn, required only if you don’t providevocabulary_factory.
Use this to call a method on the context to obtain the vocabulary.Example:...
DataGridField('foo',
          columns=("type", "description"),
          widget = DataGridWidget(
                    columns={
                         'type' : SelectColumn(_(u"Type"),
                                               vocabulary_factory='plone.app.vocabularies.PortalTypes'),
                         'description' : Column(_(u"Description"),),
                    },
         ),
),
...NoteThe baseSelectColumnof DataGridField 1.8 already have some kind of support for Zope-3-like
vocabularies, however the use of that feature is not clear (andthisversion also works on Plone 3).ReferenceColumnThis is a complex column type that store an unique object “UID”. The default view rendering of this column
will display a proper link to the referenced object.You can use this is different ways. In the simpler example, just use it as a textual column:...
DataGridField('foo',
          columns=("uid", "comment"),
          widget = DataGridWidget(
                    columns={
                         'uid' : ReferenceColumn(_(u"Reference")),
                         'comment' : Column(_(u"Comment")),
                    },
         ),
),
...So you are on your own to store a propert UID in the field (not very interesting, isn’t it?).If you want something more, you can enable an additional JavaScript module and you’ll get anautocomplete featureof referenced objects:...
DataGridField('foo',
          columns=("uid", "comment"),
          widget = DataGridWidget(
                    helper_js= ('datagridwidget.js', 'datagridautocomplete.js'),
                    columns={
                         'uid' : ReferenceColumn(_(u"Reference")),
                         'comment' : Column(_(u"Comment")),
                    },
         ),
),
...So you will add to the defaultdatagridwidget.js(automatically provided by the widget) a newdatagridautocomplete.jsones.
This will also requiredjQueryUI autocomplete. Please, read also the “Dependencies” section below.When using autocomplete, you can query Plone in two different way:starting a query with the “/” character will query documents bypath, so you can manually
surf the whole site.starting as query with other character will perform a full-text query on titles.Additional parameters:object_providesWhen using the full-text query, only return results of objects that provide those interfaces.
Default is an empty list (no filter).surf_siteChoose to be able to surf the site tree using a “/dir/dir/…” term.
Default to True (allowed).search_siteChoose to be able to search items in the site by full-text query or not.
Default to True (allowed).DateColumnA simple column field that allows to insert some dates. This field usejQuery UI datepicker plugin.To use datepicker plugin you need to enable datepicker plugin of jQuery UI (see above for infos) and add an
helper_js nameddatagriddatepicker.jsin the widget. See the example below.Additional parameters:date_formatDefault: yy/mm/dd. The date format to store in the field.Example:...
DataGridField('foo',
          columns=("name", "birthday"),
          widget = DataGridWidget(
                    helper_js= ('datagridwidget.js', 'datagriddatepicker.js'),
                    columns={
                         'name' : Column(_(u"Name")),
                         'birthday' : DateColumn(_(u"Birthday"),
                                                 date_format="dd/mm/yy"),
                    },
         ),
),
...MultiSelectColumnBased on theSelectColumnfrom (from this package, not the original ones, so it support thevocabulary_factoryparameter), show a list of checkboxes and store a list of selected entries.Additional parameters: see all parameter fromSelectColumn.Example:...
DataGridField('foo',
          columns=("recipe_name", "recipe_options"),
          widget = DataGridWidget(
                    helper_js= ('datagridwidget.js', 'datagridwidget_patches.js', 'datagridmultiselect.js'),
                    columns={
                         'recipe_name' : Column(_(u"Name of the recipe"),),
                         'recipe_options' : MultiSelectColumn(_(u"Type"),
                                                              vocabulary_factory='your.vocabulary',
                                                              ),
                    },
         ),
),
...WarningThis column suffer of the same limitations ofRadioColumnandCheckboxColumncolumns (from original DataGridField).If you get a validation error when saving,post data will not be reloadedon the form itself.DependenciesThis product has been tested on:Plone 3.3andDataGridField 1.6Plone 4.2 and 4.3andDataGridField 1.9jQuery version (for Plone 3)BothReferenceColumn,DateColumnandMultiSelectColumnneed jQuery 1.4.2 or better to work.
Plone 3.3 is shipped with jQuery 1.3. You can fix this dependency by your how, or using a 3rd party library.An alternative Generic Setup import step (”DataGridField: register jQuery 1.4”) is provided
with the product. Run this and the default Plone jQuery version will be disabled, then a
1.4.4 version of jQuery will be registered.Do not run thison Plone 4!jQueryUIReferenceColumn and DateColumn needs that Plone provide jQueryUI library. This productwill notcover this
requirement, even by dependency.If you have already jQueryUI (autocomplete or datepicker) behaviour in your Plone site, you are already ok.
If you don’t, take a look atcollective.jqueryui.autocomplete(or read it’s documentation page
to understand how cover this need).Keep in mind that the standard way of providing jQueryUI support to Plone is by usingcollective.js.jqueryuiAuthorsThis product was developed by RedTurtle Technology team.CreditsDeveloped with the support of:Regione Emilia RomagnaAzienda USL FerraraS. Anna Hospital, FerraraAll of them supports thePloneGov initiative.Changelog0.7.0 (2015-05-22)Display the selected values in the MultiSelectColumn view macro
instead of displaying a special char (“V”)
[gbastien]ReferenceColumn - Addworkflow_statesparameter
[sdelcourt]Fixed MANIFEST
[keul]0.6.2 (2014-02-19)HTML validation fix. Transformed hiddendivtospan[keul]0.6.1 (2014-02-06)Soft-support for the field’stitle(seepull request 12)
[keul]Better implementation of datagridwidget_patches.js approach
[keul]0.6.0 (2014-01-13)Not use jQuery.live()anymore, but switched to.delegate().
We still not use.on()for keeping jQuery 1.4 compatibility.
[keul]Added theMultiSelectColumncolumn
[keul]0.5.1 (2013-12-12)Fixed deprecated usage ofjqJavaScript var [davidemoro]Added uninstall profile [keul]0.5.0 (2013-09-10)Python code now support the newrequiredmethod that has been added
in version 1.9.0. Old DGF versions are still supported [keul]Python code now support the newcol_descriptionmethod that has been added
in version 1.9.0. Old DGF versions are still supported [keul]Removed any reference tolabel_msgid, unused by DataGridField also
(see#9) [keul]0.4.0 (2013-08-20)Added new column: DateColumn, that allows to add date values [cekk]CatchParseErrorexceptions [keul]0.3.2 (2012-10-17)Fixed a bug introduced with version 0.3. See#1[keul]0.3.1 (2012-06-27)Fixed manifest and readme [cekk]0.3.0 (2012-06-27)ReferenceColumn - added base Column default paremeters:default_method,label_msgid,required[cekk]0.2.0 (2012-01-30)ReferenceColumn - added an alternative jQuery library, installable using a separate
Generic Setup profile [keul]ReferenceColumn - fulltext search is now restricted to the path of the calling context [keul]ReferenceColumn - URL where to perform AJAX call is taken from aICallingContextProvideradapter. 3rd party products can provide a more specific one than the default (that still
call the portal url) [keul]0.1.1 (2012-01-12)ReferenceColumn - fixed bug that when saving empty new row it will save a random
site content [keul]ReferenceColumn - Addedsurf_siteandsearch_siteparameters [keul]0.1.0 (2011-12-01)Initial release