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

migrate all remaining settings setters

This commit is contained in:
Loic Blot
2017-12-28 18:51:57 +01:00
parent 8f017bc20a
commit 2b6e52205e
3 changed files with 24 additions and 21 deletions
-17
View File
@@ -50,23 +50,6 @@ app.controller('OcSmsController', ['$scope', '$interval', '$timeout', '$compile'
$scope.selectedContact = {};
$scope.lastSearch = '';
$scope.setNotificationSetting = function () {
$.post(Sms.generateURL('/set/notification_state'),
{
'notification': SmsSettings.enableNotifications ? 1 : 0
}
);
};
$scope.setContactOrderSetting = function () {
$.post(Sms.generateURL('/set/contact_order'),
{
'attribute': SmsSettings.contactOrderBy,
'reverse': SmsSettings.reverseContactOrder
}
);
};
// Conversations
$scope.loadConversation = function (contact) {
OC.Util.History.pushState('phonenumber=' + contact.nav);
+21 -1
View File
@@ -33,6 +33,10 @@ var SmsSettings = {
},
sendMessageLimit: function () {
if (this.messageLimit === null) {
return;
}
var self = this;
$.post(Sms.generateURL('/set/msglimit'),
{
@@ -40,7 +44,23 @@ var SmsSettings = {
}
);
},
sendNotificationFlag: function () {
var self = this;
$.post(Sms.generateURL('/set/notification_state'),
{
'notification': self.enableNotifications ? 1 : 0
}
);
},
sendContactOrder: function () {
var self = this;
$.post(Sms.generateURL('/set/contact_order'),
{
'attribute': self.contactOrderBy,
'reverse': self.reverseContactOrder
}
);
},
sendCountry: function () {
$.post(Sms.generateURL('/set/country'),
{