Files
growstuff/app/javascript/application.js
T
Brenda Wallace 240de4fac2 Refactor seed editing and display components
- Replace the modal dialog for editing seed details with an inline form within the packet sheet.
- Introduce a new partial for edit fields to streamline the editing process.
- Update the seed facts display to utilize a new fact row partial for better organization and readability.
- Implement a packet panel to show packet photos and text side by side, enhancing the user interface.
- Modify the hero section to include source information as a ribbon or badge based on the presence of a photo.
- Adjust tests to reflect changes in the editing process and the new layout of the seed show page.
2026-10-29 18:59:55 +13:00

45 lines
1.5 KiB
JavaScript

// The site's jQuery-era scripts expect these as globals, and jQuery plugins
// attach to window.jQuery, so globals must be set before anything else loads.
import './globals';
import 'jquery-ujs';
import 'jquery-ui/dist/jquery-ui';
import 'leaflet.markercluster';
import './site/auto_suggest';
import './site/cropmap';
import './site/editable';
import './site/finish_toggle';
import './site/job_ideas';
import './site/job_notepad';
import './site/likes';
import './site/members';
import './site/navbar_search';
import './site/packet_sheet';
import './site/places';
import './site/planting_alternate_name';
import './site/tab_navigation';
import { initFlashMessages } from './site/flash_messages';
document.addEventListener('DOMContentLoaded', function() {
initFlashMessages();
var popoverTrigger = Array.prototype.slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
popoverTrigger.map(function(popoverTrigger2) {
return new bootstrap.Popover(popoverTrigger2);
});
var tooltipTrigger = Array.prototype.slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
tooltipTrigger.map(function(tooltipTrigger2) {
return new bootstrap.Tooltip(tooltipTrigger2);
});
});
// Tell the server which time zone the browser is in, so "today" and "yesterday"
// are the member's own days.
try {
document.cookie = 'timezone=' + encodeURIComponent(Intl.DateTimeFormat().resolvedOptions().timeZone) +
'; path=/; max-age=31536000; SameSite=Lax';
} catch (error) {
// No time zone to send: the server's is used.
}