#6 UI Updates senden und anzeigen
This commit is contained in:
parent
071d9b23e9
commit
d9b57bd867
@ -7,6 +7,7 @@ $(function() {
|
||||
self.printer = parameters[2];
|
||||
|
||||
self.mystromswitchEnabled = ko.observable();
|
||||
self.mystromswitchPowerValue = document.getElementById("mystromswitchPowerValue")
|
||||
|
||||
// Hack to remove automatically added Cancel button
|
||||
// See https://github.com/sciactive/pnotify/issues/141
|
||||
@ -145,6 +146,7 @@ $(function() {
|
||||
|
||||
self.mystromswitchEnabled(data.mystromswitchEnabled);
|
||||
if (data.power != null) {
|
||||
self.mystromswitchPowerValue.innerHTML = "Power Consumption"+data.power+"W"
|
||||
self.timeoutPopupOptions.text = self.timeoutPopupText + data.power;
|
||||
if (typeof self.timeoutPopup != "undefined") {
|
||||
self.timeoutPopup.update(self.timeoutPopupOptions);
|
||||
|
@ -1,4 +1,6 @@
|
||||
<div class="sidebar_plugin_mystromswitch">
|
||||
<label class="control-label" id="mystromswitchPowerValue">Powerconsumption 0.0W</label>
|
||||
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: mystromswitchEnabled">
|
||||
{{ _('Shutdown Printer after print finishes') }}
|
||||
|
Loading…
Reference in New Issue
Block a user