hello Gregory

I did a little testing, and I know what's the problem. The error occurs if
you have but one dam handler. If you look
at info.magnolia.module.templatingkit.dam.dialog.DialogDAM line 107 you see
that the radio control is only rendered when there is more than one dam
handler, and the label and description properties as set in the relevant
dialog are set on the radio control.

So it's alright to not show the radio control with one handler, but
something is missing. The label and dialog should be set on...? And here it
becomes a bit tricky, as DialogDam supports multiple subs. If you would have
one sub, label and description could be set on that. Now that simplicity is
not available.

I am curious to know what you think.

By the way, I think I will fix it for us in this fashion:
-if there is more than one handler (doesn't happen with us): show the radio
-if there is one handler: put the label and description on the first (and
only in our case) sub control.

regards,

Ernst

2011/3/8 GrĂ©gory Joseph <[email protected]>

>
> Hey Ernst,
>
> Hmm.. we're not sure what the problem is. A few observations - see
> https://img.skitch.com/20110308-9nutwd52e2gk8i6an9jdw7fnm.jpg for
> reference.
> * Label of the "main" control can be changed. (red)
> * The "main" control currently can't have a description. I consider this a
> bug (blue)
> * The handler-specific label/description are indeed "shared" accross the
> controls (green, although this particular screenshot was made with a
> different handler selected in each control, thus NOT really demonstrating
> this valid point :-D)
>
> Just for the record, here's how we just tested this:
> https://img.skitch.com/20110308-mhy8rrr5a22wu6k7gaygxgr2xn.png
>
> Now - I'm supposing this isn't your problem. Can you clarify ?
>
> -g
>
> On 02 Mar 2011, at 16:58, Ernst Bunders wrote:
>
> > Hi all
> >
> > We use the openminds simple media module for all our sites, and we do
> this by means of the simple media dam integration.
> > This is all right, but one thing has been bothering me: All the controls
> show the same label and description in the dialog, no matter what you set in
> the dialog configuration.
> >
> > This is rather annoying, specially if you have dialogs with more than one
> image. For instance: we sometimes have headers with a background image, and
> a logo image, and those should be set in the page info dialog. So we have
> two dam controls both faithfully saying: "select image", which could be a
> bit confusing for site editors.
> >
> > Today I had some time, and decided to see why this is. So I first put a
> breakpoint at
> net.sourceforge.openutils.mgnlmedia.media.dialog.DialogSelectMedia#init and
> followed the call stack up.
> >
> > I found what i was looking for in
> info.magnolia.module.templatingkit.dam.dialog.DialogDAM#loadSubs where all
> the configured controls for the dam handler are instantiated and added as
> subs. The config node that is passed in our case is
> config:/modules/extended-templating-kit/config/sites/geschiedenis/damSupport/handlers/media/controls/MediaUUID
> >
> > The configuration that was injected into DialogDam#init is not used at
> all.
> >
> > What is slightly surprising to me is that you can register more than one
> control for a dam handler, especially since controls can have subs, so if
> you need more than one control for a specific handler, you can wrap it in a
> container control. A consequence of this architecture is that it is no
> longer logical to somehow merge the control config that was provided to the
> init method and the static control config from the dam handler
> configuration. Yet this is pretty much what i would expect.
> >
> > Until now I had considered this a bug, but now i see this is actually
> sane behavior, given the choice tho allow more than one control for dam
> handlers.
> >
> > I now feel inclined towards creating my own extension of DialogDam, and
> make the following changes:
> > - allow one control only
> > - merge the 'local' control configuration with the 'global' configuration
> using something like info.magnolia.cms.util.ExtendingContentWrapper
> >
> > I guess there are a few properties you don't want to override, like
> > - controlType
> > - type
> > -...
> >
> > I wonder what you guys at Magnolia think about this. It is a bit weird to
> show the same label and descripion on all dam controls. Do you feel it's a
> problem, and would you agree with my solution?
> >
> > regards,
> >
> > Ernst
> >
> >
> > --
> > Ernst Bunders
> > Ontwikkelaar VPRO
>
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
>
>


-- 
Ernst Bunders
Ontwikkelaar VPRO


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to