mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Don't show tooltips on touch input devices (this closes #67)
This commit is contained in:
parent
b2019ba42d
commit
596dc9e36d
@ -31,3 +31,13 @@ GetUriParam = function(key)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
IsTouchInputDevice = function()
|
||||
{
|
||||
if (("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user