]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7467 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 10 Jun 2025 14:03:07 +0000 (16:03 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 10 Jun 2025 14:03:07 +0000 (16:03 +0200)
resources/linkeditor-stable/js/linkeditor.accessibility.js
resources/linkeditor-stable/js/linkeditor.links.js
resources/linkeditor-stable/js/linkeditor.panels.js
resources/linkeditor-stable/style/inc/_links.sass
resources/views/fluidbook_publication/link_editor.blade.php

index 292a057484d1e355f975b3f95c307059326ec9fd..1feab45f4202b01a3f2b7499015d1a532477cc70 100644 (file)
@@ -136,9 +136,9 @@ LinkeditorAccessibility.prototype = {
             let xdiff = xa - xb;
             let ydiff = ya - yb;
 
-            if (way === 'horizontal') {
+            if (way === 'columns') {
                 return Math.abs(xdiff) > xTolerance ? xdiff : ydiff;
-            } else if (way === 'vertical') {
+            } else if (way === 'lines') {
                 return Math.abs(ydiff) > yTolerance ? ydiff : xdiff;
             }
         });
index 057302d9ed32ddfa5f6abc5c8f8840edd02ea21f..f222a5dbbd92ac5d5fb77e9e9207908b8e8217e0 100644 (file)
@@ -376,13 +376,13 @@ LinkeditorLinks.prototype = {
                         res.items = $.extend(res.items, {
                             "order_selection": {
                                 name: (TRANSLATIONS.reorder_selection) + '', items: {
-                                    'reorder_horizontal': {
-                                        name: TRANSLATIONS.reorder_horizontal, callback: function () {
-                                            $this.reorderSelection('horizontal');
+                                    'reorder_lines': {
+                                        name: TRANSLATIONS.reorder_lines, callback: function () {
+                                            $this.reorderSelection('lines');
                                         }
-                                    }, 'reorder_vertical': {
-                                        name: TRANSLATIONS.reorder_vertical, callback: function () {
-                                            $this.reorderSelection('vertical');
+                                    }, 'reorder_columns': {
+                                        name: TRANSLATIONS.reorder_columns, callback: function () {
+                                            $this.reorderSelection('columns');
                                         }
                                     },
                                 }
index e9150c8af04a686df0cd7f4bf266ddac19444c21..c0d8b57412cf2d164a30f242bc07e668a4f265f0 100644 (file)
@@ -48,7 +48,8 @@ LinkeditorPanels.prototype = {
 
             if ($(this).prop('checked')) {
                 $this.linkeditor.links.selectLink(link);
-            } else {$this.linkeditor.links.deselectLink(link);
+            } else {
+                $this.linkeditor.links.deselectLink(link);
 
             }
             return true;
@@ -147,15 +148,20 @@ 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');
@@ -200,6 +206,9 @@ LinkeditorPanels.prototype = {
 
         if (newState) {
             this.linkeditor.settings.set(side + '_tool', panel);
+            $('body').addClass(panel + '-panel').removeClass('no-' + panel + '-panel');
+        } else {
+            $('body').removeClass(panel + '-panel').addClass('no-' + panel + '-panel');
         }
 
         this.linkeditor.settings.set(side + '_open', newState);
index 24c38cd6def97e1c1c2030481368b80730f6a3e4..bae9e06b44cfe3071803fa613ed95a583a759973 100644 (file)
             &.pendingPolygonCreate
                 clip-path: none !important
 
+        .accessibility-panel &[fb-orderable="1"]:after
+            position: absolute
+            left: 5px
+            top: 5px
+            line-height: 30px
+            display: block
+            color: #000
+            font-weight: bold
+            font-size: 20px
+            content: attr(fb-order)
+            background-color: rgba(255,255,255,0.5)
+            width: 30px
+            height: 30px
+            border-radius: 50%
+            text-align: center
+            border: 1px solid #000
+
         .corners
             visibility: hidden
             position: absolute
index 4844b1816e7e1887843e73a98b1dc0dfaf4d4d6e..f19b666fb1f1dac0a0a9e8c3e8b8026c25f6c5e6 100644 (file)
@@ -86,8 +86,8 @@
         'delete_selection'=>__('Supprimer la sélection'),
         'edit_link_order'=>__('Modifier l\'ordre'),
         'reorder_selection'=>__('Réordonner la sélection'),
-        'reorder_horizontal'=>__('Horizontal puis vertical'),
-        'reorder_vertical'=>__('Vertical puis horizontal'),
+        'reorder_lines'=>__('Par lignes'),
+        'reorder_columns'=>__('Par colonnes'),
         'move_up'=>__('Avant'),
         'move_down'=>__('Après'),
         'move_beginning'=>__('Au début'),