code cleaning up
This commit is contained in:
1 parent
1a11cf8c85
commit
ee826400df
1 file changed
-13
@@ -8,7 +8,6 @@ module.exports = function (app) {
|
|||||||
|
|
||||||
$http.get("/schedules")
|
$http.get("/schedules")
|
||||||
.success(function (schedules) {
|
.success(function (schedules) {
|
||||||
//return ;
|
|
||||||
var last = schedules.length - 1;
|
var last = schedules.length - 1;
|
||||||
|
|
||||||
$scope.schedules = schedules.map(function (schedule) {
|
$scope.schedules = schedules.map(function (schedule) {
|
||||||
@@ -95,18 +94,6 @@ function range(start, num, step) {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
///**
|
|
||||||
// * Monday date of current week
|
|
||||||
// * @param {[type]} d [description]
|
|
||||||
// * @return {[type]} [description]
|
|
||||||
// */
|
|
||||||
//function getMonday(d) {
|
|
||||||
// d = new Date(d);
|
|
||||||
// var day = d.getDay();
|
|
||||||
// var diff = d.getDate() - day + (day == 0 ? -6 : 1); // adjust when day is sunday
|
|
||||||
// return new Date(d.setDate(diff));
|
|
||||||
//}
|
|
||||||
|
|
||||||
function getDates(start) {
|
function getDates(start) {
|
||||||
var day = start.getDay();
|
var day = start.getDay();
|
||||||
return range(0, 6, 1).reduce(function (dates, weekDay) {
|
return range(0, 6, 1).reduce(function (dates, weekDay) {
|
||||||
|
|||||||
Reference in new issue
Block a user