From 085a1c95385d3d9101aa2033db43d50e6f7d2f9f Mon Sep 17 00:00:00 2001 From: ovc Date: Fri, 20 Sep 2024 09:21:06 +0300 Subject: [PATCH] =?UTF-8?q?feat(main):=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=B0=D0=BD=D0=B8=D0=BC=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BD=D0=B0=20=D0=BA=D0=B0=D1=80=D1=82=D0=BE?= =?UTF-8?q?=D1=87=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bx-custom-include/event-log/main.php | 14 -------------- bx-custom-include/kanban-color/script.js | 9 ++++----- bx-custom-include/kanban-color/style.css | 24 ++++++++++++++++-------- 3 files changed, 20 insertions(+), 27 deletions(-) delete mode 100644 bx-custom-include/event-log/main.php diff --git a/bx-custom-include/event-log/main.php b/bx-custom-include/event-log/main.php deleted file mode 100644 index 6b56243..0000000 --- a/bx-custom-include/event-log/main.php +++ /dev/null @@ -1,14 +0,0 @@ - '/local/bx-custom-include/event-log/script.js', - 'css' => '/local/bx-custom-include/event-log/style.css', - 'lang' => '/local/bx-custom-include/event-log/lang_' . LANGUAGE_ID . '.php', - 'rel' => Array('popup', 'ajax', 'fx', 'ls', 'date', 'json', 'window','jquery'), - 'skip_core' => false, - ) -); -CJSCore::Init(array('event-log')); -?> \ No newline at end of file diff --git a/bx-custom-include/kanban-color/script.js b/bx-custom-include/kanban-color/script.js index ab1ff69..7447686 100644 --- a/bx-custom-include/kanban-color/script.js +++ b/bx-custom-include/kanban-color/script.js @@ -7,12 +7,11 @@ BX.addCustomEvent('Kanban.Grid:onRender', grid => { for (let key in items) { if (key < 1) continue; const item = items[key]; - console.log(item); if (!('data' in item) || !('dateCreate' in item.data)) continue; - const SIX_HOURS = 1000 * 60 * 60 * 6; - const createdDate = new Date(item.data.dateCreate); - if ((createdDate + SIX_HOURS) >= Date.now()) { - // new Date("18.09.2024 09:28:58", "DD.MM.YYYY HH:mm:ss") + const HOUR = 1000 * 60 * 60; + const pattern = /^(\d{2})\.(\d{2})\.(\d{4})\s(\d{2})\:(\d{2})\:(\d{2})$/; + const createdDate = new Date(item.data.dateCreate.replace(pattern,'$3-$2-$1 $4:$5:$6')); + if ((Date.now() - createdDate) >= HOUR * 48) { BX.addClass(item.container, 'kanban-color-bg-animate'); } } diff --git a/bx-custom-include/kanban-color/style.css b/bx-custom-include/kanban-color/style.css index ab23482..228d6c0 100644 --- a/bx-custom-include/kanban-color/style.css +++ b/bx-custom-include/kanban-color/style.css @@ -7,9 +7,11 @@ @-webkit-keyframes pulse { 0% { - background-color: #fff; + background-color: #f54819; + } + 50% { + background-color: #f5dcd5; } - 100% { background-color: #f54819; } @@ -17,9 +19,11 @@ @-moz-keyframes pulse { 0% { - background-color: #fff; + background-color: #f54819; + } + 50% { + background-color: #f5dcd5; } - 100% { background-color: #f54819; } @@ -27,9 +31,11 @@ @-o-keyframes pulse { 0% { - background-color: #fff; + background-color: #f54819; + } + 50% { + background-color: #f5dcd5; } - 100% { background-color: #f54819; } @@ -37,9 +43,11 @@ @keyframes pulse { 0% { - background-color: #fff; + background-color: #f54819; + } + 50% { + background-color: #f5dcd5; } - 100% { background-color: #f54819; }