mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-23 22:32:54 +00:00
Fix a callback problem
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user