From d0015225fc0af221a8b7799b213d942c4722fd15 Mon Sep 17 00:00:00 2001 From: Daniel Vaz Gaspar Date: Thu, 12 Oct 2023 11:23:23 +0100 Subject: [PATCH] fix: filter list UI spacing between elements (#2128) * fix: filter list UI spacing between elements * remove alerts --- flask_appbuilder/static/appbuilder/css/ab.css | 30 +++++++++++-------- flask_appbuilder/static/appbuilder/js/ab.js | 1 - .../static/appbuilder/js/ab_filters.js | 7 +++-- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/flask_appbuilder/static/appbuilder/css/ab.css b/flask_appbuilder/static/appbuilder/css/ab.css index 00995d5fa1..b14453bb11 100644 --- a/flask_appbuilder/static/appbuilder/css/ab.css +++ b/flask_appbuilder/static/appbuilder/css/ab.css @@ -1,7 +1,7 @@ .collapse.in { - display:block; - overflow: visible; + display: block; + overflow: visible; } .panel-group .panel { @@ -10,19 +10,19 @@ /* Wrapper for page content to push down footer */ .wrap { - min-height: 100%; - height: auto !important; - height: 100%; + min-height: 100%; + height: auto !important; + height: 100%; } -.fixed-footer{ - background-color: #f5f5f5; - bottom:0; - left:0; - right:0; - width:100%; - margin:auto; +.fixed-footer { + background-color: #f5f5f5; + bottom: 0; + left: 0; + right: 0; + width: 100%; + margin: auto; } @@ -31,7 +31,11 @@ th.action_checkboxes { } select { - width: 100%; + width: 100%; +} + +td.filter { + width: 50% } .cursor-hand { diff --git a/flask_appbuilder/static/appbuilder/js/ab.js b/flask_appbuilder/static/appbuilder/js/ab.js index 41416f490c..908633a613 100644 --- a/flask_appbuilder/static/appbuilder/js/ab.js +++ b/flask_appbuilder/static/appbuilder/js/ab.js @@ -17,7 +17,6 @@ function loadSelectDataSlave(elem) { elem.select2({data: {id: "",text: ""}, placeholder: "Select", allowClear: true}); } $('#' + master_id).on("change", function(e) { - var change_master_id = elem.attr('master_id'); var change_master_val = $('#' + master_id).val(); var endpoint = elem.attr('endpoint'); if (change_master_val) { diff --git a/flask_appbuilder/static/appbuilder/js/ab_filters.js b/flask_appbuilder/static/appbuilder/js/ab_filters.js index c10a745b69..6394c1f692 100644 --- a/flask_appbuilder/static/appbuilder/js/ab_filters.js +++ b/flask_appbuilder/static/appbuilder/js/ab_filters.js @@ -51,7 +51,7 @@ var AdminFilters = function (element, labels, form, filters, active_filters) { $field.attr('class', ' filter_val ' + $field.attr('class')); } $el.append( - $('').append($field) + $('').append($field) ); } @@ -81,7 +81,7 @@ var AdminFilters = function (element, labels, form, filters, active_filters) { cx += 1; }); $el.append( - $('').append($select) + $('').append($select) ); // avoids error // if (i_option === -1) { $select.select2(); } @@ -112,12 +112,13 @@ var AdminFilters = function (element, labels, form, filters, active_filters) { $field_inner = $("input", $($field)) $field_inner.attr('name', '_flt_0_' + name); $field_inner.attr('class', ' filter_val ' + $field_inner.attr('class')); + $field_inner.attr('style', "width: 100%"); } else { $field.attr('name', '_flt_0_' + name); $field.attr('class', ' filter_val ' + $field.attr('class')); } $el.append( - $('').append($field) + $('').append($field) ); if ($field.hasClass("my_select2")) { $field.select2({