v1.18.x
psychobunny 9 years ago
parent 13c1dbe178
commit ef20141e8f

@ -1,5 +1,5 @@
"use strict";
/* globals define, app*/
/* globals define, app, RELATIVE_PATH */
define('coverPhoto', [
'uploader',
@ -29,7 +29,7 @@ define('coverPhoto', [
.backgroundDraggable({
axis: 'y',
units: 'percent'
})
});
});
coverEl
@ -84,7 +84,7 @@ define('coverPhoto', [
.backgroundDraggable({
axis: 'y',
units: 'percent'
})
});
}
};

@ -112,13 +112,11 @@ apiController.getConfig = function(req, res, next) {
apiController.renderWidgets = function(req, res, next) {
var async = require('async'),
areas = {
template: req.query.template,
locations: req.query.locations,
url: req.query.url
},
renderedWidgets = [];
var areas = {
template: req.query.template,
locations: req.query.locations,
url: req.query.url
};
if (!areas.template || !areas.locations) {
return res.status(200).json({});

@ -3,7 +3,6 @@
var async = require('async'),
nconf = require('nconf'),
validator = require('validator'),
db = require('../database'),
meta = require('../meta'),
groups = require('../groups'),
user = require('../user'),
@ -144,7 +143,7 @@ groupsController.uploadCover = function(req, res, next) {
}
res.json([{url: image.url.startsWith('http') ? image.url : nconf.get('relative_path') + image.url}]);
})
});
};
module.exports = groupsController;

@ -104,9 +104,7 @@ module.exports = function(Groups) {
async.parallel([
async.apply(db.setObjectField, 'group:' + groupName, 'hidden', hidden ? 1 : 0),
async.apply(updateVisibility, groupName, hidden)
], function(err, results) {
callback(err);
});
], callback);
}
Groups.updateCoverPosition = function(groupName, position, callback) {

Loading…
Cancel
Save