From 63447ed6e49a356d7e3de4067840f5bf926e3a17 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 3 Mar 2016 15:53:09 +0000 Subject: [PATCH] #fluidbook_apps : special behavior for file links in apps (open in device browser instead of inapp browser) --- js/main.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/js/main.js b/js/main.js index e78108c8..341fc720 100644 --- a/js/main.js +++ b/js/main.js @@ -151,11 +151,6 @@ try { manifest = collection.manifestPub[DATAS.id]; } - $(document).on('click', "a[data-type='16']", function () { - window.open($(this).attr("href"), "_system"); - return false; - }); - if (navigator.onLine && !OFFLINEAPP) { fb('init online'); @@ -421,8 +416,11 @@ try { return true; } var target = $(this).attr('target'); + if ($(this).data('type') == 16) { + target = '_system'; + } if (target == '_blank' || target == '_system') { - fluidbook.wopen($(this).attr('href'), $(this).attr('target')); + fluidbook.wopen($(this).attr('href'), target); return false; } return true; -- 2.39.5