]> _ Git - fluidbook-html5.git/commitdiff
wip #8000 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 13 Feb 2026 11:25:03 +0000 (12:25 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 13 Feb 2026 11:25:03 +0000 (12:25 +0100)
js/libs/fluidbook/fluidbook.links.js

index 2a3a6d20ce57796a8881a12adaf78cad83241fe2..b40cfb8e571905deb3e67632af5871fe64b62e3f 100644 (file)
@@ -25,6 +25,8 @@ function FluidbookLinks(fluidbook) {
     }
     this.lowdef = false;
     this.animations = new FluidbookLinksAnimations(fluidbook);
+    this.shortLinks = {};
+
     this.init();
 }
 
@@ -532,6 +534,9 @@ FluidbookLinks.prototype = {
                 $this.fluidbook.links.triggerLinkById($this.fluidbook.settings.openLinkAtStartup);
             }
         });
+
+        this.getShortLinks();
+
     },
 
     updateAttachedLinks: function () {
@@ -1061,5 +1066,18 @@ FluidbookLinks.prototype = {
         if (!Modernizr.ftouch) {
             container.perfectScrollbar('update');
         }
-    }
+    },
+
+    getShortLinks: function () {
+
+        let $this = this;
+        if (this.fluidbook.settings.specialShortLinks !== undefined && this.fluidbook.settings.specialShortLinks.length > 0) {
+            this.fluidbook.service.call('shortlinks', {
+                cid: this.fluidbook.settings.cid,
+                links: this.fluidbook.settings.specialShortLinks
+            }, function (data) {
+                $this.shortLinks = data;
+            }, null, 'post');
+        }
+    },
 }