Separated phone numbers and lines in two files

This commit is contained in:
Martin Schröder 2015-05-27 11:54:46 +02:00 committed by Martin Schröder
parent 86ca563825
commit b67619b937
4 changed files with 4 additions and 57 deletions

View file

@ -21,27 +21,6 @@
</luci-config-line>
</luci-config-lines>
</luci-expandable>
<luci-config-heading>{{ 'Phone Lines' | translate }}</luci-config-heading>
<luci-config-info>{{ 'phone.lines.info' | translate }}</luci-config-info>
<luci-expandable title="{{line.name.value}}" ng-repeat="line in phone_lines track by $index">
<luci-config-lines>
<luci-config-line title="Name">
<input type="text" class="form-control" ng-model="line.name.value"/>
</luci-config-line>
<luci-config-line title="Internal Number">
{{line.extension.value}}
</luci-config-line>
<luci-config-line title="Outgoing Calls Number">
<luci-select ng-model="line.sip_account.value" ng-items="allSipAccounts"/>
</luci-config-line>
<luci-config-line title="Call Waiting">
<switch ng-model="line.callwaiting.value" class="green"/>
</luci-config-line>
<luci-config-line title="Call ID Restriction">
<switch ng-model="line.clir.value" class="green"/>
</luci-config-line>
</luci-config-lines>
</luci-expandable>
</luci-config-section>
<luci-config-apply/>
</div>

View file

@ -3,8 +3,8 @@
JUCI.app
.controller("PhoneNumbersPageCtrl", function($scope, $uci){
$uci.sync("voice_client").done(function(){
$scope.phone_lines = $uci.voice_client["@brcm_line"];
$scope.phone_numbers = $uci.voice_client["@sip_service_provider"];
$scope.phone_lines = $uci.voice_client["@brcm_line"];
$scope.allSipAccounts = $scope.phone_numbers.map(function(x){
return {
label: x.name.value,

View file

@ -13,6 +13,9 @@
"phone/numbers": {
"view": "pages/phone.numbers"
},
"phone/lines": {
"view": "pages/phone.lines"
},
"phone/ringing_schedule": {
"view": "pages/phone.ringing_schedule"
},

View file

@ -1,35 +0,0 @@
{
"phone": {
"title": "Phone",
"index": 20
},
"phone/call_log": {
"title": "Call Log",
"acls": [ ],
"index": 10
},
"phone/number_blocking": {
"title": "Number Blocking",
"modes": [ "expert" ],
"acls": [ ],
"index": 20
},
"phone/ringing_schedule": {
"title": "Ringing Schedule",
"modes": [ "expert" ],
"acls": [ ],
"index": 30
},
"phone/numbers": {
"title": "Numbers",
"modes": [ "expert" ],
"acls": [ ],
"index": 40
},
"phone/speed_dialing": {
"title": "Speed Dialing",
"modes": [ "expert" ],
"acls": [ ],
"index": 50
}
}