Merge branch 'saas-dev' of github.com:sourcefabric/airtime into saas-dev

This commit is contained in:
Duncan Sommerville 2015-07-06 11:52:16 -04:00
commit 65ab13c23b
2 changed files with 6 additions and 2 deletions

View File

@ -98,7 +98,7 @@ class WidgetHelper
// javascript date formats so it's easier to sort the shows by day.
$result["weekDays"][$weekStartDateTime->format("Y-n-j")] = array();
$result["weekDays"][$weekStartDateTime->format("Y-n-j")]["dayOfMonth"] = $dateParse["day"];
$result["weekDays"][$weekStartDateTime->format("Y-n-j")]["dayOfWeek"] = strtoupper(date("D", $weekStartDateTime->getTimestamp()));
$result["weekDays"][$weekStartDateTime->format("Y-n-j")]["dayOfWeek"] = strtoupper(_(date("D", $weekStartDateTime->getTimestamp())));
// Shows scheduled for this day will get added to this array when
// we convert the show times to the client's local timezone in weekly-program.phtml

View File

@ -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;