From 2b70e362dabbf77cb4fc8828b922be0cfa4509c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 9 Nov 2016 15:29:13 +0100 Subject: [PATCH] Use XHR for asset links --- src/scripts/tutti/10_tasks.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/scripts/tutti/10_tasks.js b/src/scripts/tutti/10_tasks.js index e879200..ed42b45 100644 --- a/src/scripts/tutti/10_tasks.js +++ b/src/scripts/tutti/10_tasks.js @@ -432,6 +432,14 @@ $(function() { shot_open(shot_id); }); + $("a.asset-link[data-asset-id]").click(function(e) { + e.preventDefault(); + // delegateTarget is the thing the event hander was attached to, + // rather than the thing we clicked on. + var asset_id = e.delegateTarget.dataset.assetId; + asset_open(asset_id); + }); + $("a.task-link[data-task-id]").click(function(e) { e.preventDefault(); var task_id = e.delegateTarget.dataset.taskId;