mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
don't need to refresh to preview updated skin #3069
This commit is contained in:
@@ -61,6 +61,13 @@ define('forum/account/settings', ['forum/account/header'], function(header) {
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#bootswatchSkin').on('change', function() {
|
||||
var css = $('#bootswatchCSS'),
|
||||
val = $(this).val() === 'default' ? config['theme:src'] : 'http://maxcdn.bootstrapcdn.com/bootswatch/latest/' + $(this).val() + '/bootstrap.min.css';
|
||||
|
||||
css.attr('href', val);
|
||||
});
|
||||
};
|
||||
|
||||
return AccountSettings;
|
||||
|
||||
@@ -63,6 +63,7 @@ apiController.getConfig = function(req, res, next) {
|
||||
config.postsPerPage = meta.config.postsPerPage || 20;
|
||||
config.maximumFileSize = meta.config.maximumFileSize;
|
||||
config['theme:id'] = meta.config['theme:id'];
|
||||
config['theme:src'] = meta.config['theme:src'];
|
||||
config.defaultLang = meta.config.defaultLang || 'en_GB';
|
||||
config.userLang = req.query.lang || config.defaultLang;
|
||||
config.environment = process.env.NODE_ENV;
|
||||
|
||||
Reference in New Issue
Block a user