? ? Pending

User tests: Successful: Unsuccessful:

avatar okonomiyaki3000
okonomiyaki3000
24 Apr 2018

Pull Request for Issue # .

Summary of Changes

This is just #12544 plus some additional improvements.
While that older PR was aimed only at fixing the "strict" errors, this one fixes other problems.
In particular, button groups (radio buttons) will now work properly when used inside of subforms.
Same for Chosen selectors that use coloring based on state.
Also, delegation is used to handle various events. This has several benefits.

This is only a rewrite of the first part of this file. There is likely much more that can be improved.

Testing Instructions

This file only affects the administrator when using the Isis template so use that.
First of all, nothing should be broken. This mainly affects Chosen, radio button groups, and tooltips. So check any pages that have those things.

The main improvements apply to subforms. Subforms with radio buttons set up as btn-group should be tested. There are probably none of these in Joomla because they didn't really work before this patch. So make one and test it. Same goes for Chosens used in subforms with the chzn-color-state class.

Expected result

When you dynamically add a subform row that contains radio buttons, Chosen, or tooltips, these things should be initialized properly in the new row. Before this patch they were not.

Actual result

Oh, it works.

Documentation Changes Required

Probably not. Unless there were previously some documented warnings about using radio buttons or Chosens in subforms. If so, those warnings may be deleted as they will no longer apply.

avatar okonomiyaki3000 okonomiyaki3000 - open - 24 Apr 2018
avatar okonomiyaki3000 okonomiyaki3000 - change - 24 Apr 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2018
Category JavaScript Administration Templates (admin)
avatar okonomiyaki3000
okonomiyaki3000 - comment - 24 Apr 2018

If you want to test subforms, there's one here: plugins/system/redirect/form/excludes.xml
This creates a repeatable subform in the Redirect plugin config. If you add some fields this file, you can easily test that they are working properly.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 24 Apr 2018

This 'drone' failure seems to have nothing at all to do with these changes.

avatar Quy
Quy - comment - 24 Apr 2018

Can you confirm that this addresses the same things as #19722?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 24 Apr 2018

@Quy This PR addresses the Isis template only, #19722 addresses beez3 and protostar as well. Since this one is on top of #12544, it also includes the "strict" fixes which really should have been merged by now. Other than that, it's really an issue of which adds more overhead and complexity to the code and which one reduces it. I'll recuse myself from sharing any opinion on that matter.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 24 Apr 2018

I've created #20224 and #20225 to fix the same issues in Beez3 and Protostar. These three together are an alternative to #19722

avatar Sophist-UK
Sophist-UK - comment - 24 Apr 2018

As the author of #19722 I am happy to close my PR, and for this PR and #20224 / #20225 to replace them - though I hope @okonomiyaki3000 will consider and include my recent comments in #19722.

avatar dgrammatiko
dgrammatiko - comment - 24 Apr 2018

Just few comments here:

  • First of all thanks for this PR
  • The js functionality for the group buttons does not belong to the template, it must be triggered in the layout of the checkboxes (or whatever the layout name is that renders those buttons). These are joomla fields and the js should be there!
  • Unfortunately this cannot be done in J3 without risking breaking a lot of components/plugins/modules
  • For J4 these buttons (as all the rest of the fields) will be done using custom elements (one of the good things with this approach is that we don't need and coupling [events or callback] for the subform)
  • It would be greatly appreciated if you can do a PR against 4.0-dev to remove the jQuery dependency and make this a custom element and also couple it to the actual layout. That is already in our todo list: #19427
avatar Quy
Quy - comment - 24 Apr 2018

Is is also possible to include/fix "modal" type as reported in #11805?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 25 Apr 2018

@Quy It's not appropriate to include it in this PR but yes, I can fix that.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 25 Apr 2018

LOL, wait.... This is going to take more than most of these. I better jump in over there but please don't think of it as related to this PR and don't expect the fix very soon.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 25 Apr 2018

What are we gonna do about this drone failure? Is this for real? I don't buy it.

avatar okonomiyaki3000 okonomiyaki3000 - change - 25 Apr 2018
Labels Added: ?
avatar okonomiyaki3000
okonomiyaki3000 - comment - 25 Apr 2018

Just make it run again. I bet it works this time.

avatar Quy
Quy - comment - 28 Apr 2018

OK to close #12544 ?

avatar infograf768
infograf768 - comment - 15 May 2018

Drone restarted

avatar okonomiyaki3000
okonomiyaki3000 - comment - 15 May 2018

I don't know why this would fail. This PR has nothing to do with jquery.ui.sortable or whatever.

avatar viocassel
viocassel - comment - 2 Jun 2018

I have tested this item successfully on 5e66f87


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

avatar viocassel viocassel - test_item - 2 Jun 2018 - Tested successfully
avatar roland-d
roland-d - comment - 24 Jul 2018

@okonomiyaki3000 I only noticed this PR after merging #12544 and I think because of that merge we have a conflict now. Could you update this PR please?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 25 Jul 2018

Rebased with latest staging. Should be correct.

avatar roland-d
roland-d - comment - 25 Jul 2018

@kneisel @FPerisa Can you please test this one also? Thank you.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 26 Jul 2018

Don't believe appveyor, it just timed out.

avatar FPerisa FPerisa - test_item - 8 Aug 2018 - Tested successfully
avatar FPerisa
FPerisa - comment - 8 Aug 2018

I have tested this item successfully on 1a09ee9

Subforms are working with this patch, even when I click on the plus.

For testing I added this to excludes.xml:

<field name="myradiovalue"
       type="radio"
       default="0"
       label="Select an option"
       class="btn-group">
   <option value="0">1</option>
   <option value="1">2</option>
</field>
<field name="myselectvalue"
       type="list"
       default="0"
       label="Select an option"
       class="chzn-color-state">
   <option value="0">nimm</option>
   <option value="1">mich</option>
   <option value="2">nicht</option>
</field>
```<hr /><sub>This comment was created with the <a href="https://github.com/joomla/jissues">J!Tracker Application</a> at <a href="https://issues.joomla.org/tracker/joomla-cms/20221">issues.joomla.org/tracker/joomla-cms/20221</a>.</sub>
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Aug 2018

@viocassel can you please retest?

avatar viocassel viocassel - test_item - 8 Aug 2018 - Tested successfully
avatar viocassel
viocassel - comment - 8 Aug 2018

I have tested this item successfully on 1a09ee9

It works ?


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

avatar Quy Quy - change - 8 Aug 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 8 Aug 2018

RTC


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

avatar mbabker mbabker - close - 9 Aug 2018
avatar mbabker mbabker - merge - 9 Aug 2018
avatar mbabker mbabker - change - 9 Aug 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-08-09 12:49:51
Closed_By mbabker
Labels Added: ?

Add a Comment

Login with GitHub to post a comment