Implements custom scroll and event logging
Adds custom scroll management for the calendar week view, replacing native scrollbars with a custom handle. Introduces categorized event logging with console grouping and styling, enhancing debug output. It also allows configuring logging for specific event categories.
This commit is contained in:
parent
001443ce11
commit
9f6d4333cb
7 changed files with 606 additions and 63 deletions
|
|
@ -13,51 +13,53 @@
|
|||
<link rel="stylesheet" href="css/calendar-popup-css.css">
|
||||
</head>
|
||||
<body>
|
||||
<swp-calendar data-view="week" data-week-days="7" data-snap-interval="15">
|
||||
<!-- Navigation Bar -->
|
||||
<swp-calendar-nav>
|
||||
<swp-nav-group>
|
||||
<swp-nav-button data-action="prev">←</swp-nav-button>
|
||||
<swp-nav-button data-action="next">→</swp-nav-button>
|
||||
<swp-nav-button data-action="today">Today</swp-nav-button>
|
||||
</swp-nav-group>
|
||||
<div class="calendar-wrapper">
|
||||
<swp-calendar data-view="week" data-week-days="7" data-snap-interval="15">
|
||||
<!-- Navigation Bar -->
|
||||
<swp-calendar-nav>
|
||||
<swp-nav-group>
|
||||
<swp-nav-button data-action="prev">←</swp-nav-button>
|
||||
<swp-nav-button data-action="next">→</swp-nav-button>
|
||||
<swp-nav-button data-action="today">Today</swp-nav-button>
|
||||
</swp-nav-group>
|
||||
|
||||
<swp-week-info>
|
||||
<swp-week-number>Week 3</swp-week-number>
|
||||
<swp-date-range>Jan 15 - Jan 21, 2024</swp-date-range>
|
||||
</swp-week-info>
|
||||
|
||||
<swp-search-container>
|
||||
<swp-search-icon>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16">
|
||||
<circle cx="6" cy="6" r="5" stroke="currentColor" fill="none" stroke-width="1.5"/>
|
||||
<path d="M10 10l4 4" stroke="currentColor" stroke-width="1.5"/>
|
||||
</svg>
|
||||
</swp-search-icon>
|
||||
<input type="search" placeholder="Search events..." />
|
||||
<swp-search-clear hidden>
|
||||
<svg width="14" height="14" viewBox="0 0 16 16">
|
||||
<path d="M5 5l6 6M11 5l-6 6" stroke="currentColor" stroke-width="2"/>
|
||||
</svg>
|
||||
</swp-search-clear>
|
||||
</swp-search-container>
|
||||
|
||||
<swp-view-selector>
|
||||
<swp-view-button data-view="day">Day</swp-view-button>
|
||||
<swp-view-button data-view="week" data-active="true">Week</swp-view-button>
|
||||
<swp-view-button data-view="month" disabled>Month</swp-view-button>
|
||||
</swp-view-selector>
|
||||
</swp-calendar-nav>
|
||||
|
||||
<swp-week-info>
|
||||
<swp-week-number>Week 3</swp-week-number>
|
||||
<swp-date-range>Jan 15 - Jan 21, 2024</swp-date-range>
|
||||
</swp-week-info>
|
||||
<!-- Calendar Grid Container -->
|
||||
<swp-calendar-container>
|
||||
<!-- Headers and time slots will be generated dynamically by JavaScript -->
|
||||
</swp-calendar-container>
|
||||
|
||||
<swp-search-container>
|
||||
<swp-search-icon>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16">
|
||||
<circle cx="6" cy="6" r="5" stroke="currentColor" fill="none" stroke-width="1.5"/>
|
||||
<path d="M10 10l4 4" stroke="currentColor" stroke-width="1.5"/>
|
||||
</svg>
|
||||
</swp-search-icon>
|
||||
<input type="search" placeholder="Search events..." />
|
||||
<swp-search-clear hidden>
|
||||
<svg width="14" height="14" viewBox="0 0 16 16">
|
||||
<path d="M5 5l6 6M11 5l-6 6" stroke="currentColor" stroke-width="2"/>
|
||||
</svg>
|
||||
</swp-search-clear>
|
||||
</swp-search-container>
|
||||
|
||||
<swp-view-selector>
|
||||
<swp-view-button data-view="day">Day</swp-view-button>
|
||||
<swp-view-button data-view="week" data-active="true">Week</swp-view-button>
|
||||
<swp-view-button data-view="month" disabled>Month</swp-view-button>
|
||||
</swp-view-selector>
|
||||
</swp-calendar-nav>
|
||||
|
||||
<!-- Calendar Grid Container -->
|
||||
<swp-calendar-container>
|
||||
<!-- Headers and time slots will be generated dynamically by JavaScript -->
|
||||
</swp-calendar-container>
|
||||
|
||||
<swp-loading-overlay hidden>
|
||||
<swp-spinner></swp-spinner>
|
||||
</swp-loading-overlay>
|
||||
</swp-calendar>
|
||||
<swp-loading-overlay hidden>
|
||||
<swp-spinner></swp-spinner>
|
||||
</swp-loading-overlay>
|
||||
</swp-calendar>
|
||||
</div>
|
||||
|
||||
<!-- JavaScript Bundle -->
|
||||
<script type="module" src="js/calendar.js"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue