Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interval usage on the countdown widget #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGED
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
2016-05-28
widget_countdown: use the interval attribute when setting a timer
2016-02-01
widget_countdown: setTimeout statt setInterval bei resettimeout
2016-02-01
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Die Widgets dieser Sammlung sind zur Verwendung in [fhem-tablet-ui](https://gith

* [button] (https://github.com/nesges/Widgets-for-fhem-tablet-ui/wiki/button)
* [clock] (https://github.com/nesges/Widgets-for-fhem-tablet-ui/wiki/clock)
* [countdown] (https://github.com/nesges/Widgets-for-fhem-tablet-ui/wiki/countdown)
* [iframe] (https://github.com/nesges/Widgets-for-fhem-tablet-ui/wiki/iframe)
* [klimatrend](https://github.com/nesges/Widgets-for-fhem-tablet-ui/wiki/klimatrend)
* [kodinowplaying](https://github.com/nesges/Widgets-for-fhem-tablet-ui/wiki/kodinowplaying)
Expand Down
2 changes: 1 addition & 1 deletion controls_widgets-for-fhem-tablet-ui.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ UPD 2015-04-30_13:43:16 7634 www/tablet/lib/ion.sound/sounds/metal_plate.aac
UPD 2015-04-30_13:43:16 35092 www/tablet/lib/ion.sound/sounds/door_bell.aac
UPD 2015-04-30_13:43:16 16366 www/tablet/lib/ion.sound/sounds/water_droplet_2.mp3
UPD 2015-04-30_13:43:16 25716 www/tablet/lib/ion.sound/sounds/metal_plate_2.aac
UPD 2016-02-01_22:11:15 3980 www/tablet/js/widget_countdown.js
UPD 2016-05-28_15:48:50 4020 www/tablet/js/widget_countdown.js
UPD 2015-06-17_09:47:11 8588 www/tablet/js/widget_kodinowplaying.js
UPD 2016-02-01_11:54:59 2836 www/tablet/js/widget_button.js
UPD 2015-06-17_18:20:36 5954 www/tablet/js/widget_clock.js
Expand Down
4 changes: 2 additions & 2 deletions www/tablet/js/widget_countdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ var widget_countdown = $.extend({}, widget_widget, {
f.elem = $(this);
f.value = $(this).getReading('get').val;

$(this).data('__timer', setInterval(f, 1000));
$(this).data('__timer', setInterval(f, $(this).data('interval')));
});
},
update: function (dev,par) {
Expand All @@ -104,7 +104,7 @@ var widget_countdown = $.extend({}, widget_widget, {
f.value = $(this).getReading('get').val;

clearInterval($(this).data('__timer'));
$(this).data('__timer', setInterval(f, 1000));
$(this).data('__timer', setInterval(f, $(this).data('interval')));
});
}
});