From 1c7ccfdc924b65a3df520ff672c3aee5d808fb04 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 2 Jan 2014 13:51:13 +0100 Subject: [PATCH] Larger clickable space for checkboxes. Possibly fixes owncloud/#326. --- css/contacts.css | 17 ++++++++++------- js/app.js | 6 ++++++ templates/contacts.php | 6 ++++-- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/css/contacts.css b/css/contacts.css index 7906b964..db536416 100644 --- a/css/contacts.css +++ b/css/contacts.css @@ -7,9 +7,9 @@ } #content li { cursor: default; } #contactsHeader input[type=checkbox] { - margin-top: 4px; - margin-left: 17px; - margin-right: 18px; + position: absolute; + top: 18px; + left: 18px; } #content input[type=radio] { width: 12px; height: 12px; @@ -673,14 +673,11 @@ fieldset.adr ul li input.label { margin-top: -4px !important; } vertical-align: middle; margin-bottom: 2px; } -#contactsHeader .toggle { - margin: 0 15px; - opacity: 1; -} #contactsHeader select { width: auto; max-width: 120px; height: 22px; + margin-left: 50px; font-weight: normal; color: black; border: 0; @@ -777,6 +774,12 @@ tbody tr.contact.active, tbody tr.contact:hover { position: absolute; z-index: 1; } +#contactlist tbody > tr > td.name > input[type=checkbox] + label, #select_all + label { + height: 50px; + position: absolute; + width: 50px; + z-index: 5; +} #contactlist tbody > tr:hover > td.name > input[type=checkbox]:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; } diff --git a/js/app.js b/js/app.js index 87b14eab..9cca80e1 100644 --- a/js/app.js +++ b/js/app.js @@ -809,6 +809,12 @@ OC.Contacts = OC.Contacts || { self.showActions(['toggle', 'add', 'download', 'groups', 'delete', 'favorite', 'merge']); } }); + + this.$contactList.on('click', 'label', function(event) { + var id = $(this).attr('for'); + $(id).prop('checked', !checkBoxes.prop('checked')); + return false; // Prevent opening contact + }); this.$sortOrder.on('change', function() { $(this).blur().addClass('loading'); diff --git a/templates/contacts.php b/templates/contacts.php index 168c3c4d..5189f5d0 100644 --- a/templates/contacts.php +++ b/templates/contacts.php @@ -67,7 +67,8 @@ - + +