From ab85ef6b7b310ce573ed8bbed4ff3078d46a9c9e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 24 Jan 2014 12:29:11 -0500 Subject: [PATCH 1/5] fixed issue where back button stopped ajaxifying internally. --- public/src/ajaxify.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index 2f180dde73..1e53f9a4e8 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -118,6 +118,7 @@ var ajaxify = {}; app.processPage(); jQuery('#content, #footer').stop(true, true).removeClass('ajaxifying'); + ajaxify.initialLoad = false; if (window.location.hash) { hash = window.location.hash; From a3fe39081097c4c6a86073a9a0bd5544b52fb02a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 24 Jan 2014 13:09:44 -0500 Subject: [PATCH 2/5] reverting change to User.search that added "timing" to the return of User.search. Such a change can only be made for 0.4.0, sorry! --- src/user.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/user.js b/src/user.js index 7ec256d3c1..2a983b0c21 100644 --- a/src/user.js +++ b/src/user.js @@ -490,13 +490,13 @@ var bcrypt = require('bcrypt'), User.search = function(query, callback) { if (!query || query.length === 0) { - return callback(null, {timing:0, users:[]}); + return callback(null, []); } var start = process.hrtime(); db.getObject('username:uid', function(err, usernamesHash) { if (err) { - return callback(null, {timing: 0, users:[]}); + return callback(null, []); } query = query.toLowerCase(); @@ -516,9 +516,7 @@ var bcrypt = require('bcrypt'), }); User.getDataForUsers(results, function(userdata) { - var diff = process.hrtime(start); - var timing = (diff[0] * 1e3 + diff[1] / 1e6).toFixed(1); - callback(null, {timing: timing, users: userdata}); + callback(null, userdata); }); }); }; From 26848641cd3e09f081c49517be3197f737128f28 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 24 Jan 2014 13:11:30 -0500 Subject: [PATCH 3/5] restoring post/quote buttons pending template system fix for IFs --- public/templates/topic.tpl | 2 -- 1 file changed, 2 deletions(-) diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index ec72ff958b..1bb5559f4e 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -76,12 +76,10 @@ -
-
From 503e59b12b0cefb4ea0bdb1ab3b5d53cb769c719 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 24 Jan 2014 13:25:27 -0500 Subject: [PATCH 4/5] clean up conditionals only at the very end of parsing --- public/src/templates.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/src/templates.js b/public/src/templates.js index 538bd6b8ac..a004553b7c 100644 --- a/public/src/templates.js +++ b/public/src/templates.js @@ -394,11 +394,11 @@ var regex = new RegExp("{" + namespace + "[\\s\\S]*?}", 'g'); template = template.replace(regex, ''); namespace = ''; + } else { + // clean up all undefined conditionals + template = template.replace(//gi, ''); } - // clean up all undefined conditionals - template = template.replace(//gi, ''); - return template; })(data, "", template); From e09132350d09acdacd9c32b5f76d2022e7a536f3 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 24 Jan 2014 13:26:50 -0500 Subject: [PATCH 5/5] re-adding conditional to hide quote/reply block if no write perm --- public/templates/topic.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index 1bb5559f4e..ec72ff958b 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -76,10 +76,12 @@
+
+