? Success

User tests: Successful: Unsuccessful:

avatar piotrmocko
piotrmocko
2 Mar 2015

Added JavaScript events,
fixed behaviour of option 'parent' - previously it was overloaded by data attribute in method addSlide,
fixed usage of option 'active' - previously there was only one active slide for all accordions while each accordion can have own active slide,
start accordion only once based on selector which is an HTML ID and should be loaded only once even if params passed to method have changed.

avatar piotrmocko piotrmocko - open - 2 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 2 Mar 2015
Labels Added: ?
avatar n9iels
n9iels - comment - 3 Mar 2015

Can you please add some test instructions so we can test this patch?

avatar piotrmocko
piotrmocko - comment - 3 Mar 2015

Here is a test code

<?php
echo JHtml::_('bootstrap.startAccordion', 'accordion1', array('parent' => true, 'active' => 'accordion1-slide1'
    , 'onShow' => 'function(){console.log("onShow")}'
    , 'onShown' => 'function(){console.log("onShown")}'
    , 'onHide' => 'function(){console.log("onHide")}'
    , 'onHidden' => 'function(){console.log("onHidden")}'
    ));

echo JHtml::_('bootstrap.addSlide', 'accordion1', 'Accordion 1 Slide 1', 'accordion1-slide1');
echo 'Slide 1 content. Activated on load';
echo JHtml::_('bootstrap.endSlide');

echo JHtml::_('bootstrap.addSlide', 'accordion1', 'Accordion 1 Slide 2', 'accordion1-slide2');
echo 'Slide 2 content. Hides other slides when opening another one.';
echo JHtml::_('bootstrap.endSlide');

echo JHtml::_('bootstrap.endAccordion');


echo JHtml::_('bootstrap.startAccordion', 'accordion2', array('parent' => false, 'active' => 'accordion2-slide2'));

echo JHtml::_('bootstrap.addSlide', 'accordion2', 'Accordion 2 Slide 1', 'accordion2-slide1');
echo 'Slide 1 content. Does not hide other slides when opening another one.';
echo JHtml::_('bootstrap.endSlide');

echo JHtml::_('bootstrap.addSlide', 'accordion2', 'Accordion 2 Slide 2', 'accordion2-slide2');
echo 'Slide 2 content. Activated on load';
echo JHtml::_('bootstrap.endSlide');

echo JHtml::_('bootstrap.endAccordion');


echo JHtml::_('bootstrap.startAccordion', 'accordion3');

echo JHtml::_('bootstrap.addSlide', 'accordion3', 'Accordion 3 Slide 1', 'accordion3-slide1');
echo 'Slide 1 content. Does not open on load. Does not hide other slides when opening another one.';
echo JHtml::_('bootstrap.endSlide');

echo JHtml::_('bootstrap.addSlide', 'accordion3', 'Accordion 3 Slide 2', 'accordion3-slide2');
echo 'Slide 2 content. Does not open on load. Does not hide other slides when opening another one.';
echo JHtml::_('bootstrap.endSlide');

echo JHtml::_('bootstrap.endAccordion');
avatar n9iels
n9iels - comment - 3 Mar 2015

@test I tested this patch by copy-past the test code in the article view on front-end. Looks good for me, thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6267.
avatar n9iels n9iels - test_item - 3 Mar 2015 - Tested successfully
avatar n9iels
n9iels - comment - 3 Mar 2015

Please correct this to, and Travis should be happy :-)

FILE: /home/travis/build/joomla/joomla-cms/libraries/cms/html/bootstrap.php
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 3 WARNING(S) AFFECTING 3 LINE(S)
--------------------------------------------------------------------------------
 586 | WARNING | Line exceeds 150 characters; contains 176 characters
 588 | WARNING | Line exceeds 150 characters; contains 172 characters
 677 | WARNING | Line exceeds 150 characters; contains 182 characters
--------------------------------------------------------------------------------
avatar n9iels
n9iels - comment - 4 Mar 2015

Thanks for chancing! One more test needed over here :smiley:

avatar zero-24 zero-24 - change - 7 Mar 2015
Category JavaScript
avatar matrikular
matrikular - comment - 15 Mar 2015

@test ok -ish

Where before the patch, all opened tabs in each accordion would be closed regardless of the options set, each but the last accordion will react as described after the patch, including firing those events.

That said, I might have missed something or the description in each accordion 3 tab doesn't match the actual bebahvior. I would have expected this (Accordion 3):
Slide 1 content. Does not open on load. Does not hide other slides when opening another one.
Slide 2 content. Does not open on load. Does not hide other slides when opening another one.

If that is the intended behavior, and the description just cosmetics - it's all good.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6267.
avatar matrikular matrikular - test_item - 15 Mar 2015 - Tested successfully
avatar zero-24 zero-24 - change - 15 Mar 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 15 Mar 2015

Thanks for testing and coding! Moving this now to RTC!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6267.
avatar piotrmocko
piotrmocko - comment - 15 Mar 2015

@matrikular you are right. I have made an error in 3-rd accordion description. It should be: Does not open on load. Does not hide other slides when opening another one. Probably I have copied old description, but tested behaviour is correct.

avatar brianteeman brianteeman - change - 27 Mar 2015
Labels Added: ?
avatar zero-24 zero-24 - close - 14 Apr 2015
avatar roland-d roland-d - change - 14 Apr 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-04-14 21:21:12
avatar roland-d roland-d - close - 14 Apr 2015
avatar roland-d roland-d - close - 14 Apr 2015
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment