# j-Kanban

> Ważne: każdy element potrzebuje własnego ID {String}, zobacz przykład.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: pl
Content-SHA256: ed95c60cef40ab84a13384d26e4f3e1d96cbfee793a3a09100506ae9bf9bd232
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

__Konfiguracja__:

- `parent {String}` - pojemnik o stałej wysokości, może być `window`. wartość domyślna: element `parent`.
- `margin {Number}` - górna / dolna marża (default: `0`)
- `padding {Number}` - podłączenie między paneli (default: `10`)
- `style {Number}` styl, `1` (default): pudełko będzie miało pełną wysokość, pudełka `2` będzie miał `max-height `
- Ścieżka `move {String}` do metody `function(group, target)` jest wykonywana, jeśli użytkownik przenosi element do innej grupy
- Ścieżka `remove {String}` do metody `function(group)` jest wykonywana, jeśli użytkownik usuwa element w grupie
- Ścieżka `dblclick {String}` do metody `function(group)` jest wykonywana, jeśli użytkownik wykonuje podwójne kliknięcie

__Metody__:

- `component.remove(id)` może usunąć element w grupie
- `component.findgroup(id)` zwraca instancję grupy

__Important__: Każdy element potrzebuje własnego ID {String}, zobacz przykład.

Użyj go z `<ui-component name="kanban">`Gdy element nie jest jeszcze ładowany, jComponent Pobierz go po pierwszym użyciu z adresu `DEF.fallback` (Wydaje się Componentator Autor: Peter Širka Źródło: Componentator Zestaw składników, licencja MIT.

```html example.html
<style>
	.caption { line-height: 50px; border-bottom: 1px solid #E0E0E0; padding: 0 10px; font-weight: bold; }
	.ui-dark .caption { border-bottom-color: #404040; }
</style>

<ui-component name="kanban" path="items" config="parent:window;move:onmoveitem;margin:50">

	<!-- Group header rendering -->
	<script type="text/html">
		<div class="caption">{{ name }}</div>
	</script>

	<!-- Item rendering -->
	<script type="text/html">
		<div>{{ name }}</div>
	</script>
</ui-component>

<script>

	var items = [];
	items.push({ id: '1', name: 'In progress', items: [{ id: '11', name: 'Better life Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea culpa voluptatem asperiores aspernatur doloremque cupiditate error, qui sit est quas.' }] });
	items.push({ id: '2', name: 'Pending', items: [{ id: '21', name: 'Improve j-ChunkyScroll' }] });
	items.push({ id: '3', name: 'Done', items: [{ id: '31', name: 'Fix scrollbars j-DataGrid' }, { id: '32', name: 'Improve performace' }] });

	function onmoveitem(group, target) {
		console.log('MOVEMENT:', group, target);
	}

</script>
```
