kanban-color module added
This commit is contained in:
parent
6ad7948670
commit
228939a4f1
16
bx-custom-include/event-log/!main.php
Normal file
16
bx-custom-include/event-log/!main.php
Normal 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));
|
||||||
|
?>
|
3
bx-custom-include/kanban-color/lang_ru.php
Normal file
3
bx-custom-include/kanban-color/lang_ru.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
?>
|
16
bx-custom-include/kanban-color/main.php
Normal file
16
bx-custom-include/kanban-color/main.php
Normal 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));
|
||||||
|
?>
|
19
bx-custom-include/kanban-color/script.js
Normal file
19
bx-custom-include/kanban-color/script.js
Normal 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');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
46
bx-custom-include/kanban-color/style.css
Normal file
46
bx-custom-include/kanban-color/style.css
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user