Download & Extend

Hovertip config setting for delay and attribute

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

Status:needs review» reviewed & tested by the community

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

Status:reviewed & tested by the community» needs review

Here you go. The patch should work but I haven't tested it.

AttachmentSize
hovertip_config_delay.patch 1.32 KB

#4

Fixed a spacing typo

AttachmentSize
hovertip_config_delay_2.patch 1.32 KB

#5

Status:needs review» reviewed & tested by the community

patch applies cleanly on latest dev
and works as expected