Disable tooltips on mobile, as they add an extra click that isn't really useful and is highly annoying
This commit is contained in:
parent
0cb05436f7
commit
dfc2b562e7
1 changed files with 14 additions and 0 deletions
|
@ -49,6 +49,20 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
cfpLoadingBarProvider.includeSpinner = false;
|
||||
});
|
||||
|
||||
// Disable tooltips on touch devices.
|
||||
quayApp.config(['$tooltipProvider', function ($tooltipProvider) {
|
||||
var tooltipFactory = $tooltipProvider.$get[$tooltipProvider.$get.length - 1];
|
||||
|
||||
// decorate the tooltip getter
|
||||
$tooltipProvider.$get[$tooltipProvider.$get.length - 1] = function($window) {
|
||||
if ('ontouchstart' in $window) {
|
||||
return function() {};
|
||||
}
|
||||
|
||||
return tooltipFactory.apply(this, arguments);
|
||||
};
|
||||
}]);
|
||||
|
||||
// Configure the routes.
|
||||
quayApp.config(['$routeProvider', '$locationProvider', 'pages', function($routeProvider, $locationProvider, pages) {
|
||||
var title = window.__config['REGISTRY_TITLE'] || 'Quay.io';
|
||||
|
|
Reference in a new issue