mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
ESlint comma-dangle
This commit is contained in:
@@ -17,7 +17,7 @@ admin.get = function (callback) {
|
||||
{ name: 'Global Footer', template: 'global', location: 'footer' },
|
||||
|
||||
{ name: 'Group Page (Left)', template: 'groups/details.tpl', location: 'left'},
|
||||
{ name: 'Group Page (Right)', template: 'groups/details.tpl', location: 'right'}
|
||||
{ name: 'Group Page (Right)', template: 'groups/details.tpl', location: 'right'},
|
||||
];
|
||||
|
||||
plugins.fireHook('filter:widgets.getAreas', defaultAreas, next);
|
||||
@@ -27,7 +27,7 @@ admin.get = function (callback) {
|
||||
},
|
||||
adminTemplate: function (next) {
|
||||
fs.readFile(path.resolve(nconf.get('views_dir'), 'admin/partials/widget-settings.tpl'), 'utf8', next);
|
||||
}
|
||||
},
|
||||
}, function (err, widgetData) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
@@ -56,7 +56,7 @@ admin.get = function (callback) {
|
||||
list[area.template] = index;
|
||||
templates.push({
|
||||
template: area.template,
|
||||
areas: []
|
||||
areas: [],
|
||||
});
|
||||
|
||||
index++;
|
||||
@@ -64,14 +64,14 @@ admin.get = function (callback) {
|
||||
|
||||
templates[list[area.template]].areas.push({
|
||||
name: area.name,
|
||||
location: area.location
|
||||
location: area.location,
|
||||
});
|
||||
});
|
||||
|
||||
callback(false, {
|
||||
templates: templates,
|
||||
areas: widgetData.areas,
|
||||
widgets: widgetData.widgets
|
||||
widgets: widgetData.widgets,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -42,7 +42,7 @@ widgets.render = function (uid, area, req, res, callback) {
|
||||
area: area,
|
||||
data: widget.data,
|
||||
req: req,
|
||||
res: res
|
||||
res: res,
|
||||
}, function (err, html) {
|
||||
if (err || html === null) {
|
||||
return next(err);
|
||||
@@ -56,7 +56,7 @@ widgets.render = function (uid, area, req, res, callback) {
|
||||
translator.translate(widget.data.title, function (title) {
|
||||
html = templates.parse(widget.data.container, {
|
||||
title: title,
|
||||
body: html
|
||||
body: html,
|
||||
});
|
||||
|
||||
next(null, {html: html});
|
||||
@@ -133,7 +133,7 @@ widgets.reset = function (callback) {
|
||||
var defaultAreas = [
|
||||
{ name: 'Draft Zone', template: 'global', location: 'header' },
|
||||
{ name: 'Draft Zone', template: 'global', location: 'footer' },
|
||||
{ name: 'Draft Zone', template: 'global', location: 'sidebar' }
|
||||
{ name: 'Draft Zone', template: 'global', location: 'sidebar' },
|
||||
];
|
||||
|
||||
async.parallel({
|
||||
@@ -142,7 +142,7 @@ widgets.reset = function (callback) {
|
||||
},
|
||||
drafts: function (next) {
|
||||
widgets.getArea('global', 'drafts', next);
|
||||
}
|
||||
},
|
||||
}, function (err, results) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
@@ -167,7 +167,7 @@ widgets.reset = function (callback) {
|
||||
widgets.setArea({
|
||||
template: 'global',
|
||||
location: 'drafts',
|
||||
widgets: drafts
|
||||
widgets: drafts,
|
||||
}, callback);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user