1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-21 05:13:18 +00:00

Load the country settings at app load

This commit is contained in:
Loic Blot
2015-02-16 13:18:48 +00:00
parent 3774653643
commit 77a9e9cccf
4 changed files with 23 additions and 1 deletions
+10
View File
@@ -368,6 +368,15 @@ function desktopNotify(msg) {
}
}
function fetchInitialSettings() {
$.getJSON(OC.generateUrl('/apps/ocsms/get/country'), function(jsondata, status) {
if (jsondata['status'] == true) {
$('#sel_intl_phone').val(jsondata["country"]);
}
else {
}
});
}
(function ($, OC) {
$(document).ready(function () {
// Register real title
@@ -393,6 +402,7 @@ function desktopNotify(msg) {
}
});
fetchInitialSettings();
initDesktopNotifies();
setInterval(refreshConversation, 10000);
setInterval(checkNewMessages, 10000);