From 43af2bebd1de70f0e2f5627815812dbfd01a5c9a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 5 Aug 2014 15:30:07 -0400 Subject: cutting out stuff for mobile --- server/lib/views.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/lib') diff --git a/server/lib/views.js b/server/lib/views.js index 81e2ced..27b7446 100644 --- a/server/lib/views.js +++ b/server/lib/views.js @@ -45,7 +45,7 @@ views.editor = function (req, res) { } views.reader = function (req, res) { - if (! req.user && ! req.project) { + if (! req.project) { res.redirect('/') } User.findOne({ _id: req.project.user_id }, function(err, user) { -- cgit v1.2.3-70-g09d2 From bf2300afa925e2915a0b1b906691a3f5fbe4186d Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Wed, 13 Aug 2014 02:20:21 -0400 Subject: fix edit links on profile --- public/assets/stylesheets/app.css | 12 ++++++------ server/lib/middleware.js | 2 +- views/projects/list-projects.ejs | 9 ++++++--- 3 files changed, 13 insertions(+), 10 deletions(-) (limited to 'server/lib') diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 8508cf7..36cccef 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -230,6 +230,12 @@ iframe.embed { color:white; } +#projectList .editBtn { + position: absolute; + right: 10px; + top: 10px; +} + /* .room1 { position: relative; @@ -240,12 +246,6 @@ iframe.embed { background-image:url(https://s3.amazonaws.com/luckyplop/fd4ebe8a7a4246c8273fc999fb1ef0d6a8260b8c.png); } -.room1 .editBtn { - position: absolute; - right: 10px; - top: 10px; -} - .room1 form textarea { width: 226px; } diff --git a/server/lib/middleware.js b/server/lib/middleware.js index aec54ad..27b9c04 100644 --- a/server/lib/middleware.js +++ b/server/lib/middleware.js @@ -36,7 +36,7 @@ var middleware = { ensureLocals: function (req, res, next) { res.locals.token = req.csrfToken(); res.locals.logged_in = req.isAuthenticated() - res.locals.user = req.user || {} + res.locals.user = req.user || { id: undefined } res.locals.config = config res.locals.profile = null res.locals.opt = {} diff --git a/views/projects/list-projects.ejs b/views/projects/list-projects.ejs index d2c0447..c78bf9f 100644 --- a/views/projects/list-projects.ejs +++ b/views/projects/list-projects.ejs @@ -14,10 +14,13 @@ [[ } ]] - [[ if (profile && profile._id == project.user_id) { ]] -
edit
+ [[ if (String(user._id) == String(project.user_id)) { ]] +
edit
[[ } ]] - [[- project.name ]]
[[- project.date ]]
+ + [[- project.name ]]
+ [[- project.date ]] +
[[ }) ]] -- cgit v1.2.3-70-g09d2 From 5d1bb038332c540d8abe459092648a7b5ddfe734 Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Wed, 13 Aug 2014 02:24:38 -0400 Subject: noui --- server/lib/views.js | 2 ++ views/reader.ejs | 2 ++ 2 files changed, 4 insertions(+) (limited to 'server/lib') diff --git a/server/lib/views.js b/server/lib/views.js index 27b7446..d619d71 100644 --- a/server/lib/views.js +++ b/server/lib/views.js @@ -36,6 +36,7 @@ views.editor = function (req, res) { date: moment(req.project.updated_at).format("M/DD/YYYY"), author: user.displayName, authorlink: "/profile/" + user.username, + noui: !! (req.query.noui === 1), }) }) } @@ -60,6 +61,7 @@ views.reader = function (req, res) { date: moment(req.project.updated_at).format("M/DD/YYYY"), author: user.displayName, authorlink: "/profile/" + user.username, + noui: !! (req.query.noui === 1), }) }) } diff --git a/views/reader.ejs b/views/reader.ejs index 44fb2dd..7c31766 100644 --- a/views/reader.ejs +++ b/views/reader.ejs @@ -8,6 +8,7 @@
+ [[ if (! noui) { ]]
[[ include partials/header ]] @@ -16,6 +17,7 @@ [[ include controls/reader/media-player ]]
+ [[ } ]] [[ include partials/confirm-modal ]] [[ include projects/layouts-modal ]] -- cgit v1.2.3-70-g09d2 From 0d971464a2af8ec795664fb3e6f50b888dcccf53 Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Wed, 13 Aug 2014 02:33:01 -0400 Subject: style fixes --- public/assets/stylesheets/app.css | 14 ++++++++------ server/lib/views.js | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'server/lib') diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 36cccef..e15ba84 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -158,13 +158,15 @@ h5 { .page .profile { color:white; } -.page table{ - width:100%; - height:400px; - border-top:1px solid; - margin:40px 0 0 0; +.page table { + width: 100%; + border-top: 1px solid; + margin: 40px 0 0 0; border-spacing: 0; - clear:both; + clear:nboth; +} +.page tr { + height: 400px; } .page table.showcase { height:70vh; diff --git a/server/lib/views.js b/server/lib/views.js index d619d71..b776582 100644 --- a/server/lib/views.js +++ b/server/lib/views.js @@ -36,7 +36,7 @@ views.editor = function (req, res) { date: moment(req.project.updated_at).format("M/DD/YYYY"), author: user.displayName, authorlink: "/profile/" + user.username, - noui: !! (req.query.noui === 1), + noui: !! (req.query.noui === '1'), }) }) } @@ -61,7 +61,7 @@ views.reader = function (req, res) { date: moment(req.project.updated_at).format("M/DD/YYYY"), author: user.displayName, authorlink: "/profile/" + user.username, - noui: !! (req.query.noui === 1), + noui: !! (req.query.noui === '1'), }) }) } -- cgit v1.2.3-70-g09d2