User tests: Successful: Unsuccessful:
Pull Request for Issue #18843 and only for J3 .
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 showonInitialised
that sets while showon initialisation.
Make sure showon
still 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-initialised
showon works,
the showon field do not have data-showon-initialised
showon works,
the showon field do have data-showon-initialised
attribute
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript |
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.Showon.initilise
to be called like Joomla.Showon.initilise(field)
. The initialise in J4 could be a function in the Class with this code (the refactoring should be straight forward):
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,
there already event stuff for such thing:
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
It can be safely closed, depend what @HLeithner will decide
@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.
would be cool if we have the double initialization added in this pr too
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.
It also introduces a new API endpoint so 3.10 is a better target.
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"
Labels |
Added:
?
|
Title |
|
Okay, so, I have backport Joomla 4 'joomla:updated' stuff for showon, now it can be more easy for transition.
And added Joomla.Showon.initilise
as @dgrammatiko suggested, later I will make pull for J4.
Testing the same, make sure showon
still work.
Please someone change target branch to joomla-10, or I have to make new PR?
Title |
|
Category | JavaScript | ⇒ | Layout Libraries External Library JavaScript Front End Plugins Unit Tests |
well, I just broke PR
need some time to fix
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
Labels |
Added:
?
?
|
I updated your branch you only need to pull from github again.
but yes you can simple merge 3.10-dev into your branch
okay, thanks
@HLeithner Now the PR shows more changes than only those from @Fedik . It shows the changes which meanwhile have been made in the staging branch since the last upmerge of staging into 3-10-dev. So maybe it's easier just to redo the PR for 3.-10-dev?
@richard67 or we can wait when staging
will be merged in to 3-10-dev :)
Title |
|
Yes, that will also work.
I will upmerge staging
Labels |
Added:
?
Removed: ? |
Category | JavaScript Layout Libraries External Library Front End Plugins Unit Tests | ⇒ | JavaScript |
so now it's ok again
Yes, looks ok now.
Labels |
Removed:
?
|
Title |
|
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Build | staging | ⇒ | 3.10-dev |
@zero-24 good question, I have no idea ;)
Do we have any documentation about showon
API somwhere? if no, then maybe we need to add.
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
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-01-22 19:26:36 |
Closed_By | ⇒ | zero-24 | |
Labels |
Added:
?
Removed: ? |
@Fedik #18843 can be closed, right?