From 6f6a2e4127ec78c982013e255ac95894c7267f6b Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 23 Jul 2013 15:06:31 +0800 Subject: [PATCH 1/9] closes #114. updated ajaxify to allow for get parameters to be passed in without issues. --- public/src/ajaxify.js | 8 ++------ public/src/templates.js | 4 ++-- public/templates/outgoing.tpl | 4 ++-- src/webserver.js | 13 +++++++++++++ 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index 3aa10071b8..f9087966d0 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -35,13 +35,13 @@ var ajaxify = {}; url = url.slice(RELATIVE_PATH.length); } - var tpl_url = templates.get_custom_map(url); + var tpl_url = templates.get_custom_map(url.split('?')[0]); if (tpl_url == false && !templates[url]) { if(url === '' || url === '/') { tpl_url = 'home'; } else { - tpl_url = url.split('/')[0]; + tpl_url = url.split('/')[0].split('?')[0]; } } else if (templates[url]) { @@ -75,10 +75,6 @@ var ajaxify = {}; return false; } - ajaxify.onclick = function(ev) { - - } - $('document').ready(function() { if (!window.history || !window.history.pushState) return; // no ajaxification for old browsers diff --git a/public/src/templates.js b/public/src/templates.js index 6ebeab82d3..79395b5cf1 100644 --- a/public/src/templates.js +++ b/public/src/templates.js @@ -106,7 +106,7 @@ } templates.getTemplateNameFromUrl = function(url) { - var parts = url.split('/'); + var parts = url.split('?')[0].split('/'); for(var i=0; i

- - + Continue to {url} + Return to NodeBB

\ No newline at end of file diff --git a/src/webserver.js b/src/webserver.js index 911a9a154e..3c692a5812 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -413,6 +413,19 @@ var express = require('express'), } }); break; + case 'outgoing' : + var url = req.url.split('?'); + + if (url[1]) { + res.json({ + url: url[1], + home: global.nconf.get('url') + }); + } else { + res.status(404); + res.redirect(global.nconf.get('relative_path') + '/404'); + } + break; default : res.json(404, { error: 'unrecognized API endpoint' }); break; From 45cb24fb53145796ec8c3f9f6b90d39649213cdd Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 23 Jul 2013 16:18:56 +0800 Subject: [PATCH 2/9] UI: fixed recent replies in category sidebar --- public/css/category.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/css/category.less b/public/css/category.less index f9776d2d16..4df36256c1 100644 --- a/public/css/category.less +++ b/public/css/category.less @@ -146,7 +146,8 @@ line-height: 16px; margin-left: 1px; padding: 5px 5px 5px 0px; - + list-style-type: none; + li { clear: both; line-height: 16px; @@ -163,6 +164,7 @@ p { display: block; padding-left:5px; + padding-top: 2px; overflow: hidden; height: 32px; margin-bottom: 0.5em; From fe996f75b6d2f4f1133b963b63cf107b727b3f23 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 23 Jul 2013 16:33:24 +0800 Subject: [PATCH 3/9] replaced the ascii > with the right chevron icon http://fortawesome.github.io/Font-Awesome/icon/chevron-right/ --- public/templates/accountedit.tpl | 6 +++--- public/templates/followers.tpl | 2 +- public/templates/following.tpl | 2 +- public/templates/home.tpl | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/templates/accountedit.tpl b/public/templates/accountedit.tpl index 4d7678d21d..2b0c7bbc11 100644 --- a/public/templates/accountedit.tpl +++ b/public/templates/accountedit.tpl @@ -41,8 +41,8 @@