Posted by HylkeVDS on September 18, 2009 at 1:39pm
| Project: | Hovertips and Clicktips |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Issue Summary
Hi,
The javascript uses a nice config var for settings attribute name and delays, but you can't override this variable without editing the file itself. By changing one line you can make the hovertipConfig settable from the already implemented settings page:
line 387, 465 and 504:
var hovertipConfig = window.hovertipConfig ? window.hovertipConfig : {'attribute':'hovertip',
'showDelay': 300,
'hideDelay': 700};
After that you can add
window.hovertipConfig = {'attribute':'hovertip', 'showDelay': 600, 'hideDelay': 300};
to the hoovertip settings page to override the defaults.
Comments
#1
Yeh this works well.
Just a note that the code in hovertip settings should look like:
// initialize tooltips in a separate thread$(document).ready(function() {
window.setTimeout(hovertipInit, 1);
window.hovertipConfig = {'attribute':'hovertip', 'showDelay': 100, 'hideDelay': 100};
});
#2
Thx. Can you make this an actual patch?
#3
Here you go. The patch should work but I haven't tested it.
#4
Fixed a spacing typo
#5
patch applies cleanly on latest dev
and works as expected