From 87e8fb2e7df8f6044f1f7df09f5a525a69ed5e21 Mon Sep 17 00:00:00 2001 From: rr- Date: Sun, 29 May 2016 12:21:25 +0200 Subject: [PATCH] client/general: unimplemented views empty viewport --- client/js/controllers/comments_controller.js | 3 +++ client/js/controllers/posts_controller.js | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/client/js/controllers/comments_controller.js b/client/js/controllers/comments_controller.js index 11ed639..4f0e80e 100644 --- a/client/js/controllers/comments_controller.js +++ b/client/js/controllers/comments_controller.js @@ -2,14 +2,17 @@ const page = require('page'); const topNavController = require('../controllers/top_nav_controller.js'); +const EmptyView = require('../views/empty_view.js'); class CommentsController { registerRoutes() { page('/comments', (ctx, next) => { this._listCommentsRoute(); }); + this._emptyView = new EmptyView(); } _listCommentsRoute() { topNavController.activate('comments'); + this._emptyView.render(); } } diff --git a/client/js/controllers/posts_controller.js b/client/js/controllers/posts_controller.js index 18cbc84..f843b01 100644 --- a/client/js/controllers/posts_controller.js +++ b/client/js/controllers/posts_controller.js @@ -2,6 +2,7 @@ const page = require('page'); const topNavController = require('../controllers/top_nav_controller.js'); +const EmptyView = require('../views/empty_view.js'); class PostsController { registerRoutes() { @@ -13,22 +14,27 @@ class PostsController { page( '/post/:id/edit', (ctx, next) => { this._editPostRoute(ctx.params.id); }); + this._emptyView = new EmptyView(); } _uploadPostsRoute() { topNavController.activate('upload'); + this._emptyView.render(); } _listPostsRoute() { topNavController.activate('posts'); + this._emptyView.render(); } _showPostRoute(id) { topNavController.activate('posts'); + this._emptyView.render(); } _editPostRoute(id) { topNavController.activate('posts'); + this._emptyView.render(); } }