]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Добавление логирования на загрузку файлов в документ списания.
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Tue, 17 Feb 2026 06:58:20 +0000 (09:58 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Tue, 17 Feb 2026 06:58:20 +0000 (09:58 +0300)
erp24/migrations/m260215_200000_create_upload_speed_tests_table.php
erp24/views/write_offs_erp/create.php
erp24/web/js/upload-speed-test.js

index f9e5f8887acdb8b3bce42de1232f8101591d7f84..e240f05fabdc48de85241541a715e2df08d8c37d 100644 (file)
@@ -7,7 +7,7 @@ use yii\db\Migration;
  */
 class m260215_200000_create_upload_speed_tests_table extends Migration
 {
-    const TABLE_NAME = 'upload_speed_tests';
+    const TABLE_NAME = 'erp24.upload_speed_tests';
 
     public function safeUp()
     {
index 355f7effd86b600ab2d3f0882a97bda470e64c1f..a0aec30e437530e7148109b2b21833b09ecc0461 100644 (file)
@@ -22,17 +22,23 @@ $this->registerJsFile('/js/upload-speed-test.js', ['position' => \yii\web\View::
     <h1><?= Html::encode($this->title) ?></h1>
 
     <div class="mb-3">
-        <button type="button" id="btn-speed-test" class="btn btn-outline-secondary btn-sm">
+        <a href="#" id="speed-test-toggle" style="color:#6c757d; text-decoration:none; font-size:14px; display:inline-flex; align-items:center; gap:4px; user-select:none;">
+            <span id="speed-test-chevron" style="display:inline-block; transition:transform .2s; font-size:10px;">&#9654;</span>
             Тест скорости загрузки
-        </button>
-        <div id="speed-test-progress" style="display:none; max-width:400px;" class="mt-2">
-            <div class="progress" style="height:22px;">
-                <div id="speed-test-bar" class="progress-bar bg-primary progress-bar-striped progress-bar-animated"
-                     role="progressbar" style="width:0%">0%</div>
+        </a>
+        <div id="speed-test-panel" style="display:none; padding-top:10px;">
+            <button type="button" id="btn-speed-test" class="btn btn-outline-secondary btn-sm">
+                Запустить тест
+            </button>
+            <div id="speed-test-progress" style="display:none; max-width:400px;" class="mt-2">
+                <div class="progress" style="height:22px;">
+                    <div id="speed-test-bar" class="progress-bar bg-primary progress-bar-striped progress-bar-animated"
+                         role="progressbar" style="width:0%">0%</div>
+                </div>
+                <small id="speed-test-progress-text" class="text-muted"></small>
             </div>
-            <small id="speed-test-progress-text" class="text-muted"></small>
+            <div id="speed-test-result"></div>
         </div>
-        <div id="speed-test-result"></div>
     </div>
 
     <?php
index 1832d374992d129e4bb9f80757d4e42401d610f3..df8a7610684fd1480792b7d3b7ebf3fddeb238d3 100644 (file)
     }
 
     document.addEventListener('DOMContentLoaded', function () {
+        var toggle = document.getElementById('speed-test-toggle');
+        var panel = document.getElementById('speed-test-panel');
+        var chevron = document.getElementById('speed-test-chevron');
+
+        if (toggle && panel && chevron) {
+            toggle.addEventListener('click', function (e) {
+                e.preventDefault();
+                var isOpen = panel.style.display !== 'none';
+                panel.style.display = isOpen ? 'none' : 'block';
+                chevron.style.transform = isOpen ? 'rotate(0deg)' : 'rotate(90deg)';
+            });
+        }
+
         var btn = document.getElementById('btn-speed-test');
         if (btn) {
             btn.addEventListener('click', function () {