# j-NotificationsPanel

> j-NotificationsPanel: лесен за използване; сингъл

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

- Синглът
- Научете се от примера


__Конфигуриране__:

- `top {Number}` Оферти за дефолт (по подразбиране: `0`)
- `visibleY {Boolean}` показва Y скалбар (дефолт: `true`)
- Заглавие на `title {String}` в панела за уведомления (предварително: `Notifications`)
- `autoremove {Boolean}` премахва уведомленията след като кликнете върху него (предварително: `true`)
- `click {String}` е пътят към метода `function(obj, el)` когато потребителят кликне върху уведомленията
- `exec {String}` е пътят към метода `function(render(ARR_OF_OBJECT))` когато потребителят иска да покаже уведомленията

Използвайте го с `<ui-component name="notificationspanel">`Когато компонентът все още не е зареден, jComponent Изтегляне на първия адрес в `DEF.fallback` (След това Componentator Източник: Питър Шерка Componentator Съставни съставки, лиценз на MIT.

```html example.html
<ui-component name="notificationspanel" path="shownotifications" config="exec:loadnotifications;click:clicknotificiation">
	<script type="text/html">
		<h2>{{ name }}</h2>
		<p>{{ body }}</p>
		<hr />
	</script>
</ui-component>

<script>

	var shownotifications = false;

	// Shows notifications panel after 2 seconds
	SET('shownotifications', true, 2000);

	// The method will be executed automatically before the notifications panel will be visible
	function loadnotifications(render) {
		var arr = [];
		arr.push({ name: 'Name of notifications 1', body: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos, architecto!' });
		arr.push({ name: 'Name of notifications 2', body: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos, architecto!' });
		arr.push({ name: 'Name of notifications 3', body: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos, architecto!' });

		// IMPORTANT:
		// This renders notifications onto notifications panel
		render(arr);
	}

	function clicknotificiation(obj) {
		console.log('CLICK', obj);
	}

</script>
```
