+ PageCollective component

This commit is contained in:
tmshv committed 2016-02-25 18:47:16 +03:00
1 parent 3d0150c289
commit bfd1c139f5
9 files changed
+34 -35

No files matched your search

+2 -6
View File
@@ -18,9 +18,9 @@ import FooterLinks from './components/FooterLinks';
import PageSchool from './components/PageSchool';
import PageSchedule from './components/PageSchedule';
import PageCollective from './components/PageCollective';
import AppController from './controllers/AppController';
import CollectiveController from './controllers/CollectiveController';
import GalleryController from './controllers/GalleryController';
import AlbumController from './controllers/AlbumController';
import DocumentsController from './controllers/DocumentsController';
@@ -92,8 +92,8 @@ app.run(($location, $rootScope, $http) => {
TeacherProfile,
PageSchool,
PageSchedule,
PageCollective,
AppController,
CollectiveController,
GalleryController,
AlbumController,
DocumentsController,
@@ -117,9 +117,5 @@ app.run(($location, $rootScope, $http) => {
app.controller('DocumentsPageController', ($scope) => {
$scope.pageClass = 'page-documents';
});
app.controller('CollectivePageController', ($scope) => {
$scope.pageClass = 'page-collective';
});
}
].map(i => i(app));
+16
View File
@@ -0,0 +1,16 @@
import template from '../../templates/components/page-collective.html';
import {collectiveSortPattern} from '../config';
export default function (app) {
app.component('pageCollective', {
template: template,
controller: function(api) {
this.pageClass = 'page-collective';
api.collective.list(collectiveSortPattern)
.success(collective => {
this.members = collective;
});
}
});
};
+1 -2
View File
@@ -32,8 +32,7 @@ export let routes = [
},
{
name: '/collective',
templateUrl: '/views/collective.html',
controller: 'CollectivePageController',
template: '<page-collective></page-collective>',
title: 'Преподаватели'
},
{
@@ -1,14 +0,0 @@
import {collectiveSortPattern} from '../config';
export default function (app) {
app.controller('CollectiveController', ($scope, api) => {
api.collective.list(collectiveSortPattern)
.success(collective => {
$scope.members = collective;
collective.map(person => {
return person;
});
});
});
};
+11
View File
@@ -0,0 +1,11 @@
@import "../variables";
.page-collective {
&.ng-leave {
animation: slideOutLeft $short-duration both ease-in;
}
&.ng-enter {
animation: slideInRight $short-duration both ease-in;
}
}
-10
View File
@@ -5,16 +5,6 @@
&.ng-enter {}
}
.page-collective {
&.ng-leave {
animation: slideOutLeft 0.3s both ease-in;
}
&.ng-enter {
animation: slideInRight 0.3s both ease-in;
}
}
.page-documents {
&.ng-leave {
transform-origin: 50% 50%;
+1
View File
@@ -13,6 +13,7 @@
@import "components/page-school";
@import "components/page-schedule";
@import "components/page-collective";
@import "main";
@import "body-wrapper";
@@ -0,0 +1,3 @@
<div class="content content_semi-wide">
<teacher-profile ng-repeat="person in $ctrl.members track by $index" member="person"></teacher-profile>
</div>
-3
View File
@@ -1,3 +0,0 @@
<div class="content content_semi-wide" ng-controller="CollectiveController">
<teacher-profile ng-repeat="person in members track by $index" member="person"></teacher-profile>
</div>