diff --git a/telldus-gui/Plugins/SchedulerGUISimple/ActionPoint.qml b/telldus-gui/Plugins/SchedulerGUISimple/ActionPoint.qml index e2c27b1d..99014e2b 100644 --- a/telldus-gui/Plugins/SchedulerGUISimple/ActionPoint.qml +++ b/telldus-gui/Plugins/SchedulerGUISimple/ActionPoint.qml @@ -443,7 +443,8 @@ Rectangle{ } function getTickedImageSource(index){ - print("GETTING TICKED"); + //print("GETTING TICKED"); + index = Scripts.getOffsetWeekday(index); if(pointRect.deviceRow.parent == undefined || pointRect.deviceRow.parent.parent == undefined){ //to get rid of warnings on initialization print("UNDEFINED, should only be in beginning"); return "unticked.png"; @@ -466,6 +467,7 @@ Rectangle{ } function toggleTickedWeekDay(index){ + index = Scripts.getOffsetWeekday(index); var originalPoint = pointRect; if(pointRect.parentPoint != undefined){ originalPoint = pointRect.parentPoint; diff --git a/telldus-gui/Plugins/SchedulerGUISimple/Dialog.qml b/telldus-gui/Plugins/SchedulerGUISimple/Dialog.qml index 6f3a6743..09cd1b9b 100644 --- a/telldus-gui/Plugins/SchedulerGUISimple/Dialog.qml +++ b/telldus-gui/Plugins/SchedulerGUISimple/Dialog.qml @@ -609,7 +609,7 @@ //anchors.fill: parent anchors.left: tickBox.right anchors.leftMargin: 10 - text: Scripts.weekday_name_array[index] //TODO start on monday + text: Scripts.getOffsetWeekdayName(index) } } } diff --git a/telldus-gui/Plugins/SchedulerGUISimple/schedulerscripts.js b/telldus-gui/Plugins/SchedulerGUISimple/schedulerscripts.js index 96d4e44f..044a8c15 100644 --- a/telldus-gui/Plugins/SchedulerGUISimple/schedulerscripts.js +++ b/telldus-gui/Plugins/SchedulerGUISimple/schedulerscripts.js @@ -427,6 +427,19 @@ function getDayIndexForDayOfWeek(dayOfWeek){ return dayOfWeek; } +function getOffsetWeekdayName(index){ + index = getOffsetWeekday(index); + return weekday_name_array[index]; +} + +function getOffsetWeekday(index){ + index = index + 1; + if(index == weekday_name_array.length){ + index = 0; + } + return index; +} + //TODO move, pragma safe: function getFirstPointWidth(deviceRow){ var pointList = deviceRow.children; //TODO should really try to avoid using "children"... make own list instead?