1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-18 22:58:10 +01:00

[ticket/12155] Make the buttons bigger on touch devices.

PHPBB3-12155
This commit is contained in:
Cesar G 2014-05-16 15:27:06 -07:00
parent 84fd965272
commit 3106306a4d
4 changed files with 9 additions and 3 deletions

View File

@ -15,7 +15,7 @@ var dark = $('#darkenwrapper');
var loadingIndicator = $('#loading_indicator');
var phpbbAlertTimer = null;
var isTouch = (window && typeof window.ontouchstart !== 'undefined');
phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined');
/**
* Display a loading screen
@ -1011,7 +1011,7 @@ phpbb.resizeTextArea = function(items, options) {
resetCallback: function(item) { }
};
if (isTouch) return;
if (phpbb.isTouch) return;
if (arguments.length > 1) {
configuration = $.extend(configuration, options);

View File

@ -919,6 +919,8 @@ function parse_document(container)
$(document).ready(function() {
// Swap .nojs and .hasjs
$('#phpbb.nojs').toggleClass('nojs hasjs');
$('#phpbb').toggleClass('hastouch', phpbb.isTouch);
$('#phpbb.hastouch').removeClass('notouch');
// Focus forms
$('form[data-focus]:first').each(function() {

View File

@ -52,7 +52,7 @@
{$STYLESHEETS}
</head>
<body id="phpbb" class="nojs section-{SCRIPT_NAME} {S_CONTENT_DIRECTION} {BODY_CLASS}">
<body id="phpbb" class="nojs notouch section-{SCRIPT_NAME} {S_CONTENT_DIRECTION} {BODY_CLASS}">
<!-- EVENT overall_header_body_before -->

View File

@ -170,6 +170,10 @@ ul.linklist.bulletin li.small-icon:before {
text-indent: -9999px;
}
.hastouch .post-buttons .icon-button {
padding: 2px 8px;
}
.post-buttons span {
float: none;
margin-right: 0;