j-NotificationsPanel
- Szingapúr
- Tanulj a példából
konfiguráció:
top {Number}felső offset (default:0)visibleY {Boolean}mutatja Y csavarbár (default:true)title {String}cím az értesítési panelben (default:Notifications)autoremove {Boolean}törli a bejelentéseket kattintva rá (default:true)click {String}afunction(obj, el)módszerhez vezető út, amikor a felhasználó kattint az értesítésekreexec {String}- út afunction(render(ARR_OF_OBJECT))módszerre, amikor a felhasználó meg akarja mutatni az értesítéseket
Használja a <ui-component name="notificationspanel">Amennyiben a készülék még nem tölthető le, jComponent letöltés az első felhasználásra a címről DEF.fallback (Azt a Componentator A szerző: Peter Širka. forrás: a Componentator Az összetevők raktár, MIT licenc.
<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>