mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-09-11 03:18:51 +02:00
Cover photo removal for groups, #3832
This commit is contained in:
@@ -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;
|
||||
});
|
||||
Reference in New Issue
Block a user