mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 07:56:23 +00:00
Try to migrate some settings send function
This commit is contained in:
parent
6e21e47bf2
commit
8f017bc20a
2
js/app.min.js
vendored
2
js/app.min.js
vendored
File diff suppressed because one or more lines are too long
@ -50,15 +50,6 @@ app.controller('OcSmsController', ['$scope', '$interval', '$timeout', '$compile'
|
|||||||
$scope.selectedContact = {};
|
$scope.selectedContact = {};
|
||||||
$scope.lastSearch = '';
|
$scope.lastSearch = '';
|
||||||
|
|
||||||
// Settings
|
|
||||||
$scope.sendCountry = function () {
|
|
||||||
$.post(Sms.generateURL('/set/country'), {'country': $('select[name=intl_phone]').val()});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.setMessageLimit = function () {
|
|
||||||
$.post(Sms.generateURL('/set/msglimit'), {'limit': SmsSettings.messageLimit});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.setNotificationSetting = function () {
|
$scope.setNotificationSetting = function () {
|
||||||
$.post(Sms.generateURL('/set/notification_state'),
|
$.post(Sms.generateURL('/set/notification_state'),
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,23 @@ var SmsSettings = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
sendMessageLimit: function () {
|
||||||
|
var self = this;
|
||||||
|
$.post(Sms.generateURL('/set/msglimit'),
|
||||||
|
{
|
||||||
|
'limit': self.messageLimit
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
sendCountry: function () {
|
||||||
|
$.post(Sms.generateURL('/set/country'),
|
||||||
|
{
|
||||||
|
'country': $('select[name=intl_phone]').val()
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
// This function should be moved to a renderer or something else
|
// This function should be moved to a renderer or something else
|
||||||
updateView: function () {
|
updateView: function () {
|
||||||
$('#sel_intl_phone').val(this.country);
|
$('#sel_intl_phone').val(this.country);
|
||||||
|
@ -25,7 +25,7 @@ use \OCA\OcSms\Lib\CountryCodes;
|
|||||||
</div>
|
</div>
|
||||||
<div id="app-settings-content">
|
<div id="app-settings-content">
|
||||||
<div><label for="setting_msg_per_page">Max messages on tab loading</label>
|
<div><label for="setting_msg_per_page">Max messages on tab loading</label>
|
||||||
<input type="number" min="10" max="10000" name="setting_msg_per_page" ng-model="vsettings.messageLimit" ng-change="setMessageLimit()" to-int />
|
<input type="number" min="10" max="10000" name="setting_msg_per_page" ng-model="vsettings.messageLimit" ng-change="vsettings.sendMessageLimit()" to-int />
|
||||||
<span class="label-invalid-input" ng-if="vsettings.messageLimit == null || vsettings.messageLimit == undefined">Invalid message limit</span>
|
<span class="label-invalid-input" ng-if="vsettings.messageLimit == null || vsettings.messageLimit == undefined">Invalid message limit</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ use \OCA\OcSms\Lib\CountryCodes;
|
|||||||
<option><?php p($code); ?></option>
|
<option><?php p($code); ?></option>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
<button class="new-button primary icon-checkmark-white" ng-click="sendCountry();"></button>
|
<button class="new-button primary icon-checkmark-white" ng-click="vsettings.sendCountry();"></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user