1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-07 16:06:15 +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
No known key found for this signature in database
GPG Key ID: EFAA458E8C153987
2 changed files with 8 additions and 7 deletions

2
js/app.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -18,15 +18,16 @@ var SmsSettings = {
// Functions // Functions
init: function () { init: function () {
var self = this;
$.getJSON(Sms.generateURL('/front-api/v1/settings'), function (jsondata, status) { $.getJSON(Sms.generateURL('/front-api/v1/settings'), function (jsondata, status) {
if (jsondata['status'] === true) { if (jsondata['status'] === true) {
this.messageLimit = parseInt(jsondata["message_limit"]); self.messageLimit = parseInt(jsondata["message_limit"]);
this.enableNotifications = parseInt(jsondata["notification_state"]) !== 0; self.enableNotifications = parseInt(jsondata["notification_state"]) !== 0;
this.contactOrderBy = jsondata["contact_order"]; self.contactOrderBy = jsondata["contact_order"];
this.reverseContactOrder = toBool(jsondata["contact_order_reverse"]); self.reverseContactOrder = toBool(jsondata["contact_order_reverse"]);
this.country = jsondata["country"]; self.country = jsondata["country"];
this.updateView(); self.updateView();
} }
}); });
}, },