1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-11 16:32:55 +00:00

Fix a callback problem

This commit is contained in:
Loic Blot
2017-12-28 18:37:29 +01:00
parent cc14f86893
commit 6e21e47bf2
2 changed files with 8 additions and 7 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -6
View File
@@ -18,15 +18,16 @@ var SmsSettings = {
// Functions
init: function () {
var self = this;
$.getJSON(Sms.generateURL('/front-api/v1/settings'), function (jsondata, status) {
if (jsondata['status'] === true) {
this.messageLimit = parseInt(jsondata["message_limit"]);
this.enableNotifications = parseInt(jsondata["notification_state"]) !== 0;
this.contactOrderBy = jsondata["contact_order"];
this.reverseContactOrder = toBool(jsondata["contact_order_reverse"]);
this.country = jsondata["country"];
self.messageLimit = parseInt(jsondata["message_limit"]);
self.enableNotifications = parseInt(jsondata["notification_state"]) !== 0;
self.contactOrderBy = jsondata["contact_order"];
self.reverseContactOrder = toBool(jsondata["contact_order_reverse"]);
self.country = jsondata["country"];
this.updateView();
self.updateView();
}
});
},