]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6709 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 2 Feb 2024 14:47:47 +0000 (15:47 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 2 Feb 2024 14:47:47 +0000 (15:47 +0100)
app/Models/Base/ToolboxStatusModel.php
app/Models/FluidbookPublication.php
app/Models/TeamServers.php
resources/linkeditor/js/linkeditor.js
resources/linkeditor/js/linkeditor.utils.js
resources/views/columns/fluidbook_status.blade.php

index 69f1786a0c8a8090b8528a973b432746d0856d61..834fcfae0cdebaf3283d6b6b517ba558beb6676c 100644 (file)
@@ -29,6 +29,10 @@ class ToolboxStatusModel extends ToolboxModel
         $this->status = $newStatus;
     }
 
+    public function allowsChangeStatus(){
+        return true;
+    }
+
     public function allowsDelete()
     {
         if (!parent::allowsDelete()) {
index 17e3fe9a94729a326e87dafbf37b6e8231e8b88a..7619310cab23fb310bcef39fff03574ca8cdc0d8 100644 (file)
@@ -1187,6 +1187,14 @@ class FluidbookPublication extends ToolboxStatusModel
         return $list;
     }
 
+    public function allowsChangeStatus()
+    {
+        if ($this->version < 3) {
+            return false;
+        }
+        return parent::allowsChangeStatus();
+    }
+
     public function allowsPreview()
     {
         return parent::allowsPreview() && $this->getPagesNumber() > 0;
index c2d07702ead8e7941671117f8fee9544bb7f6151..83dee3f2354f6d0de20e4d9bfedc438d9a9be304 100644 (file)
@@ -119,7 +119,7 @@ ufw default allow outgoing
                 $openPorts[] = 25;
                 $openPorts[] = 143;
                 $openPorts[] = 465;
-                $openPorts[] = 487;
+                $openPorts[] = 587;
                 $openPorts[] = 993;
                 $openPorts[] = 4190;
             }
index b8823ba8d807d866f4639b63728cfd5c119d0cb5..d7908dc2279db67eb0510b64e188fc439bc2fd3f 100644 (file)
@@ -31,7 +31,7 @@ window.Noty = Noty;
 window.GrahamScan = GrahamScan;
 
 window.key.filter = function (event) {
-    keyfilter(event);
+    return keyfilter(event);
 };
 
 function keyfilter(event, disable = false) {
index 05a3efd6419db85fda345a6f7f142b5ec4c06a47..de2dc50751a22a04f6823d923d2843d4b1d934c4 100644 (file)
@@ -147,9 +147,13 @@ LinkeditorUtils.prototype = {
 
     roundDimension: function (v) {
         return (Math.round(v * 100000) / 100000);
-    }, intersectRect: function (r1, r2) {
+    },
+
+    intersectRect: function (r1, r2) {
         return !(r2.left > r1.right || r2.right < r1.left || r2.top > r1.bottom || r2.bottom < r1.top);
-    }, isfocusOnFormItem: function () {
+    },
+
+    isfocusOnFormItem: function () {
         return $(document.activeElement).is('input[type="text"],input[type="email"],input[type="number"],input[type="tel"],input[type="search"],textarea,select');
     },
 
index a4a0a4d20f81b0ef1cbba7429ea96f642c7415c9..ca5fae1e7759c19c2a4b58014ab52cf602463512 100644 (file)
@@ -6,15 +6,19 @@
 
 @can('fluidbook-publication:admin')
     <span data-{{$entry->getOption('name')}}-{{$column['name']}}="{{$values}}">
-        <a href="#"
-           data-toggle="tooltip"
-           data-context-disabled-action="{{$values}}"
-           data-context-actions="{{json_encode($column['options'])}}"
-           data-context-route="{{$crud->route}}/$id/changestatus/$action"
-           data-context-id="{{$entry->getKey()}}"
-           data-context-callback="statusCallback"
-           title="{{__('Changer le status')}}"
-        >{{$v}}</a>
+        @if($entry->allowsChangeStatus())
+            <a href="#"
+               data-toggle="tooltip"
+               data-context-disabled-action="{{$values}}"
+               data-context-actions="{{json_encode($column['options'])}}"
+               data-context-route="{{$crud->route}}/$id/changestatus/$action"
+               data-context-id="{{$entry->getKey()}}"
+               data-context-callback="statusCallback"
+               title="{{__('Changer le status')}}"
+            >{{$v}}</a>
+        @else
+            {{$v}}
+        @endif
 
         @if($entry->extranet_task)
             <a target="_blank"