code cleaning up; - pages/; -routers/;
This commit is contained in:
1 parent
6e4749476a
commit
4d0c64bb93
23 files changed
+62
-1339
No files matched your search
+6
-4
@@ -3,8 +3,10 @@
|
||||
*/
|
||||
|
||||
var app = angular.module("hudozhka", [
|
||||
"ngRoute", "hudozhka.data",
|
||||
"angulartics", "angulartics.google.analytics",
|
||||
"hudozhka.data",
|
||||
"ngRoute",
|
||||
"angulartics",
|
||||
"angulartics.google.analytics"
|
||||
]);
|
||||
|
||||
app.config(function ($locationProvider, $routeProvider) {
|
||||
@@ -47,8 +49,8 @@ app.config(function ($locationProvider, $routeProvider) {
|
||||
});
|
||||
|
||||
app.run(function($location, $rootScope, $http) {
|
||||
$rootScope.$on("$routeChangeSuccess", function (event, current, previous) {
|
||||
$rootScope.title = current.$$route.title;
|
||||
$rootScope.$on("$routeChangeSuccess", function (event, current) {
|
||||
$rootScope.title = current["$$route"].title;
|
||||
});
|
||||
|
||||
$http.defaults.headers.common["Accept"] = "application/json";
|
||||
|
||||
@@ -20,11 +20,6 @@ module.exports = function (app) {
|
||||
]);
|
||||
});
|
||||
|
||||
//$scope.schedule = schedule($scope.year, sem, [
|
||||
// populate(team.short, "teacher"),
|
||||
// populate(course.name, "lesson")
|
||||
//]);
|
||||
|
||||
$scope.isToday = function (weekDayIndex) {
|
||||
return (now.getDay() - 1) === weekDayIndex;
|
||||
};
|
||||
|
||||
+2
-1
@@ -9,7 +9,8 @@ var client = null;
|
||||
|
||||
module.exports = {
|
||||
init: function (uri) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
//noinspection JSUnresolvedFunction
|
||||
return new Promise(function (resolve) {
|
||||
client = mongo(uri);
|
||||
resolve();
|
||||
});
|
||||
|
||||
@@ -1,402 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "1",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "as-timasheva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"10:00 10:45",
|
||||
"10:55 11:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "2",
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "as-timasheva",
|
||||
"time": [
|
||||
"12:00 12:45",
|
||||
"12:55 13:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "3",
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "as-timasheva",
|
||||
"time": [
|
||||
"10:00 10:45",
|
||||
"10:55 11:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "4",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "5",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "6",
|
||||
"wednesday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "7",
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "cg",
|
||||
"teacher": "rk-timashev",
|
||||
"time": [
|
||||
"10:00 10:45",
|
||||
"10:55 11:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "8",
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "cg",
|
||||
"teacher": "rk-timashev",
|
||||
"time": [
|
||||
"12:00 12:45",
|
||||
"12:55 13:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "9",
|
||||
"monday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 18:45"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "10",
|
||||
"monday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 18:45"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "11",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "mg-timasheva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "12",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "mg-timasheva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "13",
|
||||
"tuesday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "mg-timasheva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 18:45"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,438 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "1-1",
|
||||
"tuesday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"11:00 11:45",
|
||||
"11:55 12:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "1-2",
|
||||
"tuesday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"13:00 13:45",
|
||||
"13:55 14:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "1-3",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "sculpting",
|
||||
"teacher": "in-vturina",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "2-1",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "as-timasheva",
|
||||
"time": [
|
||||
"11:00 11:45",
|
||||
"11:55 12:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "2-2",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "as-timasheva",
|
||||
"time": [
|
||||
"13:00 13:45",
|
||||
"13:55 14:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "2-3",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "od-gogoleva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "as-timasheva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "3-1",
|
||||
"monday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "cg",
|
||||
"teacher": "rk-timashev",
|
||||
"time": [
|
||||
"13:00 13:45",
|
||||
"13:55 14:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "3-2",
|
||||
"monday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "cg",
|
||||
"teacher": "rk-timashev",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "3-3",
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "nv-andreeva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "as-timasheva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"saturday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "as-timasheva",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "4-1",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 18:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "4-2",
|
||||
"monday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"wednesday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 18:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "sa-latipova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "5-1",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"15:00 15:45",
|
||||
"15:55 16:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "5-2",
|
||||
"monday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"tuesday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "mg-timasheva",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "6-1",
|
||||
"wednesday": {
|
||||
"lesson": "painting",
|
||||
"teacher": "va-sarzhin",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
},
|
||||
"thursday": {
|
||||
"lesson": "drawing",
|
||||
"teacher": "mg-timasheva",
|
||||
"time": [
|
||||
"16:00 17:45",
|
||||
""
|
||||
]
|
||||
},
|
||||
"friday": {
|
||||
"lesson": "composition",
|
||||
"teacher": "vv-voronova",
|
||||
"time": [
|
||||
"17:00 17:45",
|
||||
"17:55 18:40"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"thursday": {
|
||||
"lesson": "history",
|
||||
"teacher": "my-valkova",
|
||||
"time": [
|
||||
"18:00 18:45",
|
||||
""
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
+52
-67
@@ -1,77 +1,62 @@
|
||||
var pop = require("../utils/populate").pop;
|
||||
|
||||
const WEEK = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
|
||||
const SCHEDULES = {
|
||||
"2014-early": require("./schedule-2014-early.json"),
|
||||
"2014-late": require("./schedule-2014-late.json")
|
||||
|
||||
module.exports = {
|
||||
populate: populateSchedule
|
||||
};
|
||||
|
||||
function schedule (year, name, pops){
|
||||
var s = SCHEDULES[year + "-" + name];
|
||||
return populateSchedule(s, pops);
|
||||
}
|
||||
function populateSchedule(s, pops) {
|
||||
var days = function (group) {
|
||||
var result = [];
|
||||
|
||||
schedule.populate = populateSchedule;
|
||||
WEEK.forEach(function (i) {
|
||||
var lesson = group[i];
|
||||
if (lesson) {
|
||||
result.push(
|
||||
pop(lesson)
|
||||
.populate(time())
|
||||
.populate(pops)
|
||||
.result()
|
||||
)
|
||||
} else {
|
||||
result.push(null);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
module.exports = schedule;
|
||||
//var s = require(
|
||||
// [year, name].reduce(function (r, v, i) {
|
||||
// var n = "{i}".replace("i", i);
|
||||
// return r.replace(n, v);
|
||||
// }, "./schedule-{0}-{1}.json")
|
||||
//);
|
||||
var time = function () {
|
||||
return function (lesson) {
|
||||
for (var i = 0; i < lesson.time.length; i++) {
|
||||
lesson.time[i] = lesson.time[i].replace(" ", "—");
|
||||
}
|
||||
return lesson;
|
||||
}
|
||||
};
|
||||
|
||||
function populateSchedule(s, pops){
|
||||
var days = function (group) {
|
||||
var result = [];
|
||||
var mondayTime = function (group) {
|
||||
var day;
|
||||
for (var i = 0; i < WEEK.length; i++) {
|
||||
if (group[WEEK[i]]) {
|
||||
day = WEEK[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (day) {
|
||||
return group[day].time[0].substr(0, 5);
|
||||
} else {
|
||||
return "00:00"
|
||||
}
|
||||
};
|
||||
|
||||
WEEK.forEach(function (i) {
|
||||
var lesson = group[i];
|
||||
if (lesson) {
|
||||
result.push(
|
||||
pop(lesson)
|
||||
.populate(time())
|
||||
.populate(pops)
|
||||
.result()
|
||||
)
|
||||
} else {
|
||||
result.push(null);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
var time = function () {
|
||||
return function (lesson) {
|
||||
for (var i = 0; i < lesson.time.length; i++) {
|
||||
lesson.time[i] = lesson.time[i].replace(" ", "—");
|
||||
}
|
||||
return lesson;
|
||||
}
|
||||
};
|
||||
|
||||
var mondayTime = function (group) {
|
||||
var day;
|
||||
for (var i = 0; i < WEEK.length; i++) {
|
||||
if (group[WEEK[i]]) {
|
||||
day = WEEK[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (day) {
|
||||
return group[day].time[0].substr(0, 5);
|
||||
} else {
|
||||
return "00:00"
|
||||
}
|
||||
};
|
||||
|
||||
var result = [];
|
||||
s.forEach(function (group) {
|
||||
result.push({
|
||||
name: group.name,
|
||||
days: days(group),
|
||||
time: mondayTime(group)
|
||||
});
|
||||
});
|
||||
return result;
|
||||
var result = [];
|
||||
s.forEach(function (group) {
|
||||
result.push({
|
||||
name: group.name,
|
||||
days: days(group),
|
||||
time: mondayTime(group)
|
||||
});
|
||||
});
|
||||
return result;
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
extends ../layout
|
||||
|
||||
block custom_head
|
||||
link(rel="stylesheet", href="/s/docs.css")
|
||||
|
||||
block content
|
||||
include ../menu
|
||||
.main
|
||||
for group in blocks
|
||||
.docblock
|
||||
if(group.type == 'documents')
|
||||
//- h2 #{group.name}
|
||||
for i in group.items
|
||||
.doc
|
||||
a(href='#{i.path}')
|
||||
img(src='#{i.preview}')
|
||||
span #{i.title}
|
||||
|
||||
//- .docblock
|
||||
//- h2 Лицензии, свидетельства и уставы
|
||||
//- .panel
|
||||
//- .docs
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/statue-2013.png')
|
||||
//- a(href='/document/statue-2013') Устав школы в 2013 году
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/license_edu.png')
|
||||
//- a(href='/document/edu-license') Образовательная лицензия
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/certificate_gov.png')
|
||||
//- a(href='/document/gov_certificate') Свидетельство о государственной регистрации права
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/vatin.png')
|
||||
//- a(href='/document/VAT') ИНН
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/certificate_egryl1.png')
|
||||
//- a(href='/document/EGRYL1') Свидетельство о внесении в «ЕГРЮЛ»
|
||||
//- .doc
|
||||
//- img(src='/docs/preview/certificate_egryl2.png')
|
||||
//- a(href='/document/EGRYL2') Свидетельство о внесении в «ЕГРЮЛ»
|
||||
//- .docblock
|
||||
//- h2 Грамоты
|
||||
//- .panel
|
||||
//- ul
|
||||
//- li
|
||||
//- a(href='').act.select ученикам
|
||||
//- li
|
||||
//- a(href='').act учителям
|
||||
//- ul
|
||||
//- li
|
||||
//- a(href='').act 2014
|
||||
//- li
|
||||
//- a(href='').act.select 2013
|
||||
//- li
|
||||
//- a(href='').act 2012
|
||||
//- li
|
||||
//- a(href='').act 2011
|
||||
//- li
|
||||
//- a(href='').act 2010
|
||||
//- li
|
||||
//- a(href='').act 2009
|
||||
//- li
|
||||
//- a(href='').act 2008
|
||||
//- li
|
||||
//- a(href='').act 2007
|
||||
//- .docs
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/0002_600_0.jpg')
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/gramota1296478114.jpg')
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/Грамота_Буркун_И.Г.jpg')
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/Грамота_ГребенникО.С.jpg')
|
||||
//- .docblock
|
||||
//- h2 Образовательные программы
|
||||
//- .panel
|
||||
//- .docs
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/03_.JPG')
|
||||
//- .docinfo
|
||||
//- p
|
||||
//- a(href='') Живопись
|
||||
//- p 500 страниц
|
||||
//- p
|
||||
//- a(href='') Скачать пдф (5 mb)
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/22.jpg')
|
||||
//- .docinfo
|
||||
//- p
|
||||
//- a(href='') Рисунок
|
||||
//- p 500 страниц
|
||||
//- p
|
||||
//- a(href='') Скачать пдф (5 mb)
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/dokument.gif')
|
||||
//- .docinfo
|
||||
//- p
|
||||
//- a(href='') Скульптура
|
||||
//- p 500 страниц
|
||||
//- p
|
||||
//- a(href='') Скачать пдф (5 mb)
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/license_cryptomodulc.jpg')
|
||||
//- .docinfo
|
||||
//- p
|
||||
//- a(href='') ДПИ
|
||||
//- p 500 страниц
|
||||
//- p
|
||||
//- a(href='') Скачать пдф (5 mb)
|
||||
//- .doc
|
||||
//- img(src='/docs/temp/1340870449_1283936456_dog_bez_pol.jpg')
|
||||
//- .docinfo
|
||||
//- p
|
||||
//- a(href='') История искусств
|
||||
//- p 500 страниц
|
||||
//- p
|
||||
//- a(href='') Скачать пдф (5 mb)
|
||||
@@ -1,15 +0,0 @@
|
||||
extends ../layout
|
||||
|
||||
block custom_head
|
||||
link(rel="stylesheet", href="/s/document.css")
|
||||
|
||||
block menu
|
||||
.menu
|
||||
h1
|
||||
span.bold ДХШ
|
||||
span.norm Шлиссельбурга,
|
||||
span.norm #{doc.name}
|
||||
|
||||
block content
|
||||
.displaybox
|
||||
iframe#doc(src="#{doc.download}")
|
||||
@@ -1,57 +0,0 @@
|
||||
extends ../layout
|
||||
|
||||
block custom_head
|
||||
if doc.viewer == "default"
|
||||
link(rel='stylesheet', href='/s/pdf.css')
|
||||
|
||||
link(rel='stylesheet', href='/s/document.css')
|
||||
|
||||
if doc.extra && doc.extra.style
|
||||
for style in doc.extra.style
|
||||
link(rel='stylesheet', href='#{style}')
|
||||
|
||||
if doc.viewer == "default"
|
||||
script(src='http://code.jquery.com/jquery-2.1.0.min.js')
|
||||
script(src='/c/document.js')
|
||||
|
||||
if doc.extra && doc.extra.script
|
||||
for script in doc.extra.script
|
||||
script(src='#{script}')
|
||||
|
||||
block content
|
||||
.menu.opac
|
||||
.panel
|
||||
h1
|
||||
span.bold ДХШ
|
||||
span.norm Шлиссельбурга,
|
||||
span.norm #{doc.title}
|
||||
.panel.right
|
||||
if doc.viewer == "default" && doc.url.length > 1
|
||||
.controls
|
||||
p.block
|
||||
span Страница
|
||||
input#currentPage(pattern='[0-9]{,3}')
|
||||
| из
|
||||
span#totalPages
|
||||
|
||||
p.block
|
||||
button#buttonPrev ←
|
||||
button#buttonNext →
|
||||
|
||||
if doc.download
|
||||
p.block
|
||||
a.download(href='#{doc.download}')
|
||||
if doc.viewer == "default"
|
||||
div(id='page-container')
|
||||
for url in doc.url
|
||||
//- p #{url}
|
||||
.pf(data-page-url='#{url}')
|
||||
//- img(src='#{url}')
|
||||
//- //- for url in doc.url
|
||||
//- //- .pf
|
||||
//- //- //-
|
||||
|
||||
if doc.viewer == "img-sheet"
|
||||
.doclist
|
||||
for url in doc.url
|
||||
img(src='#{url}')
|
||||
@@ -1,11 +0,0 @@
|
||||
doctype html
|
||||
|
||||
html
|
||||
head
|
||||
link(rel="stylesheet", href="/s/main.css")
|
||||
link(rel="stylesheet", href="/fonts/stylesheet.css")
|
||||
block custom_head
|
||||
body
|
||||
block content
|
||||
|
||||
include yandex.metrika.jade
|
||||
@@ -1,7 +0,0 @@
|
||||
extends ../layout
|
||||
|
||||
block custom_head
|
||||
meta(name="google-site-verification", content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg")
|
||||
|
||||
block content
|
||||
include ../menu
|
||||
@@ -1,10 +0,0 @@
|
||||
.menu
|
||||
ul
|
||||
each i in menu.items
|
||||
li(class='#{i.class}')
|
||||
if(i.url)
|
||||
a(href='#{i.url}') #{i.text}
|
||||
else
|
||||
span #{i.text}
|
||||
a.vk(href='#{menu.vkgroup}')
|
||||
img(src='/img/icon.vk.png')
|
||||
@@ -1,46 +0,0 @@
|
||||
extends ../layout
|
||||
|
||||
block custom_head
|
||||
link(rel='stylesheet', href='/s/animate.min.css')
|
||||
link(rel='stylesheet', href='/s/schedule.css')
|
||||
//- script(src='http://code.jquery.com/jquery-2.1.0.min.js')
|
||||
script(src='/c/jquery-2.1.0.js')
|
||||
script(src='/c/schedule.js')
|
||||
|
||||
block content
|
||||
include ../menu
|
||||
.schedule
|
||||
p Расписание весеннего семестра 2014 года
|
||||
//- ul
|
||||
//- li
|
||||
//- a(href='') 2012, осень
|
||||
//- li
|
||||
//- a(href='') 2013, весна
|
||||
//- li
|
||||
//- a(href='') 2013, осень
|
||||
//- li.current 2014, весна
|
||||
table
|
||||
thead
|
||||
- var days = ["Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"];
|
||||
th.group Гр.
|
||||
for day in days
|
||||
//- th.current.first
|
||||
//- th.weekend
|
||||
th
|
||||
p.day #{day}
|
||||
p.date
|
||||
tbody
|
||||
for group in groups
|
||||
tr
|
||||
td.group
|
||||
p.name #{group.name}
|
||||
p.time #{group.time}
|
||||
for day in group.days
|
||||
td
|
||||
if day
|
||||
p.lesson
|
||||
a(href='') #{day.lesson}
|
||||
p.teacher
|
||||
a(href='') #{day.teacher}
|
||||
for time in day.time
|
||||
p.time #{time}
|
||||
@@ -1,19 +0,0 @@
|
||||
extends ../layout
|
||||
|
||||
block custom_head
|
||||
link(rel="stylesheet", href="/s/team.css")
|
||||
|
||||
block content
|
||||
img.main-picture(src='http://static.shburg.org/art/team/team.jpg')
|
||||
include ../menu
|
||||
.main
|
||||
ul.team-list
|
||||
for member in team
|
||||
li.team-member
|
||||
img(src='#{member.picture}')
|
||||
.info
|
||||
h3 #{member.firstName} #{member.middleName}
|
||||
span #{member.lastName}
|
||||
p #{member.position}
|
||||
p #{member.status}
|
||||
p #{member.edu}
|
||||
@@ -1,13 +0,0 @@
|
||||
//- //Yandex.Metrika informer
|
||||
//- a(href='http://metrika.yandex.ru/stat/?id=24027460&from=informer', target='_blank', rel='nofollow')
|
||||
//- img(src='//bs.yandex.ru/informer/24027460/3_1_FFFFFFFF_EFEFEFFF_0_pageviews', style='width: 88px; height: 31px; border: 0;', alt='Яндекс.Метрика', title='Яндекс.Метрика: данные за сегодня (просмотры, визиты и уникальные посетители)', onclick='try{Ya.Metrika.informer({i:this,id:24027460,lang:\'ru\'});return false}catch(e){}')
|
||||
//- //Yandex.Metrika informer
|
||||
|
||||
// Yandex.Metrika counter
|
||||
|
||||
script
|
||||
include yandex.metrika.js
|
||||
noscript
|
||||
div
|
||||
img(src='//mc.yandex.ru/watch/24027460', style='position: absolute; left: -9999px;', alt='')
|
||||
// Yandex.Metrika counter
|
||||
@@ -1 +0,0 @@
|
||||
(function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter24027460 = new Ya.Metrika({id:24027460, webvisor:true, clickmap:true, trackLinks:true, accurateTrackBounce:true}); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks");
|
||||
@@ -1,46 +0,0 @@
|
||||
var Router = require("express").Router;
|
||||
var route = require("./route");
|
||||
var document = require("../models/document");
|
||||
|
||||
var router = new Router();
|
||||
module.exports = router.middleware;
|
||||
|
||||
router.get("/docs", function(req, res){
|
||||
var url = "/docs";
|
||||
|
||||
res.render("docs/docs", {
|
||||
menu: route.menu(url),
|
||||
blocks: [
|
||||
{
|
||||
type: "documents",
|
||||
name: "Лицензии, свидетельства и уставы",
|
||||
items: document.cap(
|
||||
document.doc(
|
||||
["statue-2013", "edu-license", "gov-certificate", "VAT", "EGRYL1", "EGRYL2"]
|
||||
)
|
||||
)
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
router.get("/document/:doc/:page?", function(req, res){
|
||||
var name = req.param("doc");
|
||||
var doc = document.doc(name);
|
||||
// doc = document.extra(doc, {
|
||||
// "style": [
|
||||
// "/s/pdf.css"
|
||||
// ],
|
||||
// "script": [
|
||||
// "http://code.jquery.com/jquery-2.1.0.min.js",
|
||||
// "/c/document.js"
|
||||
// ]
|
||||
// });
|
||||
|
||||
if(doc){
|
||||
doc.startPage = req.param("page");
|
||||
res.render("document/document", {doc: doc});
|
||||
}else{
|
||||
res.error(404);
|
||||
}
|
||||
});
|
||||
@@ -1,45 +0,0 @@
|
||||
const config = require("../config")
|
||||
|
||||
function getMenu(){
|
||||
return clone(config.data.menu);
|
||||
}
|
||||
|
||||
function clone(obj){
|
||||
if(obj == null || typeof(obj) != 'object')
|
||||
return obj;
|
||||
|
||||
var temp = obj.constructor(); // changed
|
||||
|
||||
for(var key in obj)
|
||||
temp[key] = clone(obj[key]);
|
||||
return temp;
|
||||
}
|
||||
|
||||
exports.menu = function(url){
|
||||
var m = getMenu();
|
||||
m.items.forEach(function(i){
|
||||
if(i.url != url) i.class = "";
|
||||
});
|
||||
return m;
|
||||
}
|
||||
|
||||
exports.team = function(processor) {
|
||||
var list = [];
|
||||
config.data.team.forEach(function(m){
|
||||
if(processor){
|
||||
processor(m);
|
||||
}
|
||||
list.push(m);
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
exports.nameProcessor = function(delimiter){
|
||||
if(!delimiter) delimiter = /\s+/;
|
||||
return function(member){
|
||||
var nnn = member.name.split(delimiter);
|
||||
member.firstName = nnn[0];
|
||||
member.middleName = nnn[1];
|
||||
member.lastName = nnn[2];
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
var Router = require("express").Router;
|
||||
var route = require("./route");
|
||||
|
||||
// var router = Object.create(Router);
|
||||
var router = new Router();
|
||||
router.get("/team", function(req, res){
|
||||
var url = "/team";
|
||||
|
||||
res.render("team/team", {
|
||||
menu: route.menu(url),
|
||||
team: route.team(route.nameProcessor())
|
||||
});
|
||||
});
|
||||
|
||||
router.get("/teachers/:name", function(req, res){
|
||||
var name = req.param("name");
|
||||
res.error(404);
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
@@ -20,7 +20,6 @@ function accepts(routes, def) {
|
||||
yield def;
|
||||
}else{
|
||||
this.status = 406;
|
||||
return;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
File renamed without changes.
@@ -1,5 +1,4 @@
|
||||
var path = require("path");
|
||||
var fs = require("mz/fs");
|
||||
|
||||
var koa = require("koa");
|
||||
var route = require("koa-route");
|
||||
@@ -49,12 +48,3 @@ require("./routes/news")(app);
|
||||
module.exports = function (port) {
|
||||
app.listen(port);
|
||||
};
|
||||
|
||||
function *schedule(){
|
||||
if(this.request.accepts("json")){
|
||||
this.body = {schedule: ["hello", "lol"]};
|
||||
this.type = "application/json";
|
||||
}else{
|
||||
yield index;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<base href="/">
|
||||
<meta name="fragment" content="!">
|
||||
<meta name="google-site-verification" content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg">
|
||||
|
||||
<title ng-bind="title">ДШХ Шлиссельбурга</title>
|
||||
|
||||
@@ -10,8 +11,6 @@
|
||||
<link rel="stylesheet" href="/animate.min.css">
|
||||
<link rel="stylesheet" href="/fonts/stylesheet.css">
|
||||
|
||||
<meta name="google-site-verification" content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg">
|
||||
|
||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/bower_components/angular/angular.min.js"></script>
|
||||
<script src="/bower_components/angular-route/angular-route.min.js"></script>
|
||||
@@ -22,7 +21,7 @@
|
||||
<link rel="stylesheet" href="/bower_components/fotorama/fotorama.css">
|
||||
<script src="/bower_components/fotorama/fotorama.js"></script>
|
||||
|
||||
<script src="data.js"></script>
|
||||
<script src="/data.js"></script>
|
||||
<script src="/app.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in new issue
Block a user