]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7467 @6
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 5 Jun 2025 16:09:01 +0000 (18:09 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 5 Jun 2025 16:09:01 +0000 (18:09 +0200)
app/Fluidbook/Link/LinksData.php
resources/linkeditor-stable/js/linkeditor.accessibility.js
resources/linkeditor-stable/js/linkeditor.js
resources/linkeditor-stable/js/linkeditor.layers.js
resources/linkeditor-stable/js/linkeditor.links.js
resources/linkeditor-stable/js/linkeditor.panels.js
resources/linkeditor-stable/style/inc/_layers.sass
resources/views/fluidbook_publication/link_editor.blade.php

index dde655d9e1c162028586abe2e5eeb91d3c3dfc2b..d8dc674032bddd775ac856241ca9e3829e08ff6a 100644 (file)
@@ -38,7 +38,9 @@ class LinksData
 
         $cols = array(
             'uid' => __('Identifiant unique'),
-            'page' => __('Page de la publication'), 'left' => __('x'), 'top' => __('y'), 'width' => __('Largeur'), 'height' => __('Hauteur'), 'rot' => __('Rotation'),
+            'page' => __('Page de la publication'),
+            'order' => __('Ordre'),
+            'left' => __('x'), 'top' => __('y'), 'width' => __('Largeur'), 'height' => __('Hauteur'), 'rot' => __('Rotation'),
             'type' => __('Type'), 'to' => __('Destination'), 'target' => __('Cible'),
             'tooltip' => __('Infobulle'), 'numerotation' => __('Numérotation'),
             'display_area' => __('Activer la surbrillance'),
index bdaa92d178ae88398eb952daeb465975e67d5373..16ec258f513d79f54cd8d897dfde679801cdb19e 100644 (file)
@@ -7,38 +7,8 @@ LinkeditorAccessibility.prototype = {
         var $this = this;
 
         this.container = $("#linkeditor-panel-accessibility");
-        console.log(this.container);
         this.maskCheckEvents = false;
 
-        $(document).on('click', '#linkeditor-panel-accessibility a.lock', function () {
-            let uid = $(this).closest('.layer').find('input').attr('name');
-            $this.linkeditor.links.locks.toggleLock(uid);
-            return false;
-        });
-
-        $(document).on('click', "#linkeditor-panel-accessibility label", function (e) {
-            if ($this.maskCheckEvents) {
-                return false;
-            }
-            let uid = $(this).find('input').attr('name');
-            let checked = $(this).find('input').prop('checked');
-            var link = $('#linkeditor-links [fb-uid="' + uid + '"]');
-
-            if (!e.ctrlKey) {
-                $this.linkeditor.links.deselectAllLinks();
-                $this.linkeditor.links.selectLink(link);
-            } else {
-                if (checked) {
-                    $this.linkeditor.links.deselectLink(link);
-                } else {
-                    $this.linkeditor.links.selectLink(link);
-                }
-            }
-
-            $this.linkeditor.form.updateLinkForm();
-            return false;
-        });
-
         $(document).on('click', '#linkeditor-panel-accessibility label span.uid', function () {
             navigator.clipboard.writeText($(this).attr('fb-uid'));
             let tippy = $(this).data('tippyinstance');
@@ -50,7 +20,77 @@ LinkeditorAccessibility.prototype = {
         this.update();
     },
 
-    normalizeLinksOrder: function () {
+    moveSelectionOrder: function (way) {
+        let start;
+        let selection = this.getCurrentOrderableSelection();
+        let num = selection.length;
+        if (num <= 0) {
+            return;
+        }
+        let firstSelected = $(selection).get(0);
+        let firstSelectedOrder = parseInt($(firstSelected).attr('fb-order'));
+        let max = this.getOrderableLinksOnPage().length + 1;
+
+        let step = 1 / (num + 1);
+
+        switch (way) {
+            case'start':
+                start = -num;
+                step = -1;
+                break;
+            case'end':
+                start = max;
+                step = 1;
+                break;
+            case'up':
+                start = firstSelectedOrder - 1 - step;
+                step *= -1;
+                break;
+            case'down':
+                start = firstSelectedOrder + 1 + step;
+                break;
+        }
+
+        let selectedOrder = start;
+
+        $(selection).each(function () {
+            $(this).attr('fb-order', selectedOrder);
+            selectedOrder += step;
+        });
+
+        this.normalizeLinksOrder();
+    },
+
+    getOrderableLinksOnPage: function () {
+        return this.filterOrderableLinks(this.linkeditor.links.getLinksOfCurrentPage());
+    },
+
+    filterOrderableLinks: function (links) {
+        let res = [];
+        $.each(links, function () {
+            if ($(this).attr('fb-calc-depth') < 50) {
+                return;
+            }
+            res.push(this);
+        });
+
+        return this.orderLinks(res);
+    },
+
+    orderLinks: function (links) {
+        return $(links).toArray().sort(function (a, b) {
+            return parseInt($(a).attr('fb-order')) - parseInt($(b).attr('fb-order'));
+        });
+    },
+
+    getCurrentOrderableSelection: function () {
+        return this.filterOrderableLinks(this.linkeditor.links.getCurrentSelection());
+    },
+
+    normalizeLinksOrder: function (refresh) {
+        if (refresh === undefined) {
+            refresh = true;
+        }
         let $this = this;
         let links = [];
         $('#linkeditor-links .link:not(.pendingCreate)').each(function () {
@@ -60,7 +100,6 @@ LinkeditorAccessibility.prototype = {
 
         links.sort(function (a, b) {
             if (a.interactive === b.interactive) {
-                console.log(a.order, b.order);
                 return a.order - b.order
             }
             return b.interactive - a.interactive;
@@ -70,7 +109,9 @@ LinkeditorAccessibility.prototype = {
         $(links).each(function (k, v) {
             $(v.link).attr('fb-order', i++);
         });
-        this.linkeditor.hasChanged();
+        if (refresh) {
+            this.linkeditor.hasChanged();
+        }
         this.linkeditor.links.pageMaxOrderIndex = i;
     },
 
@@ -93,21 +134,21 @@ LinkeditorAccessibility.prototype = {
         var $this = this;
         this.container.html('');
         var accessibility = [];
-        this.normalizeLinksOrder();
-        $('#linkeditor-links .link:not(.pendingCreate)').each(function () {
+        this.normalizeLinksOrder(false);
+        $(this.orderLinks(this.linkeditor.links.getLinksOfCurrentPage())).each(function () {
             let type = $(this).attr('fb-type');
             let dest = $(this).attr('fb-to');
+            let uid = $(this).attr('fb-uid');
 
             if (dest === '') {
                 dest = '<em>' + TRANSLATIONS.empty + '</em>';
             }
-            var l = '<div class="layer" data-locked="' + ($this.linkeditor.links.locks.isLocked($(this).attr('fb-uid')) ? '1' : '0') + '">';
-            l += '<label class="layer" fb-type="' + type + '">';
-            l += '<input name="' + $(this).attr('fb-uid') + '" type="checkbox"> ';
+            var l = '<div class="layer" fb-type="' + type + '">';
+            l += '<input name="' + uid + '" type="checkbox"> ';
+            l += '<label class="layer" data-uid="' + uid + '">';
             l += dest;
             l += '<span class="order">#' + $(this).attr('fb-order') + '</span>';
             l += '</label>';
-            //l += '<a href="#" class="lock" data-icon="lock" data-tooltip="' + TRANSLATIONS['lock'] + '"></a>';
             l += '</div>';
             let level = $this.getLinkLevel($(this));
             accessibility.push({
@@ -123,8 +164,8 @@ LinkeditorAccessibility.prototype = {
             }
             return b.interactive - a.interactive;
         });
+
         var seenLevels = {};
-        console.log(accessibility);
         $.each(accessibility, function (k, v) {
             if (seenLevels[v.interactive] === undefined) {
                 seenLevels[v.interactive] = true;
@@ -133,27 +174,13 @@ LinkeditorAccessibility.prototype = {
             $this.container.append(v.html);
         });
 
-
         this.updateSelection();
         this.linkeditor.initTooltips();
         this.linkeditor.initIcons();
     },
 
     updateSelection() {
-
-        if (this.container === undefined || this.container.is(':hidden')) {
-            return;
-        }
-        var $this = this;
-        this.maskCheckEvents = true;
-        setTimeout(function () {
-            $this.maskCheckEvents = false;
-        }, 100);
-
-        $('#linkeditor-links .link').each(function () {
-            let checkbox = $this.container.find('input[name=' + $(this).attr('fb-uid') + ']');
-            checkbox.prop('checked', $(this).is('.selected'));
-        });
+        this.linkeditor.panels.updatePanelSelection(this);
     },
 
     resize: function () {
index 3840ca66ace7efa0ba6b76d4332d9adc375712d3..5d01caf46aa65625cbf69961951d35982384cd67 100644 (file)
@@ -343,7 +343,7 @@ LinkEditor.prototype = {
         if (push === true) {
             this.undo.pushState();
         }
-        this.layers.update();
+        this.panels.refresh();
         this.updateFBElements(true);
     },
 
index 378eb192ec4e62666e2136ecc25de7c3422e5f65..2cd6112156aa37f4d35146afeab6378d2bc9c67a 100644 (file)
@@ -9,35 +9,6 @@ LinkeditorLayers.prototype = {
         this.container = $("#linkeditor-panel-layers");
         this.maskCheckEvents = false;
 
-        $(document).on('click', '#linkeditor-panel-layers a.lock', function () {
-            let uid = $(this).closest('.layer').find('input').attr('name');
-            $this.linkeditor.links.locks.toggleLock(uid);
-            return false;
-        });
-
-        $(document).on('click', "#linkeditor-panel-layers label", function (e) {
-            if ($this.maskCheckEvents) {
-                return false;
-            }
-            let uid = $(this).find('input').attr('name');
-            let checked = $(this).find('input').prop('checked');
-            var link = $('#linkeditor-links [fb-uid="' + uid + '"]');
-
-            if (!e.ctrlKey) {
-                $this.linkeditor.links.deselectAllLinks();
-                $this.linkeditor.links.selectLink(link);
-            } else {
-                if (checked) {
-                    $this.linkeditor.links.deselectLink(link);
-                } else {
-                    $this.linkeditor.links.selectLink(link);
-                }
-            }
-
-            $this.linkeditor.form.updateLinkForm();
-            return false;
-        });
-
         $(document).on('click', '#linkeditor-panel-layers label span.uid', function () {
             navigator.clipboard.writeText($(this).attr('fb-uid'));
             let tippy = $(this).data('tippyinstance');
@@ -59,17 +30,18 @@ LinkeditorLayers.prototype = {
         var $this = this;
         this.container.html('');
         var layers = [];
-        $('#linkeditor-links .link:not(.pendingCreate)').each(function () {
+        this.linkeditor.links.getLinksOfCurrentPage().each(function () {
             let type = $(this).attr('fb-type');
             let dest = $(this).attr('fb-to');
             if (dest === '') {
                 dest = '<em>' + TRANSLATIONS.empty + '</em>';
             }
-            var l = '<div class="layer" data-locked="' + ($this.linkeditor.links.locks.isLocked($(this).attr('fb-uid')) ? '1' : '0') + '">';
-            l += '<label class="layer" fb-type="' + type + '">';
-            l += '<input name="' + $(this).attr('fb-uid') + '" type="checkbox"> ';
+            let uid = $(this).attr('fb-uid');
+            var l = '<div class="layer" fb-type="' + type + '" data-locked="' + ($this.linkeditor.links.locks.isLocked(uid) ? '1' : '0') + '">';
+            l += '<input name="' + uid + '" type="checkbox"> ';
+            l += '<label class="layer" data-uid="' + uid + '">';
             l += dest;
-            l += '<span data-tooltip="' + TRANSLATIONS.click_to_copy_id + '" data-uid="' + $(this).attr('fb-uid') + '" class="uid">#' + $(this).attr('fb-uid') + '</span>';
+            l += '<span data-tooltip="' + TRANSLATIONS.click_to_copy_id + '" data-uid="' + uid + '" class="uid">#' + uid + '</span>';
             l += '</label>';
             l += '<a href="#" class="lock" data-icon="lock" data-tooltip="' + TRANSLATIONS['lock'] + '"></a>';
             l += '</div>';
@@ -104,20 +76,7 @@ LinkeditorLayers.prototype = {
     },
 
     updateSelection() {
-
-        if (this.container === undefined || this.container.is(':hidden')) {
-            return;
-        }
-        var $this = this;
-        this.maskCheckEvents = true;
-        setTimeout(function () {
-            $this.maskCheckEvents = false;
-        }, 100);
-
-        $('#linkeditor-links .link').each(function () {
-            let checkbox = $this.container.find('input[name=' + $(this).attr('fb-uid') + ']');
-            checkbox.prop('checked', $(this).is('.selected'));
-        });
+        this.linkeditor.panels.updatePanelSelection(this);
     },
 
     resize: function () {
index 2b389fcdeac036a8fdf34c56753ff66f437a25fc..19fead76f71c45340befc7134d3872f6edd4fcc2 100644 (file)
@@ -207,16 +207,20 @@ LinkeditorLinks.prototype = {
 
 
         $.contextMenu({
-            selector: '#linkeditor-canvas,.link,#linkeditor-panel-layers, #linkeditor-panel-layers label', events: {
+            selector: '#linkeditor-canvas,.link,#linkeditor-panel-layers, #linkeditor-panel-layers label,#linkeditor-panel-accessibility, #linkeditor-panel-accessibility label',
+            events: {
                 show: function (e) {
                     $this.contextMenuPosition = {x: $this.linkeditor.mx, y: $this.linkeditor.my};
-                }, preShow: function (e) {
+                },
+                preShow: function (e) {
+                    console.log(e);
                     if ($(e).is('.link:not(.selected)')) {
                         $this.deselectAllLinks();
                         $this.selectLink(e);
                     }
-                    if ($(e).is('#linkeditor-panel-layers label')) {
-                        let input = $(e).find('input');
+                    if ($(e).is('.linkeditor-panel label')) {
+                        let input = $(e).closest('div.layer').find('input');
+                        console.log(input, input.prop('checked'));
                         if (!input.prop('checked')) {
                             $this.deselectAllLinks();
                             $this.selectLink($('.link[fb-uid=' + input.attr('name') + ']'));
@@ -297,16 +301,12 @@ LinkeditorLinks.prototype = {
                             },
                         };
                         res.items.paste_on_left = {
-                            isHtmlName: true,
-                            name: TRANSLATIONS.paste_on_left,
-                            callback: function () {
+                            isHtmlName: true, name: TRANSLATIONS.paste_on_left, callback: function () {
                                 $this.paste('left');
                             },
                         };
                         res.items.paste_on_right = {
-                            isHtmlName: true,
-                            name: TRANSLATIONS.paste_on_right,
-                            callback: function () {
+                            isHtmlName: true, name: TRANSLATIONS.paste_on_right, callback: function () {
                                 $this.paste('right');
                             },
                         };
@@ -341,40 +341,29 @@ LinkeditorLinks.prototype = {
                     }
 
                     res.items = $.extend(res.items, {
-                        sep_extends: '---------',
-                        cover: {
-                            name: TRANSLATIONS.cover,
-                            items: cover_items,
+                        sep_extends: '---------', cover: {
+                            name: TRANSLATIONS.cover, items: cover_items,
                         }
                     });
                 }
                 if (hasSelection) {
                     res.items = $.extend(res.items, {
-                        'sep_order': '---------',
-                        "order": {
-                            name: (TRANSLATIONS.edit_link_order) + '',
-                            items: {
+                        'sep_order': '---------', "order": {
+                            name: (TRANSLATIONS.edit_link_order) + '', items: {
                                 'move_order_start': {
-                                    name: TRANSLATIONS.move_beginning,
-                                    callback: function () {
+                                    name: TRANSLATIONS.move_beginning, callback: function () {
                                         $this.moveSelectionOrder('start');
                                     }
-                                },
-                                'move_order_up': {
-                                    name: TRANSLATIONS.move_up,
-                                    callback: function () {
+                                }, 'move_order_up': {
+                                    name: TRANSLATIONS.move_up, callback: function () {
                                         $this.moveSelectionOrder('up');
                                     }
-                                },
-                                'move_order_down': {
-                                    name: TRANSLATIONS.move_down,
-                                    callback: function () {
+                                }, 'move_order_down': {
+                                    name: TRANSLATIONS.move_down, callback: function () {
                                         $this.moveSelectionOrder('down');
                                     }
-                                },
-                                'move_order_end': {
-                                    name: TRANSLATIONS.move_end,
-                                    callback: function () {
+                                }, 'move_order_end': {
+                                    name: TRANSLATIONS.move_end, callback: function () {
                                         $this.moveSelectionOrder('end');
                                     }
                                 }
@@ -403,6 +392,10 @@ LinkeditorLinks.prototype = {
         }, 250);
     },
 
+    moveSelectionOrder: function (way) {
+        return this.linkeditor.accessibility.moveSelectionOrder(way);
+    },
+
     key: function (shortcut, scope) {
         var $this = this;
         key(shortcut, function (event, handler) {
@@ -911,6 +904,10 @@ LinkeditorLinks.prototype = {
         return res;
     },
 
+    getLinksOfCurrentPage: function () {
+        return $('#linkeditor-links .link:not(.pendingCreate)');
+    },
+
     loadLinks: function (page, side) {
         this.pageMaxOrderIndex = 0;
         let $this = this;
@@ -1060,12 +1057,7 @@ LinkeditorLinks.prototype = {
 
     updatePanels: function () {
         this.updateDepths();
-        if (this.linkeditor.panels.isPanelActive('layers')) {
-            this.linkeditor.layers.update();
-        }
-        if (this.linkeditor.panels.isPanelActive('accessibility')) {
-            this.linkeditor.accessibility.update();
-        }
+        this.linkeditor.panels.refresh()
     },
 
     deleteSelection: function () {
@@ -1120,7 +1112,7 @@ LinkeditorLinks.prototype = {
 
     updateSelection: function () {
         $("#linkeditor").attr('data-selection-count', this.getCurrentSelection().length);
-        this.linkeditor.layers.updateSelection();
+        this.linkeditor.panels.updateSelection();
     },
 
     updateDepths: function () {
index d09b8ddbd22250579bbe5d2dac583b6619a7a493..e9150c8af04a686df0cd7f4bf266ddac19444c21 100644 (file)
@@ -12,8 +12,7 @@ LinkeditorPanels.prototype = {
         var $this = this;
 
         this.sides = this.linkeditor.settings.get('panels_layout', {
-            left: ['layers', 'accessibility', 'versions'],
-            right: ['form']
+            left: ['layers', 'accessibility', 'versions'], right: ['form']
         });
         $.each(this.sides, function (side, panels) {
             var panelsContainer = $("#linkeditor-" + side + '-panel');
@@ -44,6 +43,46 @@ LinkeditorPanels.prototype = {
         this.linkeditor.layers.init();
         this.linkeditor.accessibility.init();
 
+        $(document).on('change', '.linkeditor-panel :checkbox', function () {
+            var link = $('#linkeditor-links [fb-uid="' + $(this).attr('name') + '"]');
+
+            if ($(this).prop('checked')) {
+                $this.linkeditor.links.selectLink(link);
+            } else {$this.linkeditor.links.deselectLink(link);
+
+            }
+            return true;
+        });
+
+        $(document).on('click', '.linkeditor-panel a.lock', function () {
+            let uid = $(this).closest('.layer').find('input').attr('name');
+            $this.linkeditor.links.locks.toggleLock(uid);
+            return false;
+        });
+
+        $(document).on('click', ".linkeditor-panel label", function (e) {
+            if ($this.maskCheckEvents) {
+                return false;
+            }
+
+            let uid = $(this).attr('data-uid');
+            var link = $('#linkeditor-links [fb-uid="' + uid + '"]');
+            let checked = $(link).hasClass('selected');
+
+            if (!e.ctrlKey) {
+                $this.linkeditor.links.deselectAllLinks();
+                $this.linkeditor.links.selectLink(link);
+            } else {
+                if (checked) {
+                    $this.linkeditor.links.deselectLink(link);
+                } else {
+                    $this.linkeditor.links.selectLink(link);
+                }
+            }
+
+            $this.linkeditor.form.updateLinkForm();
+            return false;
+        });
 
         this.linkeditor.resize.resize();
         $(document).on('mousedown', ".linkeditor-sidebar .handle", function (e) {
@@ -108,20 +147,15 @@ LinkeditorPanels.prototype = {
 
     toggleVersions: function () {
         this.togglePanel('versions');
-    },
-    toggleLayers: function () {
+    }, toggleLayers: function () {
         this.togglePanel('layers');
-    },
-    toggleForm: function () {
+    }, toggleForm: function () {
         this.togglePanel('form');
-    },
-    toggleAccessibility: function () {
+    }, toggleAccessibility: function () {
         this.togglePanel('accessibility');
-    },
-    togglePanel: function (panel) {
+    }, togglePanel: function (panel) {
         this.setPanelState(panel, 'toggle');
-    },
-    setPanelState: function (panel, newState) {
+    }, setPanelState: function (panel, newState) {
         var $this = this;
         var panelDiv = $('#linkeditor-panel-' + panel);
         let container = panelDiv.closest('.linkeditor-panel-side');
@@ -152,17 +186,10 @@ LinkeditorPanels.prototype = {
                 }
                 $this.setPanelState($(this).data('panel'), false);
             });
-            try {
-                if (panel === 'layers') {
-                    this.linkeditor.layers.update();
-                } else if (panel === 'accessibility') {
-                    this.linkeditor.accessibility.update();
-                }
-            } catch (e) {
-
-            }
         }
 
+        this.refresh();
+
         // Check if a panel is open on this side, if not, hide the panel
         let sideOpen = $(container).children('.open').length > 0;
         if (sideOpen) {
@@ -183,5 +210,47 @@ LinkeditorPanels.prototype = {
         return $('#linkeditor-panel-' + panel).hasClass('open');
     },
 
+    updateSelection: function () {
+        if (this.isPanelActive('layers')) {
+            this.linkeditor.layers.updateSelection();
+        }
+        if (this.isPanelActive('accessibility')) {
+            this.linkeditor.accessibility.updateSelection();
+        }
+    },
+
+    updatePanelSelection: function (panel) {
+        if (panel.container === undefined || panel.container.is(':hidden')) {
+            return;
+        }
+        panel.maskCheckEvents = true;
+        setTimeout(function () {
+            panel.maskCheckEvents = false;
+        }, 100);
+
+        $('#linkeditor-links .link').each(function () {
+            let checkbox = panel.container.find('input[name=' + $(this).attr('fb-uid') + ']');
+            checkbox.prop('checked', $(this).is('.selected'));
+        });
+
+    },
+
+    refresh: function () {
+        try {
+            if (this.isPanelActive('layers')) {
+                this.linkeditor.layers.update();
+            }
+        } catch (e) {
+
+        }
+        try {
+            if (this.isPanelActive('accessibility')) {
+                this.linkeditor.accessibility.update();
+            }
+        } catch (e) {
+
+        }
+    }
+
 };
 export default LinkeditorPanels;
index eaacb4b65f324ae1e86a389bdf2270e86d0f8d6b..92495968b27bfa397f2c4efacdb9aff4be5b03ef 100644 (file)
     .layer
         position: relative
 
+        input
+            color: #fff
+            position: absolute
+            top: 4px
+            left: 4px
+            width: 16px
+            height: 16px
+            z-index: 2
+
+            &::before
+                height: 16px
+                width: 16px
+                border: 0
+
+            &::after
+                width: 14px
+                height: 14px
+                top: 1px
+                left: 1px
+
         label
             display: block
             border-bottom: 1px solid currentColor
-            padding: 5px 10px
+            padding: 5px 10px 5px 24px
             cursor: pointer
 
-
             span
                 display: inline-block
                 position: absolute
-                right: 28px
+                right: 24px
+                height: 16px
                 background-color: rgba(255, 255, 255, 0.5)
                 color: #000
+                top: 4px
                 border-radius: 2px
                 padding: 2px
                 font-family: "Courier New", Courier, monospace
 
-            input
-                color: #fff
-                position: relative
-                top: 2px
-
-                &::before
-                    border: 0
-
         &[data-locked="1"]
             label
                 pointer-events: none
@@ -56,8 +69,8 @@
         a.lock
             display: block
             position: absolute
-            top: 5px
-            right: 6px
+            top: 4px
+            right: 4px
             border-radius: 2px
             width: 16px
             height: 16px
@@ -69,6 +82,5 @@
                 color: rgba(255, 255, 255, 0.8)
                 background-color: rgba(255, 255, 255, 0.25)
 
-
             svg
                 display: none
index 08969b9c0b11ca6f3762ec1d43ff4e921cebf36c..a1e22ccf7c7050a5c8a7827952d0d1bf14431c42 100644 (file)
                data-action="panels.toggleLayers"
                data-tooltip="{{__('Liste des liens')}} (F7)"
                data-key="f7"></a>
+            <a href="#" id="linkeditor-icon-accessibility" data-panel="accessibility" data-icon="accessibility"
+               data-action="panels.toggleAccessibility"
+               data-tooltip="{{__('Accessibilité')}} (Alt+A)" data-key="Alt+A"></a>
             <a href="#" id="linkeditor-icon-versions" data-panel="versions" data-action="panels.toggleVersions"
                data-icon="wayback-machine"
                data-tooltip="{{__('Restaurer une version précédente')}} (F6)" data-key="f6"></a>
             <a href="#" id="linkeditor-icon-form" data-panel="form" data-icon="settings"
                data-action="panels.toggleForm"
                data-tooltip="{{__('Paramètres du lien')}} (F8)" data-key="f8"></a>
-            <a href="#" id="linkeditor-icon-accessibility" data-panel="accessibility" data-icon="accessibility"
-               data-action="panels.toggleAccessibility"
-               data-tooltip="{{__('Accessibilité')}} (Alt+A)" data-key="Alt+A"></a>
             <div id="linkeditor-panel-versions">
                 <div id="linkeditor-panel-versions-list">
 
             background-color: {{\Cubist\Util\Graphics\Color::colorToCSS($type['color'],0.25)}};
         }
 
-        .linkeditor-linktype[data-type="{{$type['type']}}"]::before, label[fb-type="{{$type['type']}}"] input[type="checkbox"]::before {
+        .linkeditor-linktype[data-type="{{$type['type']}}"]::before, .layer[fb-type="{{$type['type']}}"] input[type="checkbox"]::before {
             background-color: {{$type['color']}};
         }
         @endif