From ec0fbd2d6140be09e37fe8e2c6a01b6b1f77de3b Mon Sep 17 00:00:00 2001 From: drigato Date: Mon, 6 Jul 2015 10:47:04 -0400 Subject: [PATCH] Fix for schedule widget weekdays going out of order --- .../application/views/scripts/embed/weekly-program.phtml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/views/scripts/embed/weekly-program.phtml b/airtime_mvc/application/views/scripts/embed/weekly-program.phtml index 0b4cdb0a5..872afc849 100644 --- a/airtime_mvc/application/views/scripts/embed/weekly-program.phtml +++ b/airtime_mvc/application/views/scripts/embed/weekly-program.phtml @@ -59,7 +59,11 @@ }); } }); - $scope.weekDays = $window.schedule_data["weekDays"]; + // Convert the object into an array to maintain the same order when we + // iterate over each weekday + $scope.weekDays = $.map($window.schedule_data["weekDays"], function(value, index) { + return [value]; + }); $scope.isEmpty = function(obj) { return obj.length == 0;