mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
widgets.render doesn't actually use the url
This commit is contained in:
@@ -93,7 +93,7 @@ var ajaxify = ajaxify || {};
|
|||||||
templates.parse(tpl_url, data, function(template) {
|
templates.parse(tpl_url, data, function(template) {
|
||||||
translator.translate(template, function(translatedTemplate) {
|
translator.translate(template, function(translatedTemplate) {
|
||||||
$('#content').html(translatedTemplate);
|
$('#content').html(translatedTemplate);
|
||||||
ajaxify.widgets.render(tpl_url, url);
|
ajaxify.widgets.render(tpl_url);
|
||||||
|
|
||||||
ajaxify.variables.parse();
|
ajaxify.variables.parse();
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
ajaxify.widgets.render = function(tpl_url, url, callback) {
|
ajaxify.widgets.render = function(tpl_url, callback) {
|
||||||
var widgetLocations = ['sidebar', 'footer', 'header'], numLocations;
|
var widgetLocations = ['sidebar', 'footer', 'header'], numLocations;
|
||||||
|
|
||||||
$('#content [widget-area]').each(function() {
|
$('#content [widget-area]').each(function() {
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
function renderWidgets(location) {
|
function renderWidgets(location) {
|
||||||
var area = $('#content [widget-area="' + location + '"]');
|
var area = $('#content [widget-area="' + location + '"]');
|
||||||
|
|
||||||
socket.emit('widgets.render', {template: tpl_url + '.tpl', url: url, location: location}, function(err, renderedWidgets) {
|
socket.emit('widgets.render', {template: tpl_url + '.tpl', location: location}, function(err, renderedWidgets) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user