[Phpmyadmin-devel] qTip usage for more reusable code

Aris Feryanto aris_feryanto at yahoo.com
Tue Aug 9 05:46:31 CEST 2011


> From: Tyron Madlener <tyronx at gmail.com>

> 
> On Fri, Aug 5, 2011 at 8:01 PM, Aris Feryanto <aris_feryanto at yahoo.com> 
> wrote:
>>> From: Aris Feryanto <aris_feryanto at yahoo.com>
>>> 
>>> Hi Tyron,
>>> 
>>> On 20 Jul 2011, at 17:12, Tyron Madlener <tyronx at gmail.com> wrote:
>>> 
>>>> I have a good idea in this regard. When we have all 
> "Hint"-tooltips
>>>> centralized, we could easily add a config setting to disable all 
> hint
>>>> tooltips. That might be very convenient for advanced users.
>>>> 
>>> 
>>> I agree with you. Advanced users may not want to see the hints everytime 
> they use phpMyAdmin. I'll try to add this configuration after I finish the 
> grid editing feature.
>>> 
>> 
>> 
>>  I added new configuration for this 
> (commit 0e39df6ca4b2d9e129e301b9f17c5eb1d57ad851 in my git). It is configurable 
> in Settings -> Features -> General -> Show hint. This configuration 
> affect all tooltips created with PMA_createqTip() function. I added this 
> configuration both for user preference and setup page.
>> 
> 
> I took the freedom to improve PMA_createqTip() in my branch:
> 
> - Style information has moved into 2 css classes that are now defined
> in theme_right.css.php
> - The tooltip now looks more similar to the initial tooltip you've
> built (that was quite difficult I have to say)
> - I've removed the dHint class from theme_right.css.php (it was used
> by the old tooltip code)

Great! I tried this in your demo and it works well. :)

> 
> Currently I just copied the style to the original theme, anyone in the
> mood to make a fitting look for it?
> 
> About your configuration, I think you should rather set a global
> variable like "hideTooltips = true;" inside messages.php for now.
> Creating a <span class="no_hint"> element in header.inc.php and 
> then
> checking for its existence sounds like a not too good workaround.
> 


I also thought like you before. But, as the messages.php is mainly for passing translatable message to javascript, it sounds not good to place the code in there.


--
Aris Feryanto




More information about the Developers mailing list