feat(main): добавлена анимация на карточки

This commit is contained in:
Олег Цветков 2024-09-20 09:21:06 +03:00
parent 228939a4f1
commit 085a1c9538
3 changed files with 20 additions and 27 deletions

View File

@ -1,14 +0,0 @@
<?php
CJSCore::RegisterExt(
'event-log',
array(
'js' => '/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'));
?>

View File

@ -7,12 +7,11 @@ BX.addCustomEvent('Kanban.Grid:onRender', grid => {
for (let key in items) { for (let key in items) {
if (key < 1) continue; if (key < 1) continue;
const item = items[key]; const item = items[key];
console.log(item);
if (!('data' in item) || !('dateCreate' in item.data)) continue; if (!('data' in item) || !('dateCreate' in item.data)) continue;
const SIX_HOURS = 1000 * 60 * 60 * 6; const HOUR = 1000 * 60 * 60;
const createdDate = new Date(item.data.dateCreate); const pattern = /^(\d{2})\.(\d{2})\.(\d{4})\s(\d{2})\:(\d{2})\:(\d{2})$/;
if ((createdDate + SIX_HOURS) >= Date.now()) { const createdDate = new Date(item.data.dateCreate.replace(pattern,'$3-$2-$1 $4:$5:$6'));
// new Date("18.09.2024 09:28:58", "DD.MM.YYYY HH:mm:ss") if ((Date.now() - createdDate) >= HOUR * 48) {
BX.addClass(item.container, 'kanban-color-bg-animate'); BX.addClass(item.container, 'kanban-color-bg-animate');
} }
} }

View File

@ -7,9 +7,11 @@
@-webkit-keyframes pulse { @-webkit-keyframes pulse {
0% { 0% {
background-color: #fff; background-color: #f54819;
}
50% {
background-color: #f5dcd5;
} }
100% { 100% {
background-color: #f54819; background-color: #f54819;
} }
@ -17,9 +19,11 @@
@-moz-keyframes pulse { @-moz-keyframes pulse {
0% { 0% {
background-color: #fff; background-color: #f54819;
}
50% {
background-color: #f5dcd5;
} }
100% { 100% {
background-color: #f54819; background-color: #f54819;
} }
@ -27,9 +31,11 @@
@-o-keyframes pulse { @-o-keyframes pulse {
0% { 0% {
background-color: #fff; background-color: #f54819;
}
50% {
background-color: #f5dcd5;
} }
100% { 100% {
background-color: #f54819; background-color: #f54819;
} }
@ -37,9 +43,11 @@
@keyframes pulse { @keyframes pulse {
0% { 0% {
background-color: #fff; background-color: #f54819;
}
50% {
background-color: #f5dcd5;
} }
100% { 100% {
background-color: #f54819; background-color: #f54819;
} }