From 5eccab9295524e02de81a86766d7468cf55a405c Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Thu, 28 Dec 2023 04:16:49 +0000 Subject: Improves filter rendering on narrow screens by replacing the layout tables with a flex layout. (#39806). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Jens Krämer (@jkraemer). git-svn-id: https://svn.redmine.org/redmine/trunk@22574 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/application.js | 30 +++++++++---------- public/stylesheets/application.css | 59 ++++++++++++++++++++++++++++---------- public/stylesheets/responsive.css | 3 ++ 3 files changed, 62 insertions(+), 30 deletions(-) (limited to 'public') diff --git a/public/javascripts/application.js b/public/javascripts/application.js index e866b505a..c1b5d580d 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -127,10 +127,10 @@ function initFilters() { $('#add_filter_select').change(function() { addFilter($(this).val(), '', []); }); - $('#filters-table td.field input[type=checkbox]').each(function() { + $('#filters-table .field input[type=checkbox]').each(function() { toggleFilter($(this).val()); }); - $('#filters-table').on('click', 'td.field input[type=checkbox]', function() { + $('#filters-table').on('click', '.field input[type=checkbox]', function() { toggleFilter($(this).val()); }); $('#filters-table').on('keypress', 'input[type=text]', function(e) { @@ -177,14 +177,14 @@ function buildFilterRow(field, operator, values) { var filterValues = filterOptions['values']; var i, select; - var tr = $('').attr('id', 'tr_'+fieldId).html( - '' + - '' + + '
' + + '
' ); filterTable.append(tr); - select = tr.find('td.operator select'); + select = tr.find('.operator select'); for (i = 0; i < operators.length; i++) { var option = $('