Cover photo removal for groups, #3832

This commit is contained in:
Julian Lam
2015-11-06 10:50:14 -05:00
parent 92be63ebe6
commit 2830538835
4 changed files with 33 additions and 2 deletions

View File

@@ -33,7 +33,8 @@ define('forum/groups/details', [
uploader.open(RELATIVE_PATH + '/api/groups/uploadpicture', { groupName: groupName }, 0, function(imageUrlOnServer) {
components.get('groups/cover').css('background-image', 'url(' + imageUrlOnServer + ')');
});
}
},
removeCover
);
}
@@ -241,5 +242,17 @@ define('forum/groups/details', [
}
}
function removeCover() {
socket.emit('groups.cover.remove', {
groupName: ajaxify.data.group.name
}, function(err) {
if (!err) {
ajaxify.refresh();
} else {
app.alertError(err.message);
}
});
}
return Details;
});