mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
N°8641 - Dashboard editor front-end first commit for Form SDK integration.
* No dashlet edition * Dashboard are not persisted * Unable to load a dashboard from an endpoint (refresh) * Grid library need proper npm integration
This commit is contained in:
13
templates/base/layouts/dashlet-panel/layout.js.twig
Normal file
13
templates/base/layouts/dashlet-panel/layout.js.twig
Normal file
@@ -0,0 +1,13 @@
|
||||
(() => {
|
||||
const oDashletEntries = document.querySelectorAll('#{{ oUIBlock.GetId() }} .ibo-dashlet-entry');
|
||||
$('#{{ oUIBlock.GetId() }} .ibo-dashlet-entry').on('click', (event) => {
|
||||
const sDashletClass = event.currentTarget.getAttribute('data-dashlet-class');
|
||||
const oDashboard = document.querySelector('ibo-dashboard');
|
||||
oDashboard.AddNewDashlet(sDashletClass, {
|
||||
'minW': event.currentTarget.getAttribute('data-min-width'),
|
||||
'minH': event.currentTarget.getAttribute('data-min-height'),
|
||||
'w': event.currentTarget.getAttribute('data-preferred-width'),
|
||||
'h': event.currentTarget.getAttribute('data-preferred-height')
|
||||
});
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user