mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
Fixed chrome bug (missing Object.assign)
This commit is contained in:
parent
4d234f0363
commit
34c91ff769
3 changed files with 50 additions and 2 deletions
|
|
@ -12,6 +12,32 @@ require.config({
|
|||
urlArgs: 'v=1.0'
|
||||
});
|
||||
|
||||
|
||||
Object.assign = Object.assign || function (target, source) {
|
||||
function ToObject(val) {
|
||||
if (val == null) {
|
||||
throw new TypeError('Object.assign cannot be called with null or undefined');
|
||||
}
|
||||
|
||||
return Object(val);
|
||||
}
|
||||
|
||||
var from;
|
||||
var keys;
|
||||
var to = ToObject(target);
|
||||
|
||||
for (var s = 1; s < arguments.length; s++) {
|
||||
from = arguments[s];
|
||||
keys = Object.keys(Object(from));
|
||||
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
to[keys[i]] = from[keys[i]];
|
||||
}
|
||||
}
|
||||
|
||||
return to;
|
||||
};
|
||||
|
||||
JUCI.app.config(function ($stateProvider, $locationProvider, $compileProvider, $urlRouterProvider, $controllerProvider, $provide) {
|
||||
console.log("CONF");
|
||||
//$locationProvider.otherwise({ redirectTo: "/" });
|
||||
|
|
|
|||
|
|
@ -1,5 +1,27 @@
|
|||
<luci-layout-with-sidebar>
|
||||
<div ng-controller="SettingsNetworkCtrl">
|
||||
Network
|
||||
<luci-config-section>
|
||||
<luci-config-heading>{{ 'Network Settings' | translate }}</luci-config-heading>
|
||||
<p translate ng-hide="boardpanel">Missing uci config boardpanel.</p>
|
||||
</luci-config-section>
|
||||
<luci-config-section ng-show="boardpanel">
|
||||
<luci-config-info>{{ 'settings.energy.info' | translate }}</luci-config-info>
|
||||
<luci-config-lines>
|
||||
<luci-config-line title="{{'USB Port'|translate}}">
|
||||
<switch id="enabled" name="enabled" ng-model="boardpanel.settings.usb_port.value" class="green"></switch>
|
||||
</luci-config-line>
|
||||
<luci-config-line title="{{'Status-LED'|translate}}">
|
||||
<switch id="enabled" name="enabled" ng-model="boardpanel.settings.status_led.value" class="green"></switch>
|
||||
</luci-config-line>
|
||||
<luci-config-line title="{{'Power-LED'|translate}}">
|
||||
<switch id="enabled" name="enabled" ng-model="boardpanel.settings.power_led.value" class="green"></switch>
|
||||
</luci-config-line>
|
||||
<luci-config-line title="{{'Power-LED Brightness'|translate}}" no-pull>
|
||||
<luci-slider ng-model="boardpanel.settings.power_led_br.value" min="0" max="100"></luci-slider>
|
||||
<!--<switch id="enabled" name="enabled" ng-model="boardpanel.settings.power_led_br.value" class="green"></switch>-->
|
||||
</luci-config-line>
|
||||
</luci-config-lines>
|
||||
<luci-config-apply></luci-config-apply>
|
||||
</luci-config-section>
|
||||
</div>
|
||||
</luci-layout-with-sidebar>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ var completed = {
|
|||
"configuration": 1,
|
||||
"energy": 1,
|
||||
"network": 0,
|
||||
"password": 0,
|
||||
"password": 1,
|
||||
"upgrade": 0
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue