MBS-7538: Make it possible to edit URL relationship attributes again

Merged
#971 · Created  · Last updated

Merged pull request

Merge remote-tracking branch 'bitmap/mbs-7538' into beta

f2f56f1·Author: ·Closed by: ·2014-05-20

Description

This patch does what the title says, mostly by moving code around more than anything. Firstly, the JS classes used to store relationships had a weird hierarchy with MB.relationshipEditor.fields.Relationship and MB.Control.externalLinks.Relationship both inheriting from MB.entity.Relationship. Since the external links one needs to support attributes now, I just merged the MB.entity one into the relationshipEditor one, and had the externalLinks one inherit from that.

To get the UI to work, all I did was factor out the part of the relationship editor dialog used to render attribute fields into its own template, and added it underneath the URL fields that have attributes (just the video attribute currently). Then it magically works, since both UIs use the same relationship class now.

I couldn't find a non-terrible way to allow editing dates through the external links editor, so I added a mini-relationship-editor to the URL edit page. Which seems to work just fine after applying the relevant roles, although I couldn't use Form::Role::Relationships on Form::URL because they have a conflicting field name (url).

0 attachments

0 comments

Loading commits...