From 9f258df1d22abf0eb984790e52287a27e3d2d550 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 15 Sep 2016 08:34:00 +0530 Subject: [PATCH] Fixing EMM-1551: Notifications are flooded on side pane. --- .../units/mdm.unit.ui.navbar.nav-menu/public/js/nav-menu.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/public/js/nav-menu.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/public/js/nav-menu.js index d80f6c6d51..13c43e5dac 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/public/js/nav-menu.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/public/js/nav-menu.js @@ -117,7 +117,7 @@ function loadNewNotifications() { var currentUser = notifications.data("currentUser"); $.template("notification-listing", notifications.attr("src"), function (template) { - var serviceURL = emmAdminBasePath + "/notifications?status=NEW"; + var serviceURL = emmAdminBasePath + "/notifications?offset=0&limit=5&status=NEW"; invokerUtil.get( serviceURL, // on success @@ -128,6 +128,7 @@ function loadNewNotifications() { if (responsePayload["notifications"]) { if (responsePayload.count > 0) { viewModel["notifications"] = responsePayload["notifications"]; + viewModel["appContext"] = context; $(messageSideBar).html(template(viewModel)); } else { $(messageSideBar).html('');