Latest JAS v1.1.0
144 plugins online

Add reference text support

It would be handy if new reference can be added quickly for modules that only require the "title" field to be provided when adding a new entry. So instead of showing a (multi)dropdown a text field will be shown with the current referenced entry/entries. If a non-existing entry is added to the text field it will be automatically added as a new entry. 

Additionally it should show a quick dropdown (i.e. listOptions) with all available entries to quickly selected them. For multi references (0:*, 1:* and *:*) it should add any new selected entries from the quick select rather than replacing the whole text. 

Multi references could be done either by having one entry per line or in a comma separated fashion (like the current tags in the blog plugin). Assuming this is auto detected it seems wise to check whether the referenced title field doesn't allow for comma's (and its length is limited?) to use comma separation and otherwise use linebreaks. 

It seems logical to have this logic in the CMS only in which case it could be enabled using the configCMS manytoReferenceStyle+tomanyReferenceStyle configuration. However this would mean all references are displayed as such. A more sensible approach seems to be to extend manytoReferenceManip+tomanyReferenceManip with a "text" option so it can use the dropdown/list as a fallback. The fallback detection can be done based on whether the module is valid for "quick text":
  1. Module must have a title field
  2. Module title field must have an unique index
  3. Module should pass Data::errorCheck with default values (except title field)
  4. ...?
JAS15NOV001
Project
JAS Core (JAS)
Rank
3
Workflow
Version
Due in version

Updates (1)

Monday 16th of May 2016 at 00:30 :
Issue updated
Due in version: 1.1.0 => 1.2.0

Files (0)

No files