There's no need to open another dialog to set the additional
details when creating a sub-reference. We can just use the edit
panel that's already added to the ReferenceDialog.
In the edit panel I assume that whenever it is loaded with a
reference that uses the extends attribute and has no content
then the panel is used to create a sub-ref.
Note: SetExtendsContentDialog is still used for the Citoid flow.
Bug: T375156
Change-Id: I8cb3663f2f45a807b1d00f543ae13e8c5f53c6d8
Since changing the group will break a subref, we'll hide the field
for now.
TODO: There's more that can be done here: the main ref group
selector could also be hidden, and changing group could be supported
if we change the group on all linked refs.
Bug: T375156
Change-Id: I220850edae58097e09616a4b100878513767deae
I could add some simplifications to reduce the complexity of the
tests a bit. I also fixed the test for the change handler. Seems
it did not work that way before.
Also some minor random doc fixes.
Change-Id: If1530a815ea126c38c3a55f3d52e3ca482059840
Making sure that change events form the fields are handled in the
panel and forwarded to the dialog with the information needed.
Also slighly moving some calls in the setup process that inits
the dialog and removing some duplication. Calling focus on the
edit panel only makes sense in the ready step. Not during setup.
Bug: T369005
Change-Id: I4f9a022a06ec6543b106620eae030235b8f6712b
That's another step to separate the editing form the dialog. The dialog should not know about internals of the edit panel.
And eventually the dialog can get rid of the referenceModel property.
Bug: T369005
Change-Id: I9cf3a68ef58bc5791497af362c0572734e4bcadd
There's no need to populate and use the form fields when we're
reusing a reference. The group and content are already stored
in the model and we can insert more directly.
I found that it's also not needed to update the internal item
because we're not changing the content or group. The same is done
in Citoid when reusing a reference.
Bug: T369003
Change-Id: I57315aafb73b0cd68a0d397d2f79833ac54a7c7f
Mainly leaving out the event handling for the change detection to
still keep it simple.
Also the data flow back for editing the content is still somewhat
opaque because the relevant data is passed by reference. I might
change that in follow up patches so it's more clear.
Bug: T369005
Change-Id: I93b62791ef10bf318697905af8a0c5b5d438fdb5
First step to move the UI parts that are relevant for creating,
editing (and extending) a reference to it's own class.
There remains some duplication because of the sub-referencing in
Citoid currently depending on the static properties to build its
own editing interface.
More patches follow, I just wanted to keep it small for reviewers.
Bug: T369005
Change-Id: I8588cde1a54cd505a57a36ed97fc591653c9fb6f