juek / CustomSections

Developer plugin for rapid prototyping of custom section types in Typesetter CMS
GNU General Public License v2.0
3 stars 7 forks source link

Trigger bunchControlLoaded event on bunch elements #62

Closed mahotilo closed 4 years ago

mahotilo commented 4 years ago

Now we trigger the CustomSection:bunchControlLoaded event for document only. When I want my controls to prepare itself before being shone, they do not receive this event.

I have added triggering CustomSection:bunchControlLoaded event for all subcontrols too. But, there may be a better way to find subcontrols than the one I use.

mahotilo commented 4 years ago

Actually, I am trying to make a simple workaround for still not implemented "password" input type. I dynamically change type="text" to type="password" when element is shown:) And this element is bunch subcontrol.

juek commented 4 years ago

Have you actually tried 'control_type' => 'password' ? I think it might work.

mahotilo commented 4 years ago

I think it might work.

It does not. I think due to these lines. https://github.com/juek/CustomSections/blob/1649aefb76a6bd880bbb1fc584c23d321aea1d06/universal_editor/editor.js#L354-L358

juek commented 4 years ago

It does not. I think due to these lines.

Ah ok. Alex did the Bunch Control. However, it should work as a regular control.

mahotilo commented 4 years ago

Year. It works. But did not as subcontrol. https://github.com/juek/CustomSections/issues/64