[3.10] Joomla.Showon.initialise API, and make sure that showon initialised only once, fork of 18843#32061
Conversation
|
yeah, I have included changes from that pull |
|
@Fedik diffing the changes with the v4 version of show on I think you need to rename this to joomla-cms/build/media_source/system/js/showon.es6.js Lines 32 to 84 in d49e461 |
|
This only for J3, it should not go to J4, joomla-cms/build/media_source/system/js/showon.es6.js Lines 215 to 218 in d49e461 Only missed check for "double initialisation", I can do it later in another pull. I do not think that this patch is much needed, but people asked 😉 |
|
@Fedik would be cool if we have the double initialization added in this pr too. After 2 tests we can merge it in to 3.10 (I think that makes more sense). I don't expect another 3.9 release (hopefully). It also introduces a new API endpoint so 3.10 is a better target. |
it is here, that why I made this fork: joomla-cms/media/jui/js/cms-uncompressed.js Lines 184 to 189 in 0f5956e I meant that for J4 will be need a separted PR.
I can remove Joomla.setUpShowon and leave "event" $(document).on('subform-row-add'), I guess most people who need it already use in this way, so it will be "bug fix" 😉 |
|
Okay, so, I have backport Joomla 4 'joomla:updated' stuff for showon, now it can be more easy for transition. Testing the same, make sure Please someone change target branch to joomla-10, or I have to make new PR? |
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
|
okay, I think I need to sync with j 3.10 branch |
|
@HLeithner can I merge joomla:3.10-dev to my branch for sync? or I need make new |
|
Yes, that will also work. |
|
I will upmerge staging |
|
so now it's ok again |
|
Yes, looks ok now. |
|
I have updated testing instruction, and made same changes for joomla 4 #32069 |
|
I have tested this item ✅ successfully on 04e2d9d This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32061. |
1 similar comment
|
I have tested this item ✅ successfully on 04e2d9d This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32061. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32061. |
|
@Fedik do we need to add documentation for this change somewhere? And if so what should be documented? |
|
@zero-24 good question, I have no idea ;) Technically and partly it is a new feature, to cover edge cases from #18843 , also see comment #18843 (comment) In J4 we already have events #16016 (I backported it partly here), that handle "dynamic" content changes |
|
Ok will merge than this heree for 3.10. thanks |

Pull Request for Issue #18843 and only for J3 .
Summary of Changes
This is fork of #18843, with requested changes.
The code make sure that showon initialised only once, no mater how often Joomla.setUpShowon was called.
This is achieved with extra flag
showonInitialisedthat sets while showon initialisation.Testing Instructions
Make sure
showonstill works.Example, go to global config change "Debug Language" on/off, should downup/hides "Language Display" field.
Also the field "Language Display" will have extra attribute
data-showon-initialisedActual result BEFORE applying this Pull Request
showon works,
the showon field do not have
data-showon-initialisedExpected result AFTER applying this Pull Request
showon works,
the showon field do have
data-showon-initialisedattribute