diff --git a/public/index.php b/public/index.php index e54659c..57ac016 100644 --- a/public/index.php +++ b/public/index.php @@ -168,7 +168,7 @@ $news_items = $stmt->fetchAll();
- @@ -196,7 +196,7 @@ $news_items = $stmt->fetchAll();
- diff --git a/public/js/app.js b/public/js/app.js index c8c80ac..3f9fdd7 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1140,17 +1140,6 @@ function reverseGeocode(contributionId, lat, lng) { .catch(function () {}); } -// Resizes Select to fit currently selected Option Text -function autoResizeSelect(select) { - var canvas = document.createElement('canvas'); - var ctx = canvas.getContext('2d'); - var style = window.getComputedStyle(select); - ctx.font = style.fontSize + ' ' + style.fontFamily; - var text = select.options[select.selectedIndex].text; - var textWidth = Math.ceil(ctx.measureText(text).width); - select.style.width = (textWidth + 42) + 'px'; -} - // Filters News Items in Sidebar by Search Term function filterNews() { const searchTerm = document.getElementById('news-search-input').value.toLowerCase(); @@ -1366,8 +1355,4 @@ document.getElementById('create-photo').addEventListener('change', function () { } else { preview.style.display = 'none'; } - - -// Initial Resize of Sort Selects -document.querySelectorAll('.list-sort-select').forEach(autoResizeSelect); }); \ No newline at end of file