summaryrefslogtreecommitdiff
path: root/assets/js/components
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-01-08 14:00:51 -0500
committerFrederic Guillot <fred@kanboard.net>2017-01-08 14:00:51 -0500
commitb3a450bace8461fb7989d5406b9d9ec644d7df4a (patch)
tree89827b899d4a3fad9d123750955a0fc4692de312 /assets/js/components
parentea2cbb76d5d48ef8d2601fc33edc55c15929b963 (diff)
Display project analytics in modal box
Diffstat (limited to 'assets/js/components')
-rw-r--r--assets/js/components/modal.js10
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;
+ }
+ });
}());