jellyfin-web/dashboard-ui/scripts/notificationlist.js

1 line
603 B
JavaScript
Raw Normal View History

2017-01-27 20:16:59 -07:00
define(["jQuery"],function($){"use strict";$(document).on("pageshow","#notificationsPage",function(){if(Dashboard.getCurrentUserId()){var elem=$(".notificationsList"),startIndex=0,limit=10;Notifications.showNotificationsList(startIndex,limit,elem),elem.on("click",".btnPreviousPage",function(e){e.preventDefault(),startIndex-=limit,startIndex<0&&(startIndex=0),Notifications.showNotificationsList(startIndex,limit,elem)}).on("click",".btnNextPage",function(e){e.preventDefault(),startIndex+=limit,Notifications.showNotificationsList(startIndex,limit,elem)}),Notifications.markNotificationsRead([])}})});