mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 07:56:23 +00:00
Fix a callback problem
This commit is contained in:
parent
cc14f86893
commit
6e21e47bf2
2
js/app.min.js
vendored
2
js/app.min.js
vendored
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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user