blob: 72c11c734024968e4616a6065e5b28261392a7f5 [file] [log] [blame]
From 0f553cf771f7d9ed08efc66ddd3b9bedb21150a1 Mon Sep 17 00:00:00 2001
From: Jin Rong <rongjin@asrmicro.com>
Date: Thu, 3 Jan 2019 11:37:27 +0800
Subject: [PATCH] webui: add new sms prompt
type: design
Area: webui
Details: add a prompt box in webui when new sms arrived
Usage impact: No
Test Plan: test
URT: N/A
Simplicity: 2518
Signed-off-by: Jin Rong <rongjin@asrmicro.com>
---
www/js/panel/dashboard.js | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/www/js/panel/dashboard.js b/www/js/panel/dashboard.js
index 7be9ce7..7eadd35 100644
--- a/www/js/panel/dashboard.js
+++ b/www/js/panel/dashboard.js
@@ -15,7 +15,6 @@
PostXml("cm","connection_switch",configMap);
GetWanConfig();
GetLinkContext();
-
});
$("#lt_dashbd_resetTrafficStatistic").click(function() {
@@ -26,6 +25,7 @@
GetTrafficStaticInfo();
});
}
+ GetSmsNewArrive();
GetSimStatus();
GetWifiStatus();
GetLinkContext();
@@ -35,7 +35,7 @@
GetConnectedDeviceInfo();
GetTrafficStaticInfo();
GetVersionInfo();
- GetEngLteInfo();
+ GetEngLteInfo();
}
function GetEngLteInfo() {
@@ -565,6 +565,21 @@
return authType;
}
+ function GetSmsNewArrive() {
+ var retXml = PostXml("sms","sms.get_new_num");
+ var smsNewNum = $(retXml).find("new_num").text();
+
+ if (smsNewNum > 0) {
+ var smsNewNotifyMsg = "";
+ if (smsNewNum > 1)
+ smsNewNotifyMsg = smsNewNum + " " + jQuery.i18n.prop("lsmsMoreNewArrivedSMS");
+ else
+ smsNewNotifyMsg = smsNewNum + " " + jQuery.i18n.prop("lsmsOneNewArrivedSMS");
+
+ showMsgBox(jQuery.i18n.prop("lsmsNotification"), smsNewNotifyMsg);
+ }
+ }
+
return this.each(function() {
_dashboardIntervalID = setInterval("g_objContent.onLoad(false)", _dashboardInterval);
});
--
1.9.1