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) {
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');
}
}

View File

@ -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;
}