? Failure

User tests: Successful: Unsuccessful:

avatar machadoug
machadoug
29 Nov 2017

I'm testing my extensions with Joomla 4.0 and I noticed a couple of styling issues with the options from the XML files.

The Lists requires two clicks in order to select an option, therefore when we have up to 4 options we always use radio buttons in order to improve usability. However the class="btn-group" is not working properly.

Example XML Code

<field name="gmaps_linkToGoogleEarth" type="radio" default=""
		class="btn-group" useglobal="true"
		description="CE_GMAPS_LINK_OUTPUT_DESC">
	<option value="gmaps">CE_GMAPS_LINK_OUTPUT_OPT_GOOGLE_MAPS</option>
	<option value="gearth">CE_GMAPS_LINK_OUTPUT_OPT_GOOGLE_EARTH</option>
</field>

Expected result

XML options using useglobal=true in Joomla 3.8
Image of XML options using useglobal=true in Joomla 3.8

Actual result

XML options using useglobal=true in Joomla 4.0 Alpha2
Image of XML options using useglobal=true in Joomla 4.0 Alpha2

Result after proposed changes

Image of XML options using useglobal=true in Joomla 4.0 Alpha2 after proposed changes

Solution

Add the CSS code .btn-group.radio{display:inline-block} to
joomla-cms/templates/cassiopeia/css/template.min.css

Also, the Use global should be blue (Bootstrap primary class), therefore we need to remove the btn-outline-primary class from the label.

avatar machadoug machadoug - open - 29 Nov 2017
avatar machadoug machadoug - change - 29 Nov 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 29 Nov 2017
Category Administration Templates (admin) JavaScript
avatar machadoug machadoug - change - 29 Nov 2017
Labels Added: ?
avatar brianteeman
brianteeman - comment - 29 Nov 2017

Obviously the switcher doesnt support more than two options or it wouldnt be a switch

avatar machadoug machadoug - change - 29 Nov 2017
The description was changed
avatar machadoug machadoug - edited - 29 Nov 2017
avatar C-Lodder
C-Lodder - comment - 29 Nov 2017

Grouped buttons will derive from custom elements, so probably not muh point in trying to fix this here

avatar Bakual
Bakual - comment - 29 Nov 2017

@brianteeman This is not about the switcher. It's about radio buttons (button groups). The switcher uses the class "switcher".

avatar machadoug
machadoug - comment - 29 Nov 2017

@Bakual , I wrongly mentioned the switcher, therefore I removed my comments about it in order to avoid any confusion.

@C-Lodder, the template Javascript file /administrator/templates/atum/js/template.js implements grouped buttons, therefore IMHO it should be fixed here.

avatar dgrammatiko
dgrammatiko - comment - 29 Nov 2017

therefore IMHO it should be fixed here.

Nope! That code was wrongly put there it belongs to the field that actually renders those inputs. We'll fix this when we'll move the code to the custom elements. On our todo list

avatar machadoug
machadoug - comment - 29 Nov 2017

@dgt41 great to know. Thanks.
Anyway the Javascript code needs updating in order to display correctly the colors. In my last change to administrator/templates/atum/js/template.js I've fixed the colors based on the value.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Dec 2017

We'll fix this when we'll move the code to the custom elements.

@dgt41 Can this Pull Request be closed?

avatar franz-wohlkoenig franz-wohlkoenig - change - 9 Dec 2017
Status Pending Information Required
avatar dgrammatiko
dgrammatiko - comment - 10 Dec 2017

@franz-wohlkoenig nope, let's get some tests and merge this. Later on we'll move the code where it rightfully belongs

avatar franz-wohlkoenig franz-wohlkoenig - change - 24 Dec 2017
Status Information Required Pending
avatar brianteeman
brianteeman - comment - 9 Aug 2018

@dgrammatiko what is the status here?

avatar C-Lodder
C-Lodder - comment - 9 Aug 2018

I believe this will throw the error:

Undefined variable 'j'

Seeing as the addition for loop was removed where this variable was declared

avatar sanderpotjer
sanderpotjer - comment - 5 May 2019

@wilsonge @franz-wohlkoenig no activity for over a year. Suggesting to close this one.

@machadoug thanks for your PR! If you would like to get this in Joomla I recommend opening a new PR against the latest 4.0-dev branch.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 May 2019

closed as stated above.

avatar franz-wohlkoenig franz-wohlkoenig - change - 5 May 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-05-05 14:01:23
Closed_By franz-wohlkoenig
Labels Removed: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - close - 5 May 2019

Add a Comment

Login with GitHub to post a comment