? Success

User tests: Successful: Unsuccessful:

avatar itbra
itbra
10 Oct 2014

The JHtmlBootstrap::tooltip() method allows for passing an array of configuration parameters. This configuration may contain a parameter for the show/hide-delay. The value of this parameter may be an integer or a string representing a Javascript object. However, the method doesn't consider the value to be anything else than a number. So, when passing in an array the delay will end up as integer 1 because its datatype is forced by explicit an cast. I extended the line where this parameter is evaluated to check for it being an array or a number. This fixes that issue and creates the script with the correct delay-value. For example:

before applying the patch

1. someview.php

JHtml::_('bootstrap.tooltip', '.hasTooltip', array(
    'delay' => array('show' => 500, 'hide' => 1000)
);

2. in JHtmlBootstrap.tooltip()
. . .
$opt['delay'] = isset($params['delay']) ? (int) $params['delay'] : null;
. . .

will set $opt['delay'] = 1;

after applying the patch

1. someview.php

JHtml::_('bootstrap.tooltip', '.hasTooltip', array(
    'delay' => array('show' => 500, 'hide' => 1000)
);

2. in JHtmlBootstrap.tooltip()
. . .
$opt['delay'] = isset($params['delay']) ? (is_array($params['delay']) ? $params['delay'] : (int) $params['delay']) : null;
. . .

will set $opt['delay'] = array('show' => 500, 'hide' => 1000); , which is wished behaviour. I reported this issue several months back at the joomlacode tracker.

avatar itbra itbra - open - 10 Oct 2014
avatar itbra itbra - change - 10 Oct 2014
Title
JHtmlBootstrap::tooltip() delay
[#33041] JHtmlBootstrap::tooltip() delay
avatar jissues-bot jissues-bot - change - 10 Oct 2014
Title
[#33041] JHtmlBootstrap::tooltip() delay
JHtmlBootstrap::tooltip() delay
Labels Added: ?
avatar jissues-bot jissues-bot - change - 10 Oct 2014
Title
JHtmlBootstrap::tooltip() delay
[#33041] JHtmlBootstrap::tooltip() delay
avatar asep16
asep16 - comment - 21 Aug 2015

I have tried in search component and worked.


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

avatar asep16 asep16 - test_item - 21 Aug 2015 - Tested successfully
avatar Blutengel89 Blutengel89 - test_item - 21 Aug 2015 - Tested successfully
avatar Blutengel89
Blutengel89 - comment - 21 Aug 2015

I have tested the patch and it works fine.


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

avatar tflm84
tflm84 - comment - 21 Aug 2015

works!


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

avatar tflm84 tflm84 - test_item - 21 Aug 2015 - Tested successfully
avatar roland-d roland-d - change - 21 Aug 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-08-21 13:33:39
Closed_By roland-d
avatar roland-d roland-d - close - 21 Aug 2015
avatar roland-d roland-d - reference | e244e33 - 21 Aug 15
avatar roland-d roland-d - merge - 21 Aug 2015
avatar roland-d roland-d - close - 21 Aug 2015
avatar roland-d roland-d - change - 21 Aug 2015
Milestone Added:

Add a Comment

Login with GitHub to post a comment