58 lines
1.7 KiB
Plaintext
58 lines
1.7 KiB
Plaintext
|
|
-- ==============================================================================
|
||
|
|
-- 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)
|
||
|
|
-- Select all PDF buttons (action bar + menu)
|
||
|
|
set pdfButtons to <.pdf-btn, .menu-pdf-btn/>
|
||
|
|
|
||
|
|
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)
|
||
|
|
-- Select all Print buttons (action bar + menu)
|
||
|
|
set printButtons to <.print-btn, .menu-print-btn/>
|
||
|
|
|
||
|
|
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
|