mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
added icon container styles back to ACP, proper hooking-up of iconSelect module in group settings panel, #2588
This commit is contained in:
@@ -195,6 +195,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
.icon-container {
|
||||
.row {
|
||||
margin: 0;
|
||||
i {
|
||||
width:20px;
|
||||
height:20px;
|
||||
margin: 1px;
|
||||
.pointer;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
|
||||
&:hover, &.selected {
|
||||
background: black;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar {
|
||||
padding: 0 5px;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
/* globals define, socket, ajaxify, app */
|
||||
|
||||
define('forum/groups/details', ['iconSelect'], function(iconSelect) {
|
||||
define('forum/groups/details', ['iconSelect', 'vendor/colorpicker/colorpicker'], function(iconSelect) {
|
||||
var Details = {};
|
||||
|
||||
Details.init = function() {
|
||||
@@ -63,11 +63,11 @@ define('forum/groups/details', ['iconSelect'], function(iconSelect) {
|
||||
colorValueEl = settingsFormEl.find('[name="labelColor"]'),
|
||||
iconBtn = settingsFormEl.find('[data-action="icon-select"]'),
|
||||
previewEl = settingsFormEl.find('.label'),
|
||||
previewIcon = previewEl.find('i');
|
||||
previewIcon = previewEl.find('i'),
|
||||
previewValueEl = settingsFormEl.find('[name="icon"]');
|
||||
|
||||
if (settingsFormEl.length) {
|
||||
// Add color picker to settings form
|
||||
require(['vendor/colorpicker/colorpicker'], function() {
|
||||
colorBtn.ColorPicker({
|
||||
color: colorValueEl.val() || '#000',
|
||||
onChange: function(hsb, hex) {
|
||||
@@ -78,11 +78,12 @@ define('forum/groups/details', ['iconSelect'], function(iconSelect) {
|
||||
$(colpkr).css('z-index', 1051);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Add icon selection interface
|
||||
iconBtn.on('click', function() {
|
||||
iconSelect.init(previewIcon, function() {
|
||||
console.log(arguments);
|
||||
previewValueEl.val(previewIcon.val());
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ SocketGroups.join = function(socket, data, callback) {
|
||||
return callback(new Error('[[error:invalid-data]]'));
|
||||
}
|
||||
|
||||
if (meta.config.allowPrivateGroups) {
|
||||
if (meta.config.allowPrivateGroups !== '0') {
|
||||
groups.isPrivate(data.groupName, function(err, isPrivate) {
|
||||
if (isPrivate) {
|
||||
groups.requestMembership(data.groupName, socket.uid, callback);
|
||||
|
||||
Reference in New Issue
Block a user