2025-11-17 16:28:52 +00:00
|
|
|
-- ==============================================================================
|
|
|
|
|
-- CV Site - Hover Synchronization Functions
|
|
|
|
|
-- ==============================================================================
|
|
|
|
|
-- Synchronize hover states between action bar and hamburger menu buttons
|
|
|
|
|
-- Migrated from JavaScript (cv-functions.js) after confirming no def limit
|
|
|
|
|
|
|
|
|
|
-- ==============================================================================
|
|
|
|
|
-- PDF BUTTON HOVER SYNC
|
|
|
|
|
-- ==============================================================================
|
|
|
|
|
|
|
|
|
|
def syncPdfHover(show)
|
2025-11-19 09:24:29 +00:00
|
|
|
-- Select all PDF buttons (left side + action bar + menu)
|
|
|
|
|
set pdfButtons to <.download-btn, .pdf-btn, .menu-pdf-btn/>
|
2025-11-17 16:28:52 +00:00
|
|
|
|
|
|
|
|
if show is true
|
|
|
|
|
for btn in pdfButtons
|
|
|
|
|
add .pdf-hover-sync to btn
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
for btn in pdfButtons
|
|
|
|
|
remove .pdf-hover-sync from btn
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- ==============================================================================
|
|
|
|
|
-- PRINT BUTTON HOVER SYNC
|
|
|
|
|
-- ==============================================================================
|
|
|
|
|
|
|
|
|
|
def syncPrintHover(show)
|
2025-11-19 09:24:29 +00:00
|
|
|
-- Select all Print buttons (left side + action bar + menu)
|
|
|
|
|
set printButtons to <.print-friendly-btn, .print-btn, .menu-print-btn/>
|
2025-11-17 16:28:52 +00:00
|
|
|
|
|
|
|
|
if show is true
|
|
|
|
|
for btn in printButtons
|
|
|
|
|
add .print-hover-sync to btn
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
for btn in printButtons
|
|
|
|
|
remove .print-hover-sync from btn
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- ==============================================================================
|
|
|
|
|
-- ZOOM CONTROL HIGHLIGHT
|
|
|
|
|
-- ==============================================================================
|
|
|
|
|
|
|
|
|
|
def highlightZoomControl(show)
|
|
|
|
|
set zoomWrapper to #zoom-wrapper
|
|
|
|
|
|
|
|
|
|
if show is true
|
|
|
|
|
add .highlight to zoomWrapper
|
|
|
|
|
else
|
|
|
|
|
remove .highlight from zoomWrapper
|
|
|
|
|
end
|
|
|
|
|
end
|