공간디자인페어 사무국
Copyright ⓒ2026 SPACE DESIGN FAIR, All rights reserved.
전시기간 변경 (2026.08.05)
Your Content Goes Here
' + html + '
'; } function hideButton(el) { if (el) el.style.display = 'none'; } function updateLabel(el, cfg) { if (!el) return; var state = getState(cfg); if (state === 'closed' && cfg.closedAction === 'remove') { hideButton(el); return; } var link = el.tagName === 'A' ? el : (el.querySelector('a') || el); var textEls = link.querySelectorAll('.fusion-button-text'); textEls.forEach(function (textEl) { textEl.textContent = cfg.labels[state]; }); } function scheduleUpdate(className, cfg) { var now = new Date().getTime(); var start = new Date(cfg.start).getTime(); var end = new Date(cfg.end).getTime(); var delay = null; if (now < start) { delay = start - now; } else if (now <= end) { delay = end - now; } if (delay !== null) { setTimeout(function () { var elements = document.querySelectorAll('.' + className); elements.forEach(function (el) { updateLabel(el, cfg); }); scheduleUpdate(className, cfg); }, delay); } } function handleClick(cfg) { return function (e) { var state = getState(cfg); if (state === 'open') { e.preventDefault(); e.stopPropagation(); window.open(cfg.link, '_self'); } else if (state === 'closed' && cfg.closedAction === 'remove') { e.preventDefault(); e.stopPropagation(); return; } else { if (modalBody) { modalBody.innerHTML = buildMessage(cfg, state); } } }; } Object.keys(CONFIG).forEach(function (className) { var cfg = CONFIG[className]; var elements = document.querySelectorAll('.' + className); if (elements.length === 0) return; var state = getState(cfg); elements.forEach(function (el) { if (state === 'closed' && cfg.closedAction === 'remove') { hideButton(el); return; } var link = el.tagName === 'A' ? el : (el.querySelector('a') || el); link.addEventListener('click', handleClick(cfg), true); updateLabel(el, cfg); }); scheduleUpdate(className, cfg); }); })();