refactor: change Benchpress.parse to .render (#8856)

It has been deprecated with no warning message for a while
Changing these over before enabling the warning message to reduce spam
This commit is contained in:
Peter Jaszkowiak
2020-11-08 06:17:49 -07:00
committed by GitHub
parent 14ba638345
commit e128264b66
30 changed files with 296 additions and 346 deletions

View File

@@ -171,11 +171,12 @@ ajaxify = window.ajaxify || {};
function renderTemplate(url, tpl_url, data, callback) {
$(window).trigger('action:ajaxify.loadingTemplates', {});
Benchpress.parse(tpl_url, data, function (template) {
translator.translate(template, function (translatedTemplate) {
translatedTemplate = translator.unescape(translatedTemplate);
Benchpress.render(tpl_url, data)
.then(rendered => translator.translate(rendered))
.then(function (translated) {
translated = translator.unescape(translated);
$('body').removeClass(previousBodyClass).addClass(data.bodyClass);
$('#content').html(translatedTemplate);
$('#content').html(translated);
ajaxify.end(url, tpl_url);
@@ -189,7 +190,6 @@ ajaxify = window.ajaxify || {};
updateTitle(data.title);
updateTags();
});
});
}
function updateTitle(title) {