]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6257 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 7 Sep 2023 15:16:21 +0000 (17:16 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 7 Sep 2023 15:16:21 +0000 (17:16 +0200)
resources/linkeditor/js/linkeditor.js
resources/linkeditor/js/linkeditor.links.js
resources/linkeditor/js/linkeditor.utils.js

index dd3cd2a76fb47cf633e8e626147a7412b552c9f1..7ebf4d89c4e5090f242698b3d946bf20d8caeb30 100644 (file)
@@ -460,7 +460,7 @@ LinkEditor.prototype = {
         window.location.hash = '#' + this.currentPage;
         this.clearLinksAndRulers();
         this.loader.loadPage(this.currentPage, 'left');
-        if (!this.single) {
+        if (!this.single && !isSpecial) {
             this.loader.loadPage(this.currentPage + 1, 'right');
         }
         $("#linkeditor-page-field input").val(this.currentNumericPage);
index b65edbc4370563e85b425c46f0ac16a4ec7a783f..3066f65b8b9e3f16b45a96bb7cb064bf6be306fa 100644 (file)
@@ -483,7 +483,7 @@ LinkeditorLinks.prototype = {
 
 
     openImageLink: function () {
-        let selection = $(".link.selected");
+        let selection = $(".link.selected").eq(0);
         if (undefined === CAN_CONTAIN_LINKS[parseInt($(selection).attr('fb-type'))] || selection.length !== 1) {
             this.linkeditor.notification(TRANSLATIONS.error_open_image_link, 'warning');
             return;
index 2116afcdbe522f4642d3d5c73d2cb5be0e03a08a..799f68f3edeb027320f3bbbdb184caa2bc0b6751 100644 (file)
@@ -21,7 +21,8 @@ LinkeditorUtils.prototype = {
 
     getSpecialPageAssetURL(page) {
         if (page.toString().indexOf('link_') === 0) {
-            return ASSETS[this.getLinkImageId(page)]['url'];
+            let asset = this.getLinkImageId(page);
+            return ASSETS[asset]['url'];
         } else {
             return THEME[page]['url'];
         }