Switch client t.js usage to Benchpress

This commit is contained in:
Peter Jaszkowiak
2017-08-30 11:31:15 -06:00
parent dc3f89a505
commit 71aab79a9a
13 changed files with 37 additions and 31 deletions

View File

@@ -1,7 +1,7 @@
'use strict';
define('forum/categories', ['components', 'translator'], function (components, translator) {
define('forum/categories', ['components', 'translator', 'benchpress'], function (components, translator, Benchpress) {
var categories = {};
$(window).on('action:ajaxify.start', function (ev, data) {
@@ -58,7 +58,7 @@ define('forum/categories', ['components', 'translator'], function (components, t
}
function parseAndTranslate(posts, callback) {
templates.parse('categories', '(categories.)?posts', { categories: { posts: posts } }, function (html) {
Benchpress.parse('categories', '(categories\\.)?posts', { categories: { posts: posts } }, function (html) {
translator.translate(html, function (translatedHTML) {
translatedHTML = $(translatedHTML);
translatedHTML.find('.post-content img:not(.not-responsive)').addClass('img-responsive');