[SOLVED] Turn off tooltip in download field

More
7 years 11 months ago - 7 years 10 months ago #62237 by agata
Hello,
I'm building a site and working with a front-end dev who writes all scripts for the site so I try to strip Joomla and other components from their own scripts as much as possible. I unset all scripts from my joomla template but that often causes JS errors. One of them is "ReferenceError: jQuery is not defined" caused by the tooltip script loading in the head
Code:
<script type="text/javascript"> jQuery(document).ready(function(){ jQuery('.hasTooltip').tooltip({"html": true,"container": "body"}); }); var _FC_GET = {"controller":"","task":"","ilayout":"pilgrimage","flexi_callview":"module","view":"item","option":"com_flexicontent","isflexicontent":"yes"}; </script>

Normally this can be solved by going to all image fields, flexicontent modules and the general flexicontent configuration and disabling loading scripts and the use of tooltips. But there's still one tooltip loading and it's from the download field and there's no option to turn it off without hacking into the code. Are you planning on adding that option or do you have any other ideas as to how to prevent that useless script from loading?
Thanks,
Agata
Last edit: 7 years 10 months ago by agata.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago - 7 years 11 months ago #62265 by ggppdk
Hello

- it is 1 thing to add the hasTooltip CSS class
- it is another thing to call Joomla code code for tooltips

so i checked where we load tooltips in frontend
will open an issue to fix

the fix that i will make, will be adding to all places :
if ( JComponentHelper::getParams('com_flexicontent')->get('add_tooltips', 1) )
Code:
// MODULES ALL GOOD modules\mod_flexiadvsearch\mod_flexiadvsearch.php(113): if ($add_tooltips) FLEXI_J30GE ? JHtml::_('bootstrap.tooltip') : JHTML::_('behavior.tooltip'); modules\mod_flexicontent\mod_flexicontent.php(186): if ($add_tooltips) FLEXI_J30GE ? JHtml::_('bootstrap.tooltip') : JHTML::_('behavior.tooltip'); modules\mod_flexifilter\mod_flexifilter.php(310): if ($add_tooltips) FLEXI_J30GE ? JHtml::_('bootstrap.tooltip') : JHTML::_('behavior.tooltip'); // FIELD, NO respect for global setting plugins\flexicontent_fields\fcpagenav\fcpagenav.php(197): JHtml::_('bootstrap.tooltip'); // FIELD, NO respect for global setting -- AND -- NO option inside field configuration plugins\flexicontent_fields\file\file.php(520): FLEXI_J30GE ? JHtml::_('bootstrap.tooltip') : JHTML::_('behavior.tooltip'); // FIELD, NO respect for global setting plugins\flexicontent_fields\image\image.php(1305): FLEXI_J30GE ? JHtml::_('bootstrap.tooltip') : JHTML::_('behavior.tooltip'); // COMPONENT Files, ALL GOOD site\flexicontent.php(285): if ( $cparams->get('add_tooltips', 1) ) ... if (FLEXI_J30GE) JHtml::_('bootstrap.tooltip'); site\classes\flexicontent.helper.php(2958): if ($cparams->get('add_tooltips', 1)) FLEXI_J30GE ? JHtml::_('bootstrap.tooltip') : JHTML::_('behavior.tooltip'); site\classes\flexicontent.helper.php(3197): if ($cparams->get('add_tooltips', 1)) FLEXI_J30GE ? JHtml::_('bootstrap.tooltip') : JHTML::_('behavior.tooltip'); // ITEM VIEW, NO respect for global setting site\views\item\view.html.php(576): FLEXI_J30GE ? JHtml::_('bootstrap.tooltip') : JHTML::_('behavior.tooltip');

[EDIT]
- the item view case above, is the item form , and it does not check for component setting, it is better to leave the item form to load tooltips


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 7 years 11 months ago by ggppdk.
The following user(s) said Thank You: agata

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #62269 by agata
Hi, yes I don't mind the additional class, what causes problems is the script that I pasted in my initial post (it generates a JS error if I'm not loading jQuery). It normally doesn't cause any particular problems but I'd still like to avoid having JS errors on the site.
Let me know once the fix is released.
Thanks,
Agata

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #62270 by ggppdk
Hello

i already applied the fix locally, i will commit later today

you can test tomorrow from this branch:
github.com/FLEXIcontent/flexicontent-cck/tree/3.0.x-stable


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
The following user(s) said Thank You: agata

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago - 7 years 10 months ago #62664 by agata
Hello,
I just noticed a bug in the version you recommended for me in your previous post. Looks like if I try to add an image to an item and I choose from the ones that have already been uploaded, the image gets lost after I save (the field is empty). Only uploading a new (duplicate) image works. I tested it on 2 sites with consistent results. I had to revert back to 3.0.14-rc2a.
Best,
Agata
Last edit: 7 years 10 months ago by agata.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #62665 by ggppdk


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
The following user(s) said Thank You: agata

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.567 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline