Don't show tooltips on touch input devices (this closes #67)

This commit is contained in:
Bernd Bestel 2018-09-27 13:33:03 +02:00
parent b2019ba42d
commit 596dc9e36d
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 18 additions and 0 deletions

View File

@ -31,3 +31,13 @@ GetUriParam = function(key)
}
}
};
IsTouchInputDevice = function()
{
if (("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch)
{
return true;
}
return false;
}

View File

@ -91,6 +91,14 @@ window.FontAwesomeConfig = {
searchPseudoElements: true
}
// Don't show tooltips on touch input devices
if (IsTouchInputDevice())
{
var css = document.createElement("style");
css.innerHTML = ".tooltip { display: none; }";
document.body.appendChild(css);
}
Grocy.Api = { };
Grocy.Api.Get = function(apiFunction, success, error)
{