]> _ Git - fluidbook-html5.git/commitdiff
wip #3497 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 23 Jun 2020 13:57:58 +0000 (15:57 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 23 Jun 2020 13:57:58 +0000 (15:57 +0200)
js/libs/fluidbook/fluidbook.links.js

index b7c4edb97580285b1426ccd7128fa78cae9889c5..bab33305624dc3d5dc10ff946c0b318b77723655 100644 (file)
@@ -1,6 +1,7 @@
 /*
  this.l10n.__('click to call this number');
  this.l10n.__('view slideshow');
+ this.l10n.__('click to download the image');
 
  */
 
@@ -80,7 +81,7 @@ FluidbookLinks.prototype = {
                 return true;
             }
 
-             if (external && $this.fluidbook.stats.relay_url_params !== '' && !$(this).hasClass('relay_appended')) {
+            if (external && $this.fluidbook.stats.relay_url_params !== '' && !$(this).hasClass('relay_appended')) {
                 $(this).addClass('relay_appended');
 
                 var u = new URL(href);
@@ -115,6 +116,9 @@ FluidbookLinks.prototype = {
             if (target === '_self') {
                 return true;
             }
+            if ($(this).attr('download') && !Modernizr.msie) {
+                return true;
+            }
             fluidbook.wopen(href, target);
             return false;
         });