client/general: unimplemented views empty viewport
This commit is contained in:
parent
1549b70ace
commit
87e8fb2e7d
2 changed files with 9 additions and 0 deletions
|
@ -2,14 +2,17 @@
|
||||||
|
|
||||||
const page = require('page');
|
const page = require('page');
|
||||||
const topNavController = require('../controllers/top_nav_controller.js');
|
const topNavController = require('../controllers/top_nav_controller.js');
|
||||||
|
const EmptyView = require('../views/empty_view.js');
|
||||||
|
|
||||||
class CommentsController {
|
class CommentsController {
|
||||||
registerRoutes() {
|
registerRoutes() {
|
||||||
page('/comments', (ctx, next) => { this._listCommentsRoute(); });
|
page('/comments', (ctx, next) => { this._listCommentsRoute(); });
|
||||||
|
this._emptyView = new EmptyView();
|
||||||
}
|
}
|
||||||
|
|
||||||
_listCommentsRoute() {
|
_listCommentsRoute() {
|
||||||
topNavController.activate('comments');
|
topNavController.activate('comments');
|
||||||
|
this._emptyView.render();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
const page = require('page');
|
const page = require('page');
|
||||||
const topNavController = require('../controllers/top_nav_controller.js');
|
const topNavController = require('../controllers/top_nav_controller.js');
|
||||||
|
const EmptyView = require('../views/empty_view.js');
|
||||||
|
|
||||||
class PostsController {
|
class PostsController {
|
||||||
registerRoutes() {
|
registerRoutes() {
|
||||||
|
@ -13,22 +14,27 @@ class PostsController {
|
||||||
page(
|
page(
|
||||||
'/post/:id/edit',
|
'/post/:id/edit',
|
||||||
(ctx, next) => { this._editPostRoute(ctx.params.id); });
|
(ctx, next) => { this._editPostRoute(ctx.params.id); });
|
||||||
|
this._emptyView = new EmptyView();
|
||||||
}
|
}
|
||||||
|
|
||||||
_uploadPostsRoute() {
|
_uploadPostsRoute() {
|
||||||
topNavController.activate('upload');
|
topNavController.activate('upload');
|
||||||
|
this._emptyView.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
_listPostsRoute() {
|
_listPostsRoute() {
|
||||||
topNavController.activate('posts');
|
topNavController.activate('posts');
|
||||||
|
this._emptyView.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
_showPostRoute(id) {
|
_showPostRoute(id) {
|
||||||
topNavController.activate('posts');
|
topNavController.activate('posts');
|
||||||
|
this._emptyView.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
_editPostRoute(id) {
|
_editPostRoute(id) {
|
||||||
topNavController.activate('posts');
|
topNavController.activate('posts');
|
||||||
|
this._emptyView.render();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue