Commit Graph

9 Commits

Author SHA1 Message Date
Dan Harrin cd86c62b94
Relation Manager Customisation Improvements (#4444)
This change allows for easy customisation of the relation manager titles and toolbar buttons.

For buttons - define your custom strings directly in the standard `toolbarButtons` syntax...

```
toolbarButtons:
    create: acme.blog::lang.subcategory.CreateButtonText
    delete: # omit the string to fall back to the default button text
```

...and the old syntax still works...

```
toolbarButtons: create|delete
```

For titles - define different strings for each mode (form, list or pivot)...

```
title:
    form: acme.blog::lang.subcategory.FormTitle
    list: acme.blog::lang.subcategory.ListTitle
```

This feature provides developer convenience, for example in this situation where I have a relation manager that is used to assign user permissions to a project:
Before
![Screenshot 2019-07-10 at 09 28 22](https://user-images.githubusercontent.com/41773797/60953626-6bc0de80-a2f5-11e9-8001-04e816ad6967.png)
After
![Screenshot 2019-07-10 at 09 32 51](https://user-images.githubusercontent.com/41773797/60953773-b9d5e200-a2f5-11e9-93a9-69238ea696aa.png)

This PR contains no breaking changes.
2020-03-27 12:56:07 -06:00
Tobias Kündig 7a277b4b9c Added support for `dependsOn` with relationships (#3539)
Credit to @tobias-kuendig. Added $.oc.relationBehavior.changed function. To keep track of changes made using the relation controller this new "changed" function is called every time a record is created, added, removed or deleted. The function triggers the change.oc.formwidget event on the form field that belongs to this relation controller so other form fields are notified about the changes.
2018-12-03 10:08:00 -06:00
Samuel Georges 51bef96db9 More styling changes and other minor improvements 2016-04-21 04:52:21 +10:00
Samuel Georges 7145aac457 Prepare for CDN, config rename cms.plugins|themes|uploadsDir -> cms.plugins|themes|uploadsPath
Deprecate data-trigger-type on triggerapi
Fixes ref to Util class
2015-02-17 20:58:38 +11:00
Samuel Georges 39daf773bc Implement hasOne RelationController type 2015-01-21 19:47:38 +11:00
Sam Georges a5d67bee27 Escape all the translated strings 2014-08-13 08:01:18 +10:00
Paul Wilde 1d038d3173 More translation strings. 2014-08-12 01:15:38 +01:00
Sam Georges d229fb287e Fixes #216 - hasMany related models can now be deleted 2014-05-28 22:07:00 +10:00
Sam Georges 71a5dd67ab Welcome to the world, October :-) 2014-05-14 23:24:20 +10:00