From 13aedbc6c62d8afc6a764f0b63bfe05fd075a505 Mon Sep 17 00:00:00 2001 From: dilanua Date: Thu, 22 Sep 2016 18:19:28 +0530 Subject: [PATCH] Updating notifications side bar - UI --- .../mdm.unit.ui.navbar.nav-menu/public/js/nav-menu.js | 10 +++------- .../public/templates/notifications.hbs | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) 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 870efca1e..86cde4124 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 @@ -85,11 +85,7 @@ var updateNotificationCountOnSuccess = function (data, textStatus, jqXHR) { if (jqXHR.status == 200 && data) { var responsePayload = JSON.parse(data); var newNotificationsCount = responsePayload["count"]; - if (newNotificationsCount > 5) { - $(notificationBubble).html("5 +  NEW"); - $(notificationBubble).removeClass("hidden"); - $(notificationSpacer).removeClass("hidden"); - } else if (newNotificationsCount <= 5 && newNotificationsCount > 0) { + if (newNotificationsCount > 0) { $(notificationBubble).html(newNotificationsCount + " NEW"); $(notificationBubble).removeClass("hidden"); $(notificationSpacer).removeClass("hidden"); @@ -111,7 +107,7 @@ function loadNewNotificationsOnSideViewPanel() { if ($("#right-sidebar").attr("is-authorized") == "false") { $("#notification-bubble-wrapper").remove(); } else { - var serviceURL = emmAdminBasePath + "/notifications?offset=0&limit=5&status=NEW"; + var serviceURL = emmAdminBasePath + "/notifications?offset=0&limit=6&status=NEW"; invokerUtil.get(serviceURL, updateNotificationCountOnSuccess, updateNotificationCountOnError); loadNewNotifications(); } @@ -126,7 +122,7 @@ function loadNewNotifications() { var currentUser = notifications.data("currentUser"); $.template("notification-listing", notifications.attr("src"), function (template) { - var serviceURL = emmAdminBasePath + "/notifications?offset=0&limit=5&status=NEW"; + var serviceURL = emmAdminBasePath + "/notifications?offset=0&limit=6&status=NEW"; invokerUtil.get( serviceURL, // on success 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/templates/notifications.hbs 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/templates/notifications.hbs index 765b29af1..cbbe19976 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/templates/notifications.hbs +++ 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/templates/notifications.hbs @@ -5,9 +5,9 @@
  • - Failure on {{deviceType}} {{deviceName}}