kanban-color module added

This commit is contained in:
Олег Цветков 2024-09-19 18:52:09 +03:00
parent 6ad7948670
commit 228939a4f1
5 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,16 @@
<?php
define('EMB_NAME', 'event-log');
CJSCore::RegisterExt(
EMB_NAME,
array(
'js' => '/local/bx-custom-include/' . EMB_NAME . '/script.js',
'css' => '/local/bx-custom-include/' . EMB_NAME . '/style.css',
'lang' => '/local/bx-custom-include/' . EMB_NAME . '/lang_' . LANGUAGE_ID . '.php',
'rel' => Array('popup', 'ajax', 'fx', 'ls', 'date', 'json', 'window','jquery'),
'skip_core' => false,
)
);
CJSCore::Init(array(EMB_NAME));
?>

View File

@ -0,0 +1,3 @@
<?php
?>

View File

@ -0,0 +1,16 @@
<?php
define('EMB_NAME', 'kanban-color');
CJSCore::RegisterExt(
EMB_NAME,
array(
'js' => '/local/bx-custom-include/' . EMB_NAME . '/script.js',
'css' => '/local/bx-custom-include/' . EMB_NAME . '/style.css',
'lang' => '/local/bx-custom-include/' . EMB_NAME . '/lang_' . LANGUAGE_ID . '.php',
'rel' => Array('popup', 'ajax', 'fx', 'ls', 'date', 'json', 'window','jquery'),
'skip_core' => false,
)
);
CJSCore::Init(array(EMB_NAME));
?>

View File

@ -0,0 +1,19 @@
BX.addCustomEvent('Kanban.Grid:onRender', grid => {
if (grid.getData().entityType != 'DYNAMIC_183')
return;
const items = grid.getItems();
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")
BX.addClass(item.container, 'kanban-color-bg-animate');
}
}
});

View File

@ -0,0 +1,46 @@
.kanban-color-bg-animate .crm-kanban-item-line {
-webkit-animation: pulse 2s infinite;
-moz-animation: pulse 2s infinite;
-o-animation: pulse 2s infinite;
animation: pulse 2s infinite;
}
@-webkit-keyframes pulse {
0% {
background-color: #fff;
}
100% {
background-color: #f54819;
}
}
@-moz-keyframes pulse {
0% {
background-color: #fff;
}
100% {
background-color: #f54819;
}
}
@-o-keyframes pulse {
0% {
background-color: #fff;
}
100% {
background-color: #f54819;
}
}
@keyframes pulse {
0% {
background-color: #fff;
}
100% {
background-color: #f54819;
}
}