Use XHR for asset links

This commit is contained in:
2016-11-09 15:29:13 +01:00
parent 16e1fd1df0
commit 2b70e362da

View File

@@ -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;