diff options
Diffstat (limited to 'assets/js/components')
-rw-r--r-- | assets/js/components/modal.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/assets/js/components/modal.js b/assets/js/components/modal.js index 458cc526..ce6f34de 100644 --- a/assets/js/components/modal.js +++ b/assets/js/components/modal.js @@ -26,4 +26,14 @@ KB.onClick('.js-modal-close', function () { KB.modal.close(); }); + + KB.onClick('.js-modal-replace', function (e) { + var link = getLink(e); + + if (KB.modal.isOpen()) { + KB.modal.replace(link); + } else { + window.location.href = link; + } + }); }()); |