Fix timeline editor duplicate events and drag-and-drop positioning

- Consolidated duplicate "Add Event" handlers by moving all JS from inline script to timeline-editor.js
- Fixed drag-and-drop position saving by correctly counting only event containers, not timeline header/rail elements
- Removed 1056 lines of duplicate inline JavaScript from edit.html.erb

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andrew Brown 2025-10-03 22:45:40 -07:00
parent e7fb6e1f37
commit 122638bbf4
3 changed files with 1040 additions and 1187 deletions

File diff suppressed because it is too large Load Diff

View File

@ -150,7 +150,7 @@ class TimelineEventsController < ApplicationController
render json: {
success: true,
message: "Timeline event moved to position #{intended_position + 1}",
message: "New position saved", # "Timeline event moved to position #{intended_position + 1}"
timeline_event: {
id: timeline_event.id,
position: timeline_event.position,

File diff suppressed because it is too large Load Diff