mirror of
https://github.com/UiO-Gaming/infoscreen3.git
synced 2026-11-07 14:54:29 +01:00
fix time to show/hide on edit view
This commit is contained in:
1 parent
620e8d9929
commit
1b4b3d98f0
1 file changed
+18
-1
+18
-1
@@ -148,6 +148,7 @@ function displayTime() {
|
||||
if (min < 10) min = "0" + min;
|
||||
var time = date.getHours() + ":" + min;
|
||||
$('#time2').html(time);
|
||||
checkTimeDisplay();
|
||||
}
|
||||
|
||||
function setAlign(align) {
|
||||
@@ -271,7 +272,7 @@ socket.on('callback.edit', function (data) {
|
||||
} else {
|
||||
nextSlide(data, true);
|
||||
}
|
||||
|
||||
checkTimeDisplay();
|
||||
setBackground(bundleData.background);
|
||||
});
|
||||
|
||||
@@ -355,6 +356,22 @@ function drawGrid() {
|
||||
canvas.renderAll();
|
||||
}
|
||||
|
||||
function checkTimeDisplay() {
|
||||
if ($("#override").checkbox('is checked')) {
|
||||
if ($("#displaytime").checkbox('is checked')) {
|
||||
$('#time2').removeClass('flipOutX').addClass("flipInX");
|
||||
} else {
|
||||
$('#time2').addClass('flipOutX').removeClass("flipInX");
|
||||
}
|
||||
} else {
|
||||
if (bundleData.displayTime) {
|
||||
$('#time2').removeClass('flipOutX').addClass("flipInX");
|
||||
} else {
|
||||
$('#time2').addClass('flipOutX').removeClass("flipInX");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function nextSlide(data) {
|
||||
canvas.loadFromJSON(data.json, function () {
|
||||
drawGrid();
|
||||
|
||||
Reference in new issue
Block a user