diff --git a/luciexpress/htdocs/plugins/core/widgets/luci.brightness.js b/luciexpress/htdocs/plugins/core/widgets/luci.brightness.js index 5a6410f9d..414e43997 100644 --- a/luciexpress/htdocs/plugins/core/widgets/luci.brightness.js +++ b/luciexpress/htdocs/plugins/core/widgets/luci.brightness.js @@ -8,7 +8,8 @@ JUCI.app scope: { model: "=ngModel", min: "@", - max: "@" + max: "@", + ngChange: "&" }, templateUrl: plugin_root+"/widgets/luci.brightness.html", replace: true, @@ -25,6 +26,7 @@ JUCI.app var total = (max - min); var step = total / 5; var base_color = "ff"; + var last_value = $scope.model; function update(){ var bars = []; @@ -39,6 +41,12 @@ JUCI.app //console.log("value: "+$scope.model+" "+bar.color); bars.push(bar); } + setTimeout(function(){ + if($scope.model !== last_value && $scope.ngChange) { + last_value = $scope.model; + $scope.ngChange(); + } + }, 0); $scope.bars = bars; } update(); diff --git a/luciexpress/htdocs/plugins/phone/menu.json b/luciexpress/htdocs/plugins/phone/menu.json new file mode 100644 index 000000000..910e3bf21 --- /dev/null +++ b/luciexpress/htdocs/plugins/phone/menu.json @@ -0,0 +1,41 @@ +{ + "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": "Phone Numbers", + "modes": [ "expert" ], + "acls": [ ], + "index": 40 + }, + "phone/lines": { + "title": "Phone Lines", + "modes": [ "expert" ], + "acls": [ ], + "index": 41 + }, + "phone/speed_dialing": { + "title": "Speed Dialing", + "modes": [ "expert" ], + "acls": [ ], + "index": 50 + } +} diff --git a/luciexpress/htdocs/plugins/phone/pages/phone.lines.html b/luciexpress/htdocs/plugins/phone/pages/phone.lines.html new file mode 100644 index 000000000..552323fb0 --- /dev/null +++ b/luciexpress/htdocs/plugins/phone/pages/phone.lines.html @@ -0,0 +1,28 @@ + +
+ + {{ 'Phone Lines' | translate }} + {{ 'phone.lines.info' | translate }} + + + + + + + {{line.extension.value}} + + + + + + + + + + + + + + +
+
diff --git a/luciexpress/htdocs/plugins/phone/pages/phone.lines.js b/luciexpress/htdocs/plugins/phone/pages/phone.lines.js new file mode 100644 index 000000000..2d29d29fb --- /dev/null +++ b/luciexpress/htdocs/plugins/phone/pages/phone.lines.js @@ -0,0 +1,16 @@ +//! Author: Martin K. Schröder + +JUCI.app +.controller("PhoneLines", 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.allSipAccounts = $scope.phone_numbers.map(function(x){ + return { + label: x.name.value, + value: x[".name"] + } + }); + $scope.$apply(); + }); +}); diff --git a/luciexpress/htdocs/plugins/settings/pages/settings.energy.html b/luciexpress/htdocs/plugins/settings/pages/settings.energy.html index d3eee9588..454fbded0 100644 --- a/luciexpress/htdocs/plugins/settings/pages/settings.energy.html +++ b/luciexpress/htdocs/plugins/settings/pages/settings.energy.html @@ -8,20 +8,19 @@ - + - + - + - + - diff --git a/luciexpress/htdocs/plugins/settings/pages/settings.energy.js b/luciexpress/htdocs/plugins/settings/pages/settings.energy.js index 27af07f68..1ac7f4cce 100644 --- a/luciexpress/htdocs/plugins/settings/pages/settings.energy.js +++ b/luciexpress/htdocs/plugins/settings/pages/settings.energy.js @@ -7,4 +7,7 @@ JUCI.app $scope.boardpanel = $uci.boardpanel; $scope.$apply(); }); + $scope.onSave = function(){ + $uci.save(); + } });