? Success

User tests: Successful: Unsuccessful:

avatar okonomiyaki3000
okonomiyaki3000
25 Oct 2016

Pull Request for Issue # .

Summary of Changes

Before:

Each instance of CodeMirror has an initialization function specific to its id which runs on page load. This doesn't work for CodeMirror instances that should appear within subforms since they may not exist when the page loads and their ids are added dynamically.

After:

One function to initialize any and all instances of CodeMirror. Runs once on page load and again on subform-row-add so that CodeMirror will work when placed in a subform.

Testing Instructions

Use CodeMirror without subform and expect it to work as usual.
Create a form with an editor field in a repeatable subform. Before this change, you should get only a plain textarea. After, you should get a fully functional CodeMirror for each row you add.

Documentation Changes Required

Nope

avatar okonomiyaki3000 okonomiyaki3000 - open - 25 Oct 2016
avatar okonomiyaki3000 okonomiyaki3000 - change - 25 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Oct 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 25 Oct 2016
Category Front End Plugins
avatar okonomiyaki3000
okonomiyaki3000 - comment - 26 Oct 2016

Thanks for the tips. I didn't realize .find() was slightly faster than passing a context. I'm gonna stick with the data attribute. Just seems simpler and more elegant than Joomla options storage in this case.

avatar okonomiyaki3000 okonomiyaki3000 - change - 2 Nov 2016
The description was changed
avatar Fedik
Fedik - comment - 20 Nov 2016

I have tested this item successfully on f0f3407


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12542.

avatar Fedik Fedik - test_item - 20 Nov 2016 - Tested successfully
avatar joomla-cms-bot joomla-cms-bot - change - 22 Nov 2016
Category Front End Plugins Layout Front End Plugins Unit Tests
avatar okonomiyaki3000
okonomiyaki3000 - comment - 22 Nov 2016

Updated so that 'chosen' fields also work in the same way.

avatar Fedik
Fedik - comment - 22 Nov 2016

can we please split the things? ?

Here do the fix only for CodeMiror and Chosen do separately, as there already some tricky code to init chosen https://github.com/joomla/joomla-cms/blob/staging/media/system/js/subform-repeatable-uncompressed.js#L230 and it need to be removed if there a better way to do it.

avatar joomla-cms-bot joomla-cms-bot - change - 24 Nov 2016
Category Front End Plugins Layout Unit Tests Front End Plugins
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 May 2017

@okonomiyaki3000 can this be tested using com_fields?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 29 May 2017

@franz-wohlkoenig I don't know. I'm not very familiar with com_fields. Can it create repeatable subforms?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 10 Apr 2018

Come on now.

avatar Quy
Quy - comment - 20 Apr 2018

I have tested this item successfully on 05fa601


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12542.

avatar Quy Quy - test_item - 20 Apr 2018 - Tested successfully
avatar zero-24
zero-24 - comment - 22 Apr 2018

I have tested this item successfully on 05fa601


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12542.

avatar zero-24 zero-24 - test_item - 22 Apr 2018 - Tested successfully
avatar zero-24 zero-24 - change - 22 Apr 2018
The description was changed
Status Pending Ready to Commit
avatar zero-24 zero-24 - edited - 22 Apr 2018
avatar zero-24 zero-24 - edited - 22 Apr 2018
avatar mbabker mbabker - change - 22 Apr 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-04-22 15:47:45
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 22 Apr 2018
avatar mbabker mbabker - merge - 22 Apr 2018

Add a Comment

Login with GitHub to post a comment