From 9bef54b5ed850f087611255a22cb28fbd281c05d Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 29 Oct 2015 15:42:00 -0400 Subject: [PATCH 1/6] fix title for dashboard --- src/middleware/admin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/admin.js b/src/middleware/admin.js index 27c58bed83..97cbf2d852 100644 --- a/src/middleware/admin.js +++ b/src/middleware/admin.js @@ -112,7 +112,7 @@ middleware.renderHeader = function(req, res, data, next) { scripts: results.scripts, 'cache-buster': meta.config['cache-buster'] ? 'v=' + meta.config['cache-buster'] : '', env: process.env.NODE_ENV ? true : false, - title: acpPath + ' | NodeBB Admin Control Panel' + title: (acpPath || 'Dashboard') + ' | NodeBB Admin Control Panel' }; templateValues.template = {name: res.locals.template}; From 40bda722c9f98ad735804d4a8df275b9839110d5 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 29 Oct 2015 15:47:00 -0400 Subject: [PATCH 2/6] fix acp title on ajaxify --- public/src/admin/admin.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/src/admin/admin.js b/public/src/admin/admin.js index 88998bc5f6..eb45ccc2e1 100644 --- a/public/src/admin/admin.js +++ b/public/src/admin/admin.js @@ -69,6 +69,14 @@ $('#main-page-title').text(menu.text() + (menu.parents('.menu-item').children('a').text() === 'Settings' ? ' Settings' : '')); } }); + + var acpPath = url.replace('admin/', '').split('/'); + acpPath.forEach(function(path, i) { + acpPath[i] = path.charAt(0).toUpperCase() + path.slice(1); + }); + acpPath = acpPath.join(' > '); + + document.title = (url === 'admin/general/dashboard' ? 'Dashboard' : acpPath) + ' | NodeBB Admin Control Panel'; } function setupRestartLinks() { From c69778527044db00bf7083bd01582b7763ae096e Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 29 Oct 2015 15:55:20 -0400 Subject: [PATCH 3/6] console.log --- src/controllers/accounts/profile.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/controllers/accounts/profile.js b/src/controllers/accounts/profile.js index 40d7fe5367..7ecca84789 100644 --- a/src/controllers/accounts/profile.js +++ b/src/controllers/accounts/profile.js @@ -75,7 +75,6 @@ profileController.get = function(req, res, callback) { userData['cover:url'] = userData['cover:url'] || require('../../coverPhoto').getDefaultProfileCover(userData.uid); userData['cover:position'] = userData['cover:position'] || '50% 50%'; - console.log(userData['cover:url']); if (!userData.profileviews) { userData.profileviews = 1; From f17391e6a25949e98769be164d02751cc6abcfed Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 29 Oct 2015 15:56:48 -0400 Subject: [PATCH 4/6] fix default cover image on all profile pages --- src/controllers/accounts/helpers.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/accounts/helpers.js b/src/controllers/accounts/helpers.js index a34d0df40d..12e4a3a924 100644 --- a/src/controllers/accounts/helpers.js +++ b/src/controllers/accounts/helpers.js @@ -101,6 +101,9 @@ helpers.getUserDataByUserSlug = function(userslug, callerUID, callback) { userData.signature = validator.escape(userData.signature); userData.aboutme = validator.escape(userData.aboutme || ''); + userData['cover:url'] = userData['cover:url'] || require('../../coverPhoto').getDefaultProfileCover(userData.uid); + userData['cover:position'] = userData['cover:position'] || '50% 50%'; + next(null, userData); } ], callback); From 12d2abff447c53cf95d40b7de835a05fdfc46e1b Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 29 Oct 2015 16:05:07 -0400 Subject: [PATCH 5/6] missed some other profile pages --- src/controllers/accounts/helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/accounts/helpers.js b/src/controllers/accounts/helpers.js index 12e4a3a924..96e4f7c235 100644 --- a/src/controllers/accounts/helpers.js +++ b/src/controllers/accounts/helpers.js @@ -143,8 +143,8 @@ helpers.getBaseUser = function(userslug, callerUID, callback) { results.user.showHidden = results.user.isSelf || results.isAdmin; results.user.profile_links = results.profile_links; - results['cover:url'] = results['cover:url'] || require('../../coverPhoto').getDefaultProfileCover(results.user.uid); - results['cover:position'] = results['cover:position'] || '50% 50%'; + results.user['cover:url'] = results.user['cover:url'] || require('../../coverPhoto').getDefaultProfileCover(results.user.uid); + results.user['cover:position'] = results.user['cover:position'] || '50% 50%'; next(null, results.user); } From 5eb3cca9c1fc9f0a3ee1dc742670d775b638a154 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 29 Oct 2015 16:12:08 -0400 Subject: [PATCH 6/6] upping vanilla --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 167a504abf..2b9ec527b3 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "nodebb-rewards-essentials": "0.0.5", "nodebb-theme-lavender": "2.0.11", "nodebb-theme-persona": "3.0.68", - "nodebb-theme-vanilla": "4.0.32", + "nodebb-theme-vanilla": "4.0.33", "nodebb-widget-essentials": "2.0.3", "npm": "^2.1.4", "passport": "^0.3.0",