mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
@@ -175,18 +175,22 @@ app.cacheBuster = null;
|
|||||||
app.createUserTooltips = function(els) {
|
app.createUserTooltips = function(els) {
|
||||||
els = els || $('body');
|
els = els || $('body');
|
||||||
els.find('img[title].teaser-pic,img[title].user-img,div.user-icon,span.user-icon').each(function() {
|
els.find('img[title].teaser-pic,img[title].user-img,div.user-icon,span.user-icon').each(function() {
|
||||||
|
if (!utils.isTouchDevice()) {
|
||||||
$(this).tooltip({
|
$(this).tooltip({
|
||||||
placement: 'top',
|
placement: 'top',
|
||||||
title: $(this).attr('title')
|
title: $(this).attr('title')
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
app.createStatusTooltips = function() {
|
app.createStatusTooltips = function() {
|
||||||
|
if (!utils.isTouchDevice()) {
|
||||||
$('body').tooltip({
|
$('body').tooltip({
|
||||||
selector:'.fa-circle.status',
|
selector:'.fa-circle.status',
|
||||||
placement: 'top'
|
placement: 'top'
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
app.replaceSelfLinks = function(selector) {
|
app.replaceSelfLinks = function(selector) {
|
||||||
@@ -332,22 +336,28 @@ app.cacheBuster = null;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$('#header-menu li a[title]').each(function() {
|
$('#header-menu li a[title]').each(function() {
|
||||||
|
if (!utils.isTouchDevice()) {
|
||||||
$(this).tooltip({
|
$(this).tooltip({
|
||||||
placement: 'bottom',
|
placement: 'bottom',
|
||||||
title: $(this).attr('title')
|
title: $(this).attr('title')
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!utils.isTouchDevice()) {
|
||||||
$('#search-form').parent().tooltip({
|
$('#search-form').parent().tooltip({
|
||||||
placement: 'bottom',
|
placement: 'bottom',
|
||||||
title: $('#search-button i').attr('title')
|
title: $('#search-button i').attr('title')
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!utils.isTouchDevice()) {
|
||||||
$('#user_dropdown').tooltip({
|
$('#user_dropdown').tooltip({
|
||||||
placement: 'bottom',
|
placement: 'bottom',
|
||||||
title: $('#user_dropdown').attr('title')
|
title: $('#user_dropdown').attr('title')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
app.handleSearch = function () {
|
app.handleSearch = function () {
|
||||||
var searchButton = $("#search-button"),
|
var searchButton = $("#search-button"),
|
||||||
|
|||||||
@@ -237,6 +237,10 @@
|
|||||||
return ((nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1) && !(nua.indexOf('Chrome') > -1));
|
return ((nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1) && !(nua.indexOf('Chrome') > -1));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isTouchDevice: function() {
|
||||||
|
return 'ontouchstart' in document.documentElement;
|
||||||
|
},
|
||||||
|
|
||||||
findBootstrapEnvironment: function() {
|
findBootstrapEnvironment: function() {
|
||||||
//http://stackoverflow.com/questions/14441456/how-to-detect-which-device-view-youre-on-using-twitter-bootstrap-api
|
//http://stackoverflow.com/questions/14441456/how-to-detect-which-device-view-youre-on-using-twitter-bootstrap-api
|
||||||
var envs = ['xs', 'sm', 'md', 'lg'],
|
var envs = ['xs', 'sm', 'md', 'lg'],
|
||||||
|
|||||||
Reference in New Issue
Block a user