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:
@@ -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
@@ -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'),
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user