diff --git a/dump.rdb b/dump.rdb index 85a3c2913c..6df4a8d6b4 100644 Binary files a/dump.rdb and b/dump.rdb differ diff --git a/public/src/client/category.js b/public/src/client/category.js index e950d379eb..9196cd2d61 100644 --- a/public/src/client/category.js +++ b/public/src/client/category.js @@ -10,7 +10,8 @@ define('forum/category', [ 'hooks', 'alerts', 'api', -], function (infinitescroll, share, navigator, topicList, sort, categorySelector, hooks, alerts, api) { + 'benchpress', +], function (infinitescroll, share, navigator, topicList, sort, categorySelector, hooks, alerts, api, Benchpress) { const Category = {}; $(window).on('action:ajaxify.start', function (ev, data) { @@ -211,7 +212,7 @@ define('forum/category', [ return utils.param('section') || ''; } - function renderSearchResults(data) { + function renderSearchResults(data, options) { Benchpress.render('partials/paginator', { pagination: data.pagination }).then(function (html) { $('.pagination-container').replaceWith(html); }); @@ -221,7 +222,10 @@ define('forum/category', [ } data.isAdminOrGlobalMod = app.user.isAdmin || app.user.isGlobalMod; - app.parseAndTranslate('posts_list', 'topics', data, function (html) { + app.parseAndTranslate(options.template, { + categoryItems: categories.slice(0, 200), + selectedCategory: ajaxify.data.selectedCategory, + allCategoriesUrl: ajaxify.data.allCategoriesUrl}, function (html) { $('#category-container').html(html); html.find('.timeago').timeago(); $('[component="topic/search/icon"]').addClass('fa-search').removeClass('fa-spinner fa-spin'); diff --git a/public/src/modules/categorySearch.js b/public/src/modules/categorySearch.js index 8c7461dcdf..6970e8e9a2 100644 --- a/public/src/modules/categorySearch.js +++ b/public/src/modules/categorySearch.js @@ -70,6 +70,8 @@ define('categorySearch', ['alerts', 'bootstrap', 'api'], function (alerts, boots }); function loadList(search, callback) { + console.log('caategories loadlist'); + console.log('did it call search??'); api.get('/search/categories', { search: search, query: utils.params(), diff --git a/src/api/posts.js b/src/api/posts.js index 4e3917a008..cf797fe940 100644 --- a/src/api/posts.js +++ b/src/api/posts.js @@ -20,6 +20,8 @@ const socketHelpers = require('../socket.io/helpers'); const postsAPI = module.exports; +console.log('posts api gets called'); + postsAPI.get = async function (caller, data) { const [userPrivileges, post, voted] = await Promise.all([ privileges.posts.get([data.pid], caller.uid), diff --git a/src/api/topics.js b/src/api/topics.js index b3ed4d2dfa..804636fd72 100644 --- a/src/api/topics.js +++ b/src/api/topics.js @@ -18,7 +18,6 @@ const socketHelpers = require('../socket.io/helpers'); const topicsAPI = module.exports; -console.log('trying ot gr here'); topicsAPI._checkThumbPrivileges = async function ({ tid, uid }) { // req.params.tid could be either a tid (pushing a new thumb to an existing topic) // or a post UUID (a new topic being composed) diff --git a/src/categories/search.js b/src/categories/search.js index 685628f32c..173b451ae6 100644 --- a/src/categories/search.js +++ b/src/categories/search.js @@ -8,6 +8,7 @@ const db = require('../database'); module.exports = function (Categories) { Categories.search = async function (data) { + console.log('it called categories search'); const query = data.query || ''; const page = data.page || 1; const uid = data.uid || 0;