j-Planner
Data-source needs to contain:
{
items: [{ id: '12345', name: 'A name of plan', dtbeg: NOW.add('-5 days'), dtend: NOW.add('3 days'), progress: 30, color: '#5385EA', title: 'A tooltip' }, ...] // items
year: 2019
}Configuration:
days {String}pluralization for days (optional, default:# days,# day,# days,# days)exec {String}a path to variable or methodfunction(item, el), it's evaluated if the user will click on the itemscroll {String}a path to variable or methodfunction(y), it's evaluated if the user will scroll plannerparent {String}optional, a container with fixed width/height, can bewindow. Default value:parentelement.)
Use it with <ui-component name="planner">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.
<style>
body{padding:0;margin:0;background-color:#F0F0F0;font-family:Arial;height:100%;}
html{height:100%;}
</style>
<ui-component name="planner" path="obj" config="exec:selected">
</ui-component>
<script>
var obj = {};
obj.year = NOW.getFullYear();
obj.items = [];
obj.items.push({ id: '1', name: 'jComponent', dtbeg: NOW.add('-5 days'), dtend: NOW.add('3 days'), progress: 30, color: '#769DEA' });
obj.items.push({ id: '2', name: 'Total.js', dtbeg: NOW.add('-5 days'), dtend: NOW.add('3 days'), progress: 30, color: '#EACA76' });
function selected(item, g) {
console.log(item, g);
}
</script>