NetTalk Central

Author Topic: Calendar Button Tooltip  (Read 5900 times)

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Calendar Button Tooltip
« on: May 22, 2014, 10:49:07 PM »
Hi Bruce,

The Tooltips have been disabled for all tablet devices and this is working correctly except for on the Calendar Lookup buttons.

Regards,
Trent

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Calendar Button Tooltip
« Reply #1 on: May 23, 2014, 04:37:31 AM »
>> The Tooltips have been disabled for all tablet devices

is the app in "mobile mode" or did you just override the CreateTip method?

cheers
Bruce

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Calendar Button Tooltip
« Reply #2 on: May 23, 2014, 01:00:11 PM »
Hi Bruce,

The app is in desktop mode with Tooltips disabled:

WebHandler > ProcessLink:

if p_web.IsMenuTouch()
  p_web.site.NoTips = TRUE
end!If

It has to be tested on a tablet in desktop mode.

Regards,
Trent

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Calendar Button Tooltip
« Reply #3 on: May 26, 2014, 01:57:21 AM »
I'll build this into the 8.13 release, but in the short term you can do the following;

WebHandler, CreateDateInput method, before ParentCall

if p_web.site.NoTips
    p_web.SetOption(p_Options,'buttonText','')
    p_web.SetOption(p_Options,'prevText','')
    p_web.SetOption(p_Options,'nextText','')
End


Cheers
Bruce

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Calendar Button Tooltip
« Reply #4 on: May 26, 2014, 04:14:24 PM »
Hi Bruce,

Tried this but it still shows an empty tooltip on the first press.

Regards,
Trent

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Calendar Button Tooltip
« Reply #5 on: May 29, 2014, 12:57:03 AM »
yes, I've been looking at this, but unfortunately I'm not sure there's a lot that can be done.
The code which sets the tip (or "title" as it's known) is set in the jQuery-ui-xxx,js file - where the xxx part changes with each new version of the jquery-ui release. Plus the code is "minimized" which makes the code harder to find.

So, the short answer is that it's fixable, but it's a pain to fix - and more specifically a pain to keep it fixed.
So the question is - how big a deal is this for you?


trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Calendar Button Tooltip
« Reply #6 on: May 29, 2014, 02:27:42 AM »
It needs to be fixed, but now you have told me where to look I can check it tomorrow. Will post the fix here (if I fix it) :)

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Calendar Button Tooltip
« Reply #7 on: May 29, 2014, 02:07:34 PM »
Hi Bruce,

It seems that the 'buttonText' option for the Calendar widget doesn't disable the tooltip if set to blank.

Putting this in the ProcessLink embed does work:

  if p_web.IsMenuTouch()
    p_web.site.NoTips = TRUE
    p_web.Script('$(".ui-datepicker-trigger").removeAttr("title");')
  end!If

The script removes the 'title' attribute and viola! Tooltips no longer appear on the calendar buttons.

You might even be able to go a step further and remove all 'title' attributes in one go:

  p_web.Script('$(this).removeAttr("title");')

Regards,
Trent

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Calendar Button Tooltip
« Reply #8 on: May 29, 2014, 09:20:19 PM »
Hi Bruce,

Also found that Browse in-row buttons still had their tooltips showing so now the code to fix looks like:

  if p_web.IsMenuTouch()
    p_web.site.NoTips = TRUE
    p_web.Script('$(".ui-datepicker-trigger").removeAttr("title");')
    p_web.Script('$(".ui-button").removeAttr("title");')
  end!If

Regards,
Trent

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Calendar Button Tooltip
« Reply #9 on: June 04, 2014, 07:29:26 PM »
Hi Bruce,

This isn't fixed in v8.13.

Also the File Upload button still shows the tooltip as well. I've manually fixed the problems by using the below code:

    p_web.Script('$(".ui-button").removeAttr("title");')
    p_web.Script('$(".nt-fileinput-button").removeAttr("title");')
    p_web.Script('$(".ui-datepicker-trigger").removeAttr("title");')

Regards,
Trent

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Calendar Button Tooltip
« Reply #10 on: June 05, 2014, 01:38:27 AM »
Hi Trent,

Stay with this work-around for now. (And let me know if you find any more.) Unfortunately I'll need to find a better method for the code, but we may as well do them all at the same time once you've got a complete list...

Cheers
Bruce

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Calendar Button Tooltip
« Reply #11 on: June 05, 2014, 01:46:35 AM »
No worries will do!

Regards,
Trent