]> _ Git - fluidbook-html5.git/commitdiff
#fluidbook_apps : special behavior for file links in apps (open in device browser...
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Mar 2016 15:53:09 +0000 (15:53 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Mar 2016 15:53:09 +0000 (15:53 +0000)
js/main.js

index e78108c8b85ad08c4057773e752d17d776dde75a..341fc720b2e482d49d72d10b13c9275bb0af9514 100644 (file)
@@ -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;